You need to launch the Apache Phoenix thin client before connecting to the Phoenix
Query Server (PQS). Learn to use the command that launches the Apache Phoenix thin
client.
-
Log in to the terminal.
-
Run the following command to launch the Apache Phoenix thin client.
phoenix-sqlline-thin
<url>
<sqlfile>
<optional_arguments>
- url: The URL to the Phoenix Query Server.
- sqlfile: A file of the SQL commands to execute.
Optional arguments |
Description |
-a
(--authentication ) |
Mechanism for HTTP authentication. Possible
values: The default value is NONE. |
-s
(--serialization ) |
Serialization type for HTTP API. Possible
values: (Must match server setting) |
-au
(--auth-user ) |
Username for HTTP authentication. |
-ap
(--auth-password ) |
Password for HTTP authentication. |
-p (--pricipal ) |
Kerberos principal for SPNEGO authentication from
keytab. |
-kt (--keytab ) |
Kerberos keytab file for SPNEGO authentication from
keytab. |
-t
(--truststore ) |
Truststore file that contains the TLS certificate of the
server. |
-tp
(--truststore-password ) |
Password of the truststore file that contains the TLS
certificate of the server. |
-v (--verbose ) |
Verbosity setting for sqlline. |
-c (--color ) |
Color setting for sqlline. |
-fc
(--fastconnect ) |
Do not fetch all schemas on initial connection (for
sqlline). |
Use the following command to connect to an unsecured server.
phoenix-sqlline-thin http://unsecure.server:8765
Use the following command to connect to a secure Kerberized server.
phoenix-sqlline-thin https://secure.server:8765 -a SPNEGO --principal user -kt /path/to/user.kt - t /path/to/truststore -kt trustsore_passsord
Use the following command to connect through Knox with BASIC authentication.
phoenix-sqlline-thin https://konx.host:8765/avatica -a BASIC --au knox_user user -ap konx_password - t /path/to/truststore -kt trustsore_passsord