[
https://issues.apache.org/jira/browse/DRILL-3933?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16730298#comment-16730298
]
Vitalii Diravka commented on DRILL-3933:
----------------------------------------
Hi [~bbevens],
Yes, it means it is possible to pass the query in SqlLine connection process,
execute it and exit from the SqlLine:
{code:java}
vitalii@vitalii-pc:~/drill/bin$ ./sqlline -u 'jdbc:drill:drillbit=localhost' -q
'select * from cp.`employee.json` limit 2;'
Dec 28, 2018 4:28:57 PM org.jline.utils.Log logr
WARNING: Unable to create a system terminal, creating a dumb terminal (enable
debug logging for more information)
Apache Drill 1.15.0-SNAPSHOT
"Let's Drill something more solid than concrete."
0: jdbc:drill:drillbit=localhost>
+--------------+---------------+-------------+------------+--------------+-----------------+-----------+----------------+-------------+------------------------+----------+----------------+------------------+-----------------+---------+--------------------+
| employee_id | full_name | first_name | last_name | position_id |
position_title | store_id | department_id | birth_date | hire_date
| salary | supervisor_id | education_level | marital_status | gender
| management_role |
+--------------+---------------+-------------+------------+--------------+-----------------+-----------+----------------+-------------+------------------------+----------+----------------+------------------+-----------------+---------+--------------------+
| 1 | Sheri Nowmer | Sheri | Nowmer | 1 |
President | 0 | 1 | 1961-08-26 | 1994-12-01
00:00:00.0 | 80000.0 | 0 | Graduate Degree | S |
F | Senior Management |
+--------------+---------------+-------------+------------+--------------+-----------------+-----------+----------------+-------------+------------------------+----------+----------------+------------------+-----------------+---------+--------------------+
1 row selected (0.286 seconds)
0: jdbc:drill:drillbit=localhost> Closing:
org.apache.drill.jdbc.impl.DrillConnectionImpl
vitalii@vitalii-pc:~/drill/bin$
{code}
It can be useful for scripts, for instance.
> Error execute select command line sqlline -u -q
> -----------------------------------------------
>
> Key: DRILL-3933
> URL: https://issues.apache.org/jira/browse/DRILL-3933
> Project: Apache Drill
> Issue Type: Bug
> Affects Versions: 1.1.0
> Reporter: Jon
> Assignee: Arina Ielchiieva
> Priority: Major
> Labels: doc-impacting, ready-to-commit
> Fix For: 1.15.0
>
>
> I'm newbie with Drill and Jira, so sorry if this is not the correct site.
> When I query : "sqlline -u 'jdbc:drill:drillbit=localhost' -q 'select * from
> hive.database.table;' " return:
> "select anaconda-ks.cfg build.out install.log install.log.syslog
> ranger_tutorial sandbox.info start_ambari.sh start_hbase.sh start_solr.sh
> stop_solr.sh from hive.database.table;"
> Error: PARSE ERROR: Encountered "." at line 1, column 29.
> Was expecting one of:
> "FROM" ...
> "," ...
> So, to fix this, i should type all columns to do this one work.
> But, if I used UI, in localhost:8047/query, the query works. Drill is
> connected to Hive with plugin of course. Is this a bug or something? Bad
> conf.?
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)