Hafiz,

One other note that will likely help you with your use case. Drill allows
you to skip reading the header row in a csv file. Without this feature
configured you will likely get number or date format exceptions trying to
cast your csv data to particular data types, as your column names will by
default be read as data.

See here in the docs for more info:
http://drill.apache.org/docs/text-files-csv-tsv-psv/

On Sun, Jul 26, 2015 at 9:45 PM, Hafiz Mujadid <[email protected]>
wrote:

> thanks Jim
>
> On Mon, Jul 27, 2015 at 7:04 AM, Jim Scott <[email protected]> wrote:
>
> > That functionality does not yet exist. There is a JIRA open for that
> > functionality to be added. But has not yet been prioritized high enough
> to
> > get completed.
> >
> > Is this something you are interested in contributing toward?
> >
> > In the mean time, your options are:
> > * Alias (select columns[0] as field name...)
> > * Create Table As and convert it to a format like parquet
> > * View (just like the create table statement)
> >
> > You can find proper syntax in the drill documentation for each of those
> > queries.
> >
> > Jim
> >
> > On Sun, Jul 26, 2015 at 11:19 AM, Hafiz Mujadid <
> [email protected]>
> > wrote:
> >
> > > Hi!
> > >
> > > I want to know how can i get columns name from csv file using header in
> > csv
> > > file instead of columns array in json response of json using rest api
> of
> > > drill,
> > >
> > > Thanks
> > >
> >
>
>
>
> --
> Regards: HAFIZ MUJADID
>

Reply via email to