PostgreSQL Wire Protocol

Kinetica has support for PostgreSQL Wire Protocol connections. PostgreSQL simple query syntax is fully supported, while PostgreSQL extended query syntax support will be coming soon.

Connecting

Point any client able to make use of PostgreSQL Wire Protocol at Kinetica on port 5432 to connect.

PSQL

PSQL is a PostgreSQL CLI for connecting over PostgreSQL Wire Protocol.

Specify the -d option to make ki_home the default home directory, if needed, as the default will be automatically set to the username by PSQL.

Connect
1
psql -h <azure.cluster.name>.<azure.region>.cloudapp.azure.com -U <username> -d ki_home
SELECT
1
=> SELECT * FROM example.vehicle;
Inspect
1
2
3
4
 id |  make   |      model
----+---------+------------------
 1  | Cord    | 812
 2  | Bugatti | La Voiture Noire

Psycopg

Psycopg is a Python library for connecting over PostgreSQL Wire Protocol.

Specify the dbname option to make ki_home the default home directory, if needed, as the default will be automatically set to the username by Psycopg.

Connect
1
2
>>> import psycopg2
>>> conn = psycopg2.connect(host="<azure.cluster.name>.<azure.region>.cloudapp.azure.com", user="<username>", password="<password>", dbname="ki_home")
SELECT
1
2
3
>>> cur = conn.cursor()
>>> cur.execute("SELECT * FROM example.vehicle")
>>> cur.fetchall()
Inspect
1
[('1', 'Cord', '812'), ('2', 'Bugatti', 'La Voiture Noire')]