From user-return-10065-apmail-drill-user-archive=drill.apache.org@drill.apache.org Tue Jan 22 07:03:47 2019 Return-Path: X-Original-To: apmail-drill-user-archive@www.apache.org Delivered-To: apmail-drill-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 6001A108C4 for ; Tue, 22 Jan 2019 07:03:47 +0000 (UTC) Received: (qmail 19437 invoked by uid 500); 22 Jan 2019 07:03:47 -0000 Delivered-To: apmail-drill-user-archive@drill.apache.org Received: (qmail 19349 invoked by uid 500); 22 Jan 2019 07:03:46 -0000 Mailing-List: contact user-help@drill.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@drill.apache.org Delivered-To: mailing list user@drill.apache.org Received: (qmail 19275 invoked by uid 99); 22 Jan 2019 07:03:46 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 22 Jan 2019 07:03:46 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id 72824C8791 for ; Tue, 22 Jan 2019 07:03:45 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 2.999 X-Spam-Level: ** X-Spam-Status: No, score=2.999 tagged_above=-999 required=6.31 tests=[RDNS_NONE=3, SPF_PASS=-0.001] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id rsZrZpZHoFY3 for ; Tue, 22 Jan 2019 07:03:43 +0000 (UTC) Received: from EDGE2013.interswitchng.com (unknown [41.203.117.27]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTPS id 9B3205F21E for ; Tue, 22 Jan 2019 06:53:53 +0000 (UTC) Received: from Appconnect.Interswitchng.com (172.16.10.223) by Edge.interswitchng.com (172.16.10.44) with Microsoft SMTP Server (TLS) id 14.3.195.1; Tue, 22 Jan 2019 07:53:41 +0100 Received: from Appconnect.Interswitchng.com (172.16.10.223) by Appconnect.Interswitchng.com (172.16.10.223) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Tue, 22 Jan 2019 07:53:03 +0100 Received: from Appconnect.Interswitchng.com ([fe80::a8dc:19bb:af2b:46e2]) by Appconnect.Interswitchng.com ([fe80::a8dc:19bb:af2b:46e2%12]) with mapi id 15.00.1395.000; Tue, 22 Jan 2019 07:53:03 +0100 From: Peter Edike To: "user@drill.apache.org" Subject: Re: Problem Creating Views In Apache Drill Thread-Topic: Problem Creating Views In Apache Drill Thread-Index: AQHUqZzGnRrBDKb510y7i8p1epU+baWqcgkAgAAhWYCAEFd8AA== Date: Tue, 22 Jan 2019 06:53:03 +0000 Message-ID: <1548139982709.31514@interswitchgroup.com> References: <1547205681087.15087@interswitchgroup.com> , In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [172.16.10.124] Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Hi Khurram=0A= =0A= I am currently Running Apache Drill 1.13=0A= =0A= Many Thanks=0A= ________________________________________=0A= From: Khurram Faraaz =0A= Sent: Friday, January 11, 2019 11:19 PM=0A= To: user@drill.apache.org=0A= Subject: Re: Problem Creating Views In Apache Drill=0A= =0A= Hi Peter,=0A= =0A= What version of Drill are you on ?=0A= =0A= Thanks,=0A= Khurram=0A= =0A= On Fri, Jan 11, 2019 at 12:20 PM Gautam Parai wrote:=0A= =0A= > Hi Peter,=0A= >=0A= > Do you see the same error when you run the query instead?=0A= >=0A= > SELECT id, settlement, settlement_type,=0A= > to_timestamp(to_char(settlement_date, '#')) as settlement_date=0A= > ,transaction_id, transaction_type, settlement_institution,=0A= > settlement_institution_bank_domain_id, domain_i,product_group_id,=0A= > channel_id FROM `dfs`.`***`.`/tbl_settlement`=0A= >=0A= > Could you narrow down on the column which is causing this error? Also, ca= n=0A= > you please set alter session set `exec.errors.verbose` =3D true and provi= de=0A= > the stack trace from the console.=0A= >=0A= > Thanks,=0A= > Gautam=0A= >=0A= > On Fri, Jan 11, 2019 at 3:22 AM Peter Edike <=0A= > peter.edike@interswitchgroup.com> wrote:=0A= >=0A= > > Hello Everyone,=0A= > >=0A= > >=0A= > > I have a set of parquet files which where created as a result of a batc= h=0A= > > ETL job (using Sqoop 1).=0A= > >=0A= > >=0A= > > I can query the fields normally without any kind of formatting and all = is=0A= > > well...=0A= > >=0A= > >=0A= > > However, when i try to create a view with the following code=0A= > >=0A= > >=0A= > > CREATE VIEW `dfs.asra`.`vw_tbl_settlement` AS=0A= > > SELECT id, settlement, settlement_type,=0A= > > to_timestamp(to_char(settlement_date, '#')) as settlement_date=0A= > > ,transaction_id, transaction_type, settlement_institution,=0A= > > settlement_institution_bank_domain_id, domain_i,product_group_id,=0A= > > channel_id FROM `dfs`.`***`.`/tbl_settlement`=0A= > >=0A= > > I end up with the following exception=0A= > >=0A= > > org.apache.drill.common.exceptions.UserRemoteException: SYSTEM ERROR:= =0A= > > SchemaChangeException: Failure while trying to materialize incoming=0A= > schema.=0A= > > Errors: Error in expression at index -1. Error: Missing function=0A= > > implementation: [castTINYINT(VARCHAR-OPTIONAL)]. Full expression:=0A= > --UNKNOWN=0A= > > EXPRESSION--.. Fragment 0:0 [Error Id:=0A= > 55c13096-085a-4d0c-9eca-5c7bbc2d1b8f=0A= > > on bdnode3.interswitch.com:31010]?=0A= > >=0A= > > Please What am I doing wrong=0A= > >=0A= > > Kind Regards=0A= > >=0A= > >=0A= > >=0A= >=0A=