Also, the sqlline prompt does not reflect the current schema connected to: 0: jdbc:drill:schema=sys:zk=n69:5181,n72:5181> use dfs; +------------+------------+ | ok | summary | +------------+------------+ | true | Default schema changed to 'dfs' | +------------+------------+ 1 row selected (0.052 seconds)
0: jdbc:drill:schema=sys:zk=n69:5181,n72:5181> [root@n69 bin]# ./sqlline -u jdbc:drill:zk=n69:5181,n72:5181,n73:5181 -n admin -p admin sqlline version 1.1.6 0: jdbc:drill:zk=n69:5181,n72:5181,n73:5181> use sys; +------------+------------+ | ok | summary | +------------+------------+ | true | Default schema changed to 'sys' | +------------+------------+ 1 row selected (0.184 seconds) 0: jdbc:drill:zk=n69:5181,n72:5181,n73:5181> --- Mufeed Usman My LinkedIn <http://www.linkedin.com/pub/mufeed-usman/28/254/400> | My Social Cause <http://www.vision2016.org.in/> | My Blogs : LiveJournal <http://mufeed.livejournal.com> On Wed, Oct 8, 2014 at 12:06 PM, mufy <[email protected]> wrote: > *[CONCERN 1]* > > I can connect in the following 2 ways, > > METHOD 1 : sqlline -u jdbc:drill:zk=n69:5181,n72:5181,n73:5181 -n admin > -p admin (Not specifying schema) > METHOD 2 : sqlline -u jdbc:drill:schema=sys:zk=n69:5181,n72:5181,n73:5181 > -n admin -p admin (Specifying schema) > > Like in SQL, I was under the impression that once directly connected to > the schema I'd not have to explicitly specify the schema when querying the > table. But it did not seem to work. For example, > > [root@n69 bin]# ./sqlline -u > jdbc:drill:schema=sys:zk=n69:5181,n72:5181,n73:5181 -n admin -p admin > sqlline version 1.1.6 > 0: jdbc:drill:schema=sys:zk=n69:5181,n72:5181> show tables; > Query failed: Failure while parsing sql. No schema selected. Select a > schema using 'USE schema' command [d4114b19-095f-409b-bb46-5e940c328c91] > > Error: exception while executing query: Failure while trying to get next > result batch. (state=,code=0) > > 0: jdbc:drill:schema=sys:zk=n69:5181,n72:5181> select * from drillbits; > Query failed: Failure while parsing sql. Table 'drillbits' not found > [d28fa64c-13a4-4b7c-a6ea-8e77f1a3b243] > > Error: exception while executing query: Failure while trying to get next > result batch. (state=,code=0) > > > But it worked only when I specified `schema`.`table`. Is that the expected > behavior? > > 0: jdbc:drill:schema=sys:zk=n69:5181,n72:5181> select * from sys.drillbits; > +------------+------------+--------------+------------+ > | host | user_port | control_port | data_port | > +------------+------------+--------------+------------+ > | n69 | 31010 | 31011 | 31012 | > +------------+------------+--------------+------------+ > 1 row selected (0.191 seconds) > > > *[CONCERN 2]* > > What's the advantage of specifying the ZK ensemble in the sqlline > connection string? With the way PStore is handled now (directly on the > HDFS), is it relevant anymore? > > > --- > Mufeed Usman > My LinkedIn <http://www.linkedin.com/pub/mufeed-usman/28/254/400> | My > Social Cause <http://www.vision2016.org.in/> | My Blogs : LiveJournal > <http://mufeed.livejournal.com> > > > >
