drill-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Aman Sinha <amansi...@gmail.com>
Subject Re: Problem Creating Views In Apache Drill
Date Mon, 14 Jan 2019 19:13:31 GMT
Hi Peter,
The function  to_char(settlement_date, '#')  is operating on a date column,
so the second argument should be a date formatter, something like:
   to_char(settlement_date, 'mm-dd-yyyy').    Can you try that ?

Aman

On Fri, Jan 11, 2019 at 2:19 PM Khurram Faraaz <kfaraaz@mapr.com> wrote:

> Hi Peter,
>
> What version of Drill are you on ?
>
> Thanks,
> Khurram
>
> On Fri, Jan 11, 2019 at 12:20 PM Gautam Parai <gparai@mapr.com> wrote:
>
> > Hi Peter,
> >
> > Do you see the same error when you run the query instead?
> >
> > SELECT id, settlement,  settlement_type,
> > to_timestamp(to_char(settlement_date, '#')) as settlement_date
> > ,transaction_id, transaction_type, settlement_institution,
> > settlement_institution_bank_domain_id, domain_i,product_group_id,
> > channel_id FROM `dfs`.`***`.`/tbl_settlement`
> >
> > Could you narrow down on the column which is causing this error? Also,
> can
> > you please set alter session set `exec.errors.verbose` = true and provide
> > the stack trace from the console.
> >
> > Thanks,
> > Gautam
> >
> > On Fri, Jan 11, 2019 at 3:22 AM Peter Edike <
> > peter.edike@interswitchgroup.com> wrote:
> >
> > > Hello Everyone,
> > >
> > >
> > > I have a set of parquet files which where created as a result of a
> batch
> > > ETL job (using Sqoop 1).
> > >
> > >
> > > I can query the fields normally without any kind of formatting and all
> is
> > > well...
> > >
> > >
> > > However, when i try to create a view with the following code
> > >
> > >
> > > CREATE VIEW `dfs.asra`.`vw_tbl_settlement` AS
> > > SELECT id, settlement,  settlement_type,
> > > to_timestamp(to_char(settlement_date, '#')) as settlement_date
> > > ,transaction_id, transaction_type, settlement_institution,
> > > settlement_institution_bank_domain_id, domain_i,product_group_id,
> > > channel_id FROM `dfs`.`***`.`/tbl_settlement`
> > >
> > > I end up with the following exception
> > >
> > > org.apache.drill.common.exceptions.UserRemoteException: SYSTEM ERROR:
> > > SchemaChangeException: Failure while trying to materialize incoming
> > schema.
> > > Errors: Error in expression at index -1. Error: Missing function
> > > implementation: [castTINYINT(VARCHAR-OPTIONAL)]. Full expression:
> > --UNKNOWN
> > > EXPRESSION--.. Fragment 0:0 [Error Id:
> > 55c13096-085a-4d0c-9eca-5c7bbc2d1b8f
> > > on bdnode3.interswitch.com:31010]?
> > >
> > > Please What am I doing wrong
> > >
> > > Kind Regards
> > >
> > >
> > >
> >
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message