You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@drill.apache.org by "Vitalii Diravka (JIRA)" <ji...@apache.org> on 2018/12/28 19:11:00 UTC

[jira] [Comment Edited] (DRILL-3933) Error execute select command line sqlline -u -q

    [ https://issues.apache.org/jira/browse/DRILL-3933?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16730437#comment-16730437 ] 

Vitalii Diravka edited comment on DRILL-3933 at 12/28/18 7:10 PM:
------------------------------------------------------------------

[~bbevens] Currently there is Command Variables which can be specified in the Drill shell (when the user is already in shell):
 [https://drill.apache.org/docs/configuring-the-drill-shell/#set-command-variables]

I think it will be good to add additional paragraph with all SqlLine [Command-line arguments|https://github.com/julianhyde/sqlline/blob/e2c67fe36aeb74fb727628bbb2a8d7d28b2df6dd/src/main/resources/sqlline/SqlLine.properties#L250] which can be specified in the process of connecting to drillbit:
{code:java}
vitalii@vitalii-pc:/tmp/drill/bin$ ./sqlline -u 'jdbc:drill:drillbit=localhost' --help
Usage: java sqlline.SqlLine 
 -u <database url> the JDBC URL to connect to
 -n <username> the username to connect as
 -p <password> the password to connect as
 -d <driver class&amp;gt; the driver class to use
 -e <command> the command to execute
 -nn <nickname> nickname for the connection
 -ch <command handler>[,<command handler>]* a custom command handler to use
 -f <file> script file to execute (same as --run)
 -log <file> file to write output
 -ac <class name> application configuration class name
 --color=[true/false] control whether color is used for display
 --colorScheme=[chester/dark/dracula/light/obsidian/solarized/vs2010] Syntax highlight schema
 --csvDelimiter=[delimiter] Delimiter in csv outputFormat
 --csvQuoteCharacter=[char] Quote character in csv outputFormat
 --escapeOutput=[true/false] escape control symbols in output
 --showHeader=[true/false] show column names in query results
 --headerInterval=ROWS the interval between which headers are displayed
 --fastConnect=[true/false] skip building table/column list for tab-completion
 --autoCommit=[true/false] enable/disable automatic transaction commit
 --verbose=[true/false] show verbose error messages and debug info
 --showTime=[true/false] display execution time when verbose
 --showWarnings=[true/false] display connection warnings
 --showNestedErrs=[true/false] display nested errors
 --strictJdbc=[true/false] use strict JDBC
 --nullValue=[string] use string in place of NULL values
 --numberFormat=[pattern] format numbers using DecimalFormat pattern
 --dateFormat=[pattern] format dates using SimpleDateFormat pattern
 --timeFormat=[pattern] format times using SimpleDateFormat pattern
 --timestampFormat=[pattern] format timestamps using SimpleDateFormat pattern
 --force=[true/false] continue running script even after errors
 --maxWidth=MAXWIDTH the maximum width of the terminal
 --maxColumnWidth=MAXCOLWIDTH the maximum width to use when displaying columns
 --maxHistoryFileRows=ROWS the maximum number of history rows to store in history file
 --maxHistoryRows=ROWS the maximum number of history rows to store in memory
 --mode=[emacs/vi] the editing mode
 --silent=[true/false] be more silent
 --autosave=[true/false] automatically save preferences
 --outputformat=[table/vertical/csv/tsv/xmlattrs/xmlelements/json]
 format mode for result display
 --isolation=LEVEL set the transaction isolation level
 --run=/path/to/file run one script and then exit
 --historyfile=/path/to/file use or create history file in specified path
 --useLineContinuation=[true/false] Use line continuation
 --help display this message
{code}
Note: -q works similar to -e in Drill


was (Author: vitalii):
[~bbevens] Currently there is Command Variables which can be specified in the Drill shell (when the user is already in shell):
 [https://drill.apache.org/docs/configuring-the-drill-shell/#set-command-variables]

I think it will be good to add additional paragraph with all SqlLine [Command-line arguments|https://github.com/julianhyde/sqlline/blob/e2c67fe36aeb74fb727628bbb2a8d7d28b2df6dd/src/main/resources/sqlline/SqlLine.properties#L250] which can be specified in the process of connecting to drillbit:
{code:java}
vitalii@vitalii-pc:/tmp/drill/bin$ ./sqlline -u 'jdbc:drill:drillbit=localhost' --help
Usage: java sqlline.SqlLine 
 -u <database url> the JDBC URL to connect to
 -n <username> the username to connect as
 -p <password> the password to connect as
 -d <driver class&gt; the driver class to use
 -e <command> the command to execute
 -nn <nickname> nickname for the connection
 -ch <command handler>[,<command handler>]* a custom command handler to use
 -f <file> script file to execute (same as --run)
 -log <file> file to write output
 -ac <class name> application configuration class name
 --color=[true/false] control whether color is used for display
 --colorScheme=[chester/dark/dracula/light/obsidian/solarized/vs2010] Syntax highlight schema
 --csvDelimiter=[delimiter] Delimiter in csv outputFormat
 --csvQuoteCharacter=[char] Quote character in csv outputFormat
 --escapeOutput=[true/false] escape control symbols in output
 --showHeader=[true/false] show column names in query results
 --headerInterval=ROWS the interval between which headers are displayed
 --fastConnect=[true/false] skip building table/column list for tab-completion
 --autoCommit=[true/false] enable/disable automatic transaction commit
 --verbose=[true/false] show verbose error messages and debug info
 --showTime=[true/false] display execution time when verbose
 --showWarnings=[true/false] display connection warnings
 --showNestedErrs=[true/false] display nested errors
 --strictJdbc=[true/false] use strict JDBC
 --nullValue=[string] use string in place of NULL values
 --numberFormat=[pattern] format numbers using DecimalFormat pattern
 --dateFormat=[pattern] format dates using SimpleDateFormat pattern
 --timeFormat=[pattern] format times using SimpleDateFormat pattern
 --timestampFormat=[pattern] format timestamps using SimpleDateFormat pattern
 --force=[true/false] continue running script even after errors
 --maxWidth=MAXWIDTH the maximum width of the terminal
 --maxColumnWidth=MAXCOLWIDTH the maximum width to use when displaying columns
 --maxHistoryFileRows=ROWS the maximum number of history rows to store in history file
 --maxHistoryRows=ROWS the maximum number of history rows to store in memory
 --mode=[emacs/vi] the editing mode
 --silent=[true/false] be more silent
 --autosave=[true/false] automatically save preferences
 --outputformat=[table/vertical/csv/tsv/xmlattrs/xmlelements/json]
 format mode for result display
 --isolation=LEVEL set the transaction isolation level
 --run=/path/to/file run one script and then exit
 --historyfile=/path/to/file use or create history file in specified path
 --useLineContinuation=[true/false] Use line continuation
 --help display this message
{code}
Note. There are several additional parameters in Drill:
 * -q works similar to -e in Drill.
 * --jvm to specify JVM specific parameters (see more with example in DRILL-6270)

> 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)