Skip to main content

Connection details


To connect a client, you must create a Propel Application and give it the DATAPOOL_QUERY scope.

ClickHouse clients and SDKs

ClickHouse HTTPS interface

The official HTTPS interface.

Python

The official Python client.

JavaScript

The official JavaScript client.

Go

The official Golang client.

Java

The official Java client.

Rust

The official Rust client.

ClickHouse HTTPS interface

The ClickHouse HTTPS interface provides a simple way to query Propel’s Serverless ClickHouse using HTTP requests. Since it uses standard HTTP, you can use it with:
  • Any programming language with HTTP support
  • Command line tools like cURL
  • API testing tools like Postman
To connect, send POST requests to this endpoint:

Python

To get started with the ClickHouse Python client:
1

Install the package

2

Import and create a client

3

Execute queries

Make sure to set the APPLICATION_ID and APPLICATION_SECRET environment variables before running the application. For more detailed documentation, refer to the ClickHouse Python client documentation.

JavaScript

The official JS client. It’s written in TypeScript and provides type definitions and has zero dependencies. Two versions are available:
  • @clickhouse/client for Node.js
  • @clickhouse/client-web for browsers and Cloudflare workers
To get started with the ClickHouse JS client:
1

Install the package

2

Import and create a client

If your environment doesn’t support ESM modules, you can use CommonJS syntax:
3

Execute queries

When using TypeScript, at least version 4.5+ is required.
Make sure to set the APPLICATION_ID and APPLICATION_SECRET environment variables before running the application. ClickHouse JS supports various query formats, data streaming, and advanced features like query cancellation and custom settings. For more detailed documentation, refer to the ClickHouse JS client documentation.

Go

To get started with the ClickHouse Go client:
1

Install the ClickHouse Go driver

2

Import and create a connection

3

Execute queries

Make sure to set the APPLICATION_ID and APPLICATION_SECRET environment variables before running the application. For more detailed documentation, refer to the ClickHouse Go driver documentation.

Java

To get started with the ClickHouse Java client:
1

Add the dependency

2

Connect to the database

3

Execute queries

Make sure to set the APPLICATION_ID and APPLICATION_SECRET environment variables before running the application. For more detailed documentation, refer to the ClickHouse Java client documentation.

Rust

To get started with the ClickHouse Rust client:
1

Add the dependency

2

Create a client instance

3

Execute queries

For more details about query execution:
  • The ?fields placeholder is replaced with the fields specified in the Row struct (no, name in the example above).
  • The ? placeholders are replaced with values from subsequent bind() calls in order.
  • Convenience methods fetch_one::<Row>() and fetch_all::<Row>() are available to get a single row or all rows.
  • Use sql::Identifier to safely bind table names.
For more detailed documentation, refer to the ClickHouse Rust client documentation.

PostgreSQL clients and SDKs

psql

The official PostgreSQL CLI.

Postgres.js

A full-featured client for Node.js.

psql (PostgreSQL CLI)

To get started with the PostgreSQL CLI, psql, follow the steps below.
After a successful connection, you can make the query below.

Postgres.js

To get started with the Postgres.js client:
1

Install the package

2

Create connection file

3

Set environment variables

Create APPLICATION_ID and APPLICATION_SECRET environment variables with your actual credentials.
4

Execute queries