You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@drill.apache.org by Assaf Lowenstein <as...@totango.com> on 2015/09/09 16:11:01 UTC

Getting anonymous when selecting `user` instead of actual user name from JSON

Hello Drillers!

I'm trying to run a query-
SELECT `user` from dfs.`<some local location>` LIMIT 2; //(user is a
reserved word according to your docs so back ticks are required).

I'm getting a user column with 2 rows but both users are *anonymous *and
not the actual user name that appear in my JSON.
when I'm doing
SELECT
​*
 from dfs.`<some local location>` LIMIT 2;
​ then the user names appear right under the user column.

Please advise.
Thanks!​


-- 
*Assaf Lowenstein*, *QA Manager, Totango*
http://www.totango.com | Contact me @ cell: +(972) 052-4235550

Re: Getting anonymous when selecting `user` instead of actual user name from JSON

Posted by Andy Pernsteiner <ap...@maprtech.com>.
Check this JIRA, you may need to alias the table in your query

https://issues.apache.org/jira/browse/DRILL-3435

eg:

 select *t*.`user` from
`profiles/2aa32e9e-bdae-8949-8461-c14dafe63ee0.sys.drill` *t* ;





On Wed, Sep 9, 2015 at 11:16 AM, Andries Engelbrecht <
aengelbrecht@maprtech.com> wrote:

> When using the LIMIT clause you can get any 2 records coming back, do you
> have any records with anonymous for user?
>
> You have to order the records to get a reliable output with the limit
> clause.
>
> —Andries
>
>
> > On Sep 9, 2015, at 7:11 AM, Assaf Lowenstein <as...@totango.com> wrote:
> >
> > Hello Drillers!
> >
> > I'm trying to run a query-
> > SELECT `user` from dfs.`<some local location>` LIMIT 2; //(user is a
> > reserved word according to your docs so back ticks are required).
> >
> > I'm getting a user column with 2 rows but both users are *anonymous *and
> > not the actual user name that appear in my JSON.
> > when I'm doing
> > SELECT
> > ​*
> > from dfs.`<some local location>` LIMIT 2;
> > ​ then the user names appear right under the user column.
> >
> > Please advise.
> > Thanks!​
> >
> >
> > --
> > *Assaf Lowenstein*, *QA Manager, Totango*
> > http://www.totango.com | Contact me @ cell: +(972) 052-4235550
>
>


-- 
 Andy Pernsteiner
 Manager, Field Enablement
ph: 206.228.0737

www.mapr.com

Now Available - Free Hadoop On-Demand Training
<http://www.mapr.com/training?utm_source=Email&utm_medium=Signature&utm_campaign=Free%20available>

Re: Getting anonymous when selecting `user` instead of actual user name from JSON

Posted by Andries Engelbrecht <ae...@maprtech.com>.
When using the LIMIT clause you can get any 2 records coming back, do you have any records with anonymous for user?

You have to order the records to get a reliable output with the limit clause.

—Andries


> On Sep 9, 2015, at 7:11 AM, Assaf Lowenstein <as...@totango.com> wrote:
> 
> Hello Drillers!
> 
> I'm trying to run a query-
> SELECT `user` from dfs.`<some local location>` LIMIT 2; //(user is a
> reserved word according to your docs so back ticks are required).
> 
> I'm getting a user column with 2 rows but both users are *anonymous *and
> not the actual user name that appear in my JSON.
> when I'm doing
> SELECT
> ​*
> from dfs.`<some local location>` LIMIT 2;
> ​ then the user names appear right under the user column.
> 
> Please advise.
> Thanks!​
> 
> 
> -- 
> *Assaf Lowenstein*, *QA Manager, Totango*
> http://www.totango.com | Contact me @ cell: +(972) 052-4235550