Artem Ervits created PHOENIX-5397:
-------------------------------------

             Summary: Extend sqlline and sqlline-thin to accept standard sql in 
addition to sqlfile 
                 Key: PHOENIX-5397
                 URL: https://issues.apache.org/jira/browse/PHOENIX-5397
             Project: Phoenix
          Issue Type: Improvement
    Affects Versions: 4.14.2
            Reporter: Artem Ervits


Today, it is possible to pass sql commands to sqlline via a file, it would be a 
welcome addition to pass commands not wrapped in a file in addition to sqlfile.
{code:java}
/opt/phoenix/bin/sqlline.py localhost sqlfile
Setting property: [incremental, false]
Setting property: [isolation, TRANSACTION_READ_COMMITTED]
Setting property: [run, sqlfile]
issuing: !connect jdbc:phoenix:localhost none none 
org.apache.phoenix.jdbc.PhoenixDriver
Connecting to jdbc:phoenix:localhost
19/07/18 14:41:24 WARN util.NativeCodeLoader: Unable to load native-hadoop 
library for your platform... using builtin-java classes where applicable
Connected to: Phoenix (version 4.14)
Driver: PhoenixEmbeddedDriver (version 4.14)
Autocommit status: true
Transaction isolation: TRANSACTION_READ_COMMITTED
Building list of tables and columns for tab-completion (set fastconnect to true 
to skip)...
134/134 (100%) Done
Done
1/1 !quit
Closing: org.apache.phoenix.jdbc.PhoenixConnection
sqlline version 1.2.0


/opt/phoenix/bin/sqlline-thin.py localhost sqlfile
Failed to find hbase executable on PATH, defaulting serialization to PROTOBUF.
Setting property: [incremental, false]
Setting property: [isolation, TRANSACTION_READ_COMMITTED]
Setting property: [run, sqlfile]
issuing: !connect 
jdbc:phoenix:thin:url=http://localhost:8765;serialization=PROTOBUF none none 
org.apache.phoenix.queryserver.client.Driver
Connecting to jdbc:phoenix:thin:url=http://localhost:8765;serialization=PROTOBUF
Connected to: Apache Phoenix (version unknown version)
Driver: Phoenix Remote JDBC Driver (version unknown version)
Autocommit status: true
Transaction isolation: TRANSACTION_READ_COMMITTED
Building list of tables and columns for tab-completion (set fastconnect to true 
to skip)...
134/134 (100%) Done
Done
1/1 !quit
Closing: 
org.apache.phoenix.shaded.org.apache.calcite.avatica.AvaticaJdbc41Factory$AvaticaJdbc41Connection
sqlline version 1.2.0{code}



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)

Reply via email to