Skip to main content

Native

Connecting via API

The following shows the means of connecting to Kinetica via the various APIs available.

HTTP Connections

#include "gpudb/GPUdb.hpp"

gpudb::GPUdb::Options options = gpudb::GPUdb::Options();
options.setUsername("<username>");
options.setPassword("<password>");

gpudb::GPUdb kinetica("http://<db.host>:9191", options);

HTTPS Connections with Certificate Validation

#include "gpudb/GPUdb.hpp"

gpudb::GPUdb::Options options = gpudb::GPUdb::Options();
options.setUsername("<username>");
options.setPassword("<password>");

gpudb::GPUdb kinetica("https://<db.host>:8082/gpudb-0", options);

HTTPS Connections without Certificate Validation

Using these setups, no certificate validation of any kind will be performed; not recommended for production deployments.To bypass certificate checks in JDBC, see Secure Connections. To bypass certificate checks in KiSQL, see Parameterized Options.
import com.gpudb.GPUdb;

GPUdb.Options options = new GPUdb.Options()
    .setBypassSslCertCheck(true)
    .setUsername("<username>")
    .setPassword("<password>");

GPUdb kinetica = new GPUdb("https://<db.host>:8082/gpudb-0", options);

HTTPS Connections with OIDC/OAuth Authentication

#include "gpudb/GPUdb.hpp"

gpudb::GPUdb::Options options = gpudb::GPUdb::Options();
options.setOauthToken("<oauthToken>");

gpudb::GPUdb kinetica("https://<db.host>:8082/gpudb-0", options);

Compatibility Matrix

The following chart shows the version compatibilities between the various APIs and a target database server. While only the major & minor version numbers (6.2, 7.0, 7.1, 7.2) must match to achieve interoperability, the complete feature set for a given database version can only be utilized via the corresponding API version, depicted below.
DatabaseC++C#JavaJavascriptNode.jsPython
6.26.2.*6.2.*6.2.*6.2.*6.2.*6.2.*
7.0.X7.0.X7.0.X7.0.X7.0.X7.0.X7.0.X
7.1.X7.1.X7.1.X7.1.X7.1.X7.1.X7.1.X
7.2.X7.2.X7.2.X7.2.X7.2.X7.2.X7.2.X

Dynamic Schemas

When working with APIs, it is helpful to have an understanding of how data is returned by the database. For a detailed breakdown in Java & Python, see Dynamic Schemas.