You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@drill.apache.org by Tomer Shiran <ts...@gmail.com> on 2014/11/09 10:05:05 UTC
Re: Drill create table
You'll want to use columns[n] to access the fields. There's a JIRA (624) open for automatically using the header row for field names.
Check out this page for how to do it currently:
https://cwiki.apache.org/confluence/display/DRILL/Querying+Plain+Text+Files
> On Nov 8, 2014, at 4:00 AM, lapro1 <la...@gmail.com> wrote:
>
> Hi,
> I'd like to ask the following:
> I'm students yet, and I'm writing my thesis. My problem is, that I'd like
> to import a csv file into a new drill table, but I don't know how it's
> possibe.
> I give the following command, but I get exception:
>
> CREATE TABLE nameposTable3 AS SELECT first_name, last_name, position_id,
> dere, grtgr FROM cp.`/drill/datafiles/proba.csv`;
>
> The exception is:
> +------------+------------+
> | ok | summary |
> +------------+------------+
> | false | Error: org.eigenbase.util.EigenbaseContextException: From
> line |
> +------------+------------+
> 1 row selected (0.964 seconds)
>
> I would have great thanks to somebody, who could help me.
> Laszlo