--url to specify multiple
failover URLs for HA./opt/gpudb/bin/kisql on
default installations.
KiSQL exposes the complete Kinetica SQL interface, as given in the
SQL section, including:
- Ingestion of local file data into tables (INSERT INTO … SELECT … FROM FILE)
- Uploading of local files into the Kinetica File System (KiFS) for later ingestion (UPLOAD FILE)
- Downloading of Kinetica File System (KiFS) files to local storage (DOWNLOAD FILE)
Connecting
KiSQL can be accessed via command line askisql. The only required
parameter to connect is one of --host, --url, or --connectionString;
alternatively, the KI_HOST or KI_URL environment variable can be used to
set the target database server.
If --user is specified, KiSQL will perform username/password
authentication with the passed username; alternatively, the KI_USER
environment variable can be used to pass the username. KiSQL, when performing
username/password authentication, will prompt for the password; alternatively,
the KI_PWD environment variable can be used to set the password.
If --token is specified, KiSQL will perform OIDC-based authentication with
the passed OAuth token; alternatively, the KI_OAUTH_TOKEN environment
variable can be used to pass the OAuth token.
If --trustStore is specified, KiSQL will prompt for the trust store
password; alternatively, the KI_TRUSTSTOREPWD environment variable can be
used to set the password.
KiSQL can connect to Kinetica either by passing a URL and these
authentication parameters on the command line or by passing a JDBC connection
string containing the corresponding parameters.
Regardless of which style is used, the remainder of the parameters should be
appended to the specified connection URL. See ODBC/JDBC Configuration for
the full list.
Parameterized Options
JDBC Connection String
Parameters
Connection Parameters
< -h | --host > <hostname>
< -h | --host > <hostname>
KI_HOST environment variable.< -p | --port > <port number>
< -p | --port > <port number>
KI_JDBCPORT environment variable.
If not specified, default is 9191.--url <Kinetica URL>
--url <Kinetica URL>
http://localhost:9191;RowsPerFetch=20000. Overrides --host &
--port. This can also be specified by the KI_URL environment variable.
See Secure Connections for specifying SSL connections and Failover Connections
for specifying HA connections.--connectionString '<JDBC URL>'
--connectionString '<JDBC URL>'
jdbc:kinetica://localhost:9191;RowsPerFetch=20000. Overrides --host,
--port, --url, & primaryUrl; will not override other parameters specified on the command line.
See ODBC/JDBC Configuration for the JDBC connection string format and the full list of options able to be
specified through it.UID or PWD specified in the connection string will be ignored; use --user or the
KI_USER & KI_PWD environment variables instead.--primaryUrl <Kinetica URL>
--primaryUrl <Kinetica URL>
--user <user ID>
--user <user ID>
KI_USER environment variable.--user is left blank and authentication is disabled,
KiSQL will connect using the Anonymous default user. Review
Security Concepts for more information on default users.--token <OAuth token>
--token <OAuth token>
KI_OAUTH_TOKEN environment
variable.--tokenNameClaim <claim>
--tokenNameClaim <claim>
sub.--trustStore <filepath>
--trustStore <filepath>
KI_TRUSTSTORE environment variable. See the HTTPD + SSL setup instructions
sections for more information on setting up a TrustStore and setting up ODBC for secure connections.--bypassSslCertCheck [<value>]
--bypassSslCertCheck [<value>]
value, the
default is not to validate the certificate.< --s | --schema > <schema name>
< --s | --schema > <schema name>
schema name as the default schema for all object references; effectively, issuing a
SET CURRENT SCHEMA command at the beginning of the session.--disableAutoDiscovery
--disableAutoDiscovery
--disableFailover
--disableFailover
--disableSnappy
--disableSnappy
Input Parameters
< -f | --file > <file path>
< -f | --file > <file path>
--lineMode is specified, in which case each line of the file will be treated as a separate SQL statement.< --line | --lineMode >
< --line | --lineMode >
--sql '<SQL statements>'
--sql '<SQL statements>'
Output Parameters
--debug [<value>]
--debug [<value>]
value is true.--delim '<delimiter>'
--delim '<delimiter>'
--format parameter must be
present and set to delim / delimited. Any alphanumeric character or symbol is a valid delimiter. If
not specified, default is a comma.--echoSql [<value>]
--echoSql [<value>]
value is true.--format <format>
--format <format>
table. Valid format options
include:| Format | Description |
|---|---|
delim delimited | Uses the delimiter specified with —delim (or the default delimiter) to output records in CSV-style format, including a header row with the corresponding column names. The output will not be escaped according to the data values and delimiter used. Be sure to select a delimiter not found within any data being output. Example Delimited Output |
table | Outputs records in an ASCII table format. Example Table Output |
vertical | Outputs each record as a vertical list of key/value pairs. Example Vertical Output |
< -i | --isql >
< -i | --isql >
--limit <record count>
--limit <record count>
-1 for no limit.
If not specified, default is -1.--logLevel <level>
--logLevel <level>
0 (off). Valid level options include:| Level | Description |
|---|---|
0 | Off |
1 | Fatal |
2 | Error |
3 | Warning |
4 | Info |
5 | Debug |
6 | Trace |
--showTime [<value>]
--showTime [<value>]
value is true.--stopOnFirstError
--stopOnFirstError
--file option), stop on the first error encountered.< -tz | --timeZone > <time zone ID>
< -tz | --timeZone > <time zone ID>
PST). Use system for
local system time. If not specified, default is UTC.--verbose [<value>]
--verbose [<value>]
value is true.Information Parameters
--listAllTimeZones
--listAllTimeZones
--version
--version
< -? | --help >
< -? | --help >
Interactive Mode
If neither--sql nor -f / --file are specified while using KiSQL
from the command line interface, KiSQL will run in interactive mode. In
interactive mode, a ; terminates and executes SQL statements, unless
--lineMode is used to modify that behavior. If standard input has been
redirected, no prompt is issued and SQL statements are read from stdin.
KiSQL supports arrow key based traversal of the command execution history,
and editing/re-execution of these commands.
The following commands can be used at the beginning of a statement while in
interactive mode:
< \c | \counts > [<schema> [<table>]]
< \c | \counts > [<schema> [<table>]]
schema is given, only show record counts of accessible tables in that
schema.If schema & table are given, only show the record count of that table, if
accessible.< \e | \edit > [entry number]
< \e | \edit > [entry number]
1 being the least recent entry), invoke vi
editor on specific query by number from the history. Upon exiting the editor, the
statement will be executed.< \f | \format > <type>
< \f | \format > <type>
--format parameter
description above.< \h | \history >
< \h | \history >
< \i | \indices > [<schema> [<table>]]
< \i | \indices > [<schema> [<table>]]
schema is given, only show accessible indices of tables in that schema.If schema & table are given, only show accessible indices of tables in
that schema.< \k | \primaryKeys > [<schema> [<table>]]
< \k | \primaryKeys > [<schema> [<table>]]
schema is given, only show accessible primary key columns of tables in
that schema.If schema & table are given, only show accessible primary key columns of
that table.< \m | \metadata >
< \m | \metadata >
< \p | \procedures > [<schema> [<procedure>]]
< \p | \procedures > [<schema> [<procedure>]]
schema is given, only show accessible SQL procedures in that schema.If schema & procedure are given, only show that SQL procedure, if
accessible.< \r | \run > [ID]
< \r | \run > [ID]
ID is given, run the command with that ID in the command history (as
enumerated in the history output via \history)< \s | \schemas >
< \s | \schemas >
< \t | \tables > [<schema [<table>]]
< \t | \tables > [<schema [<table>]]
< \u | \columns > [<schema> [<table> [<column>]]]
< \u | \columns > [<schema> [<table> [<column>]]]
schema is given, only show accessible columns from tables/views in that
schema.If schema & table are given, only show accessible columns from that
table/view.If schema, table, & column are given, only show that columns, if
accessible.< \v | \version >
< \v | \version >
- Kinetica database to which KiSQL is connected
- Kinetica JDBC driver used by KiSQL
- Kinetica Java API used by the JDBC driver
< \q | \quit | \exit >
< \q | \quit | \exit >