You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@drill.apache.org by Taka Kobayashi <gr...@gmail.com> on 2015/11/25 08:33:17 UTC

Newbie question: Parsing error

Hi,

I am a newbie to Apache drill and have been struggling to see how to solve
this (probably really easy) issue. Here is what I am doing:

1. Log in as a superuser: su - xxxx
2. Move to the working directory: cd /usr/local/
3. Create a testing csv file; cat drill/input/xxx.csv
4. Launch drill; drill/bin/drill-embedded
5. Run a query:  select * from dfs.'drill/input/data.csv';

And I got this error:

Error: PARSE ERROR: Encountered ". \'drill/input/data.csv\'" at line 1,
column 18.
Was expecting one of:
    <EOF>
    "ORDER" ...

I have googled but haven't got a solution yet.
I appreciate if anyone could help me....

Best,

TK

Re: Newbie question: Parsing error

Posted by Jason Altekruse <al...@gmail.com>.
Two small points that should get this working for you. First with the
parsing issue, Drill uses backticks (`) not single quotes for identifiers
like table and column names. Secondly Drill doesn't support querying
relative to the path you launched it from. For basic usage without any
configuration you will need to provide a full path from the root of the
filesystem. Drill includes a concept called a workspace that allows you to
give a simple name to a given directory. More info on creating and managing
workspaces can be found here [1].

This should work:
select * from dfs.`/usr/local/drill/input/data.csv`

[1] - https://drill.apache.org/docs/workspaces/

On Tue, Nov 24, 2015 at 11:33 PM, Taka Kobayashi <
growthbydesign2013@gmail.com> wrote:

> Hi,
>
> I am a newbie to Apache drill and have been struggling to see how to solve
> this (probably really easy) issue. Here is what I am doing:
>
> 1. Log in as a superuser: su - xxxx
> 2. Move to the working directory: cd /usr/local/
> 3. Create a testing csv file; cat drill/input/xxx.csv
> 4. Launch drill; drill/bin/drill-embedded
> 5. Run a query:  select * from dfs.'drill/input/data.csv';
>
> And I got this error:
>
> Error: PARSE ERROR: Encountered ". \'drill/input/data.csv\'" at line 1,
> column 18.
> Was expecting one of:
>     <EOF>
>     "ORDER" ...
>
> I have googled but haven't got a solution yet.
> I appreciate if anyone could help me....
>
> Best,
>
> TK
>

Re: Newbie question: Parsing error

Posted by Rajkumar Singh <rs...@maprtech.com>.
could you please enclose table location in back tick(`) and see if it helps
 
> On Nov 25, 2015, at 1:03 PM, Taka Kobayashi <gr...@gmail.com> wrote:
> 
> Hi,
> 
> I am a newbie to Apache drill and have been struggling to see how to solve
> this (probably really easy) issue. Here is what I am doing:
> 
> 1. Log in as a superuser: su - xxxx
> 2. Move to the working directory: cd /usr/local/
> 3. Create a testing csv file; cat drill/input/xxx.csv
> 4. Launch drill; drill/bin/drill-embedded
> 5. Run a query:  select * from dfs.'drill/input/data.csv';
> 
> And I got this error:
> 
> Error: PARSE ERROR: Encountered ". \'drill/input/data.csv\'" at line 1,
> column 18.
> Was expecting one of:
>    <EOF>
>    "ORDER" ...
> 
> I have googled but haven't got a solution yet.
> I appreciate if anyone could help me....
> 
> Best,
> 
> TK