Connecting
KiSQL
KiSQL is a Kinetica JDBC-based SQL CLI client that is available on GitHub. Details can be found on the Kinetica SQL (KiSQL) page.JDBC Applications
Java applications which use JDBC can reference the Kinetica JDBC driver in the Maven Central Repository as apom.xml dependence:
Dependency
JDBC Clients
JDBC connections require the Kinetica JDBC driver. Acquire the JDBC client JAR,kinetica-jdbc-7.2.<X>.<Y>-jar-with-dependencies.jar, from either:
- the JDBC Client Project on GitHub
- under
/opt/gpudb/connectors/jdbcon default Kinetica installations
- Driver: <point to the downloaded JAR file>
- Connection String:
- Class Name:
com.kinetica.jdbc.Driver
Secure Connections
When connecting to a Kinetica instance over HTTPS, the connection string should reference the database’s secure address. Set the URL parameter on the JDBC connection string to use the HTTPS-enabled database endpoint.Failover Connections
When connecting to a Kinetica instance with one or more failover clusters, the connection string should be updated to contain a comma-delimited list of head node addresses for all clusters. The URL of the primary cluster can also be specified. Add a URL parameter to the JDBC connection string to contain all cluster head node addresses and add a PrimaryURL parameter designating the cluster that should be tried first.ODBC
The ODBC Client must be installed for the environment in which it will be used. The following sections will detail how to install & configure the client in Windows. Kinetica provides both a 32-bit & 64-bit Windows ODBC Client driver. The 32-bit version of Windows requires the 32-bit driver. The 64-bit version of Windows can use either the 32-bit or 64-bit driver, or both, as needs warrant. For instance, a user running 64-bit Windows and wanting to make ODBC connections to Kinetica from a 32-bit version of Excel will need the 32-bit driver. A user with the same OS using the 64-bit Tableau will need the 64-bit driver. A user wanting to use both will need both drivers.- Download & install the ODBC Client for Windows following the instructions provided there
- Launch ODBC Data Source Administrator (64-bit or 32-bit, as needed)
- Click the System DSN tab
- Click the Add button to add a DSN
- Choose Kinetica ODBC Client, and click Finish
-
Fill in the DSN Setup parameters
(the following settings are examples - you may have to change some for your environment):
- Description:
Kinetica - URL:
- Leave User and Password blank
- Description:
- Click OK
Secure Connections
When connecting to a Kinetica instance over HTTPS, the connection string should reference the database’s secure address. Set the URL parameter to use the HTTPS-enabled database endpoint.Failover Connections
When connecting to a Kinetica instance with one or more failover clusters, the connection string should be updated to contain a comma-delimited list of head node addresses for all clusters. The URL of the primary cluster can also be specified. Modify the URL parameter to contain all cluster head node addresses and add a PrimaryURL parameter designating the cluster that should be tried first. URL:Tableau
- Install the ODBC Client - see ODBC Installation above
-
In Tableau, connect to Other Databases (ODBC)
-
DSN:
Kinetica - Click Connect
- Click Sign In
-
Database:
KINETICA -
Schema: <choose one>
- To use the user’s default schema, don’t choose a schema (leave as Select Schema)
- Pick your table
-
DSN:
Tableau may give a warning about not all features being supported
by the ODBC driver; this should be able to be safely ignored for most
applications.
Excel
- Install the ODBC Client - see ODBC Installation above
- In Excel, click the Data tab at the top
- Click the Get External Data > From Other Sources button, then click From Data Connection Wizard
- In the Connection Wizard, choose ODBC DSN and click Next >
- Select one of the ODBC data sources (i.e., DSNs) you created above (e.g., Kinetica), and click Next >
- Continue with the wizard to create a link to all the tables or a specific table, and save an ODC file, etc.
- Click the Finish button
- In Excel, click the Data tab at the top
- Click Get External Data > Existing Connections
- Choose the ODC file you created above, and click Open
- Select a Table to import
- Select where you want the data to appear, and click the OK button
DBeaver
- Acquire the JDBC Driver
- Download & install DBeaver
-
Configure DBeaver with the Kinetica JDBC driver
- On the Database menu, select Driver Manager
- Click New to create a new driver connection
-
Complete the driver configuration page:
- Driver Name:
Kinetica - Class Name:
com.kinetica.jdbc.Driver
- Driver Name:
-
Click the Libraries tab; then click
Add File and select the downloaded JAR:
- Click OK
- Click Close to exit Driver Manager
-
Configure a connection:
- On the File menu, select New
- Ensure that Database Connection is selected and click Next >
- Select Kinetica and click Next >
-
Click Connection Details and name the connection
- Connection name: name for the connection
- Click Back
-
Complete the connection configuration
- JDBC URL:
-
Enter authentication credentials
-
Username/password style authentication
- Username: name of connecting user
(
adminfor database administrator connection) - Password: password for connecting user
- Username: name of connecting user
(
-
OIDC/OAuth style authentication
-
Disable username/password auth
- Save password: check this box, leaving Username & Password blank
- Click the Driver Properties tab
-
Enter OAuth credentials
- OAuthToken: OAuth token to use for authentication
-
Disable username/password auth
-
Username/password style authentication
- Click Finish to complete the connection configuration
Other JDBC Clients
For other clients, see JDBC Applications for the general setup to use.ODBC/JDBC Configuration
Unless noted, the configuration parameters are the same for ODBC & JDBC, though the locations of the configurations are not.- Windows ODBC - Settings are stored in the registry in HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBC.INI\<DSN NAME>
- JDBC - Settings are passed on the connection string, separated by semicolons; e.g.:
Standard Parameters
Server Override Parameters
The following are optional parameters that could be used to override the default settings, which are set by the server. See the Configuration Reference for more information on configuring the SQL Engine server-side. The default value for each of these options is0.
Client Parameters
The following optional parameters may be used to change the ODBC/JDBC Client behavior.SSL Parameters
The following optional parameters should be used when connecting over SSL.Logging
Kinetica logs inbound SQL requests, internal calls made on behalf of those requests, and other debugging information. These logs can be found in the following log files:- /opt/gpudb/core/logs/host-manager-<hostname>-<datetime>.log: Contains
all endpoint calls, including the initial call to
/execute/sqland any endpoint calls made as a result of servicing the request - /opt/gpudb/sql/logs/sql-engine-<kinetica-hostname>.log: Contains detailed error messages