Connect & SDKs
Connect using ClickHouse or PostgreSQL clients and SDKs.
Connection details
Parameter | Value |
---|---|
Host | https://clickhouse.us-east-2.propeldata.com |
Port | 8443 |
Database | propel |
user | Your Propel Application ID |
password | Your Propel Application secret |
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:
Install the package
Import and create a client
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:
Install the package
Import and create a client
If your environment doesn’t support ESM modules, you can use CommonJS syntax:
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:
Install the ClickHouse Go driver
Import and create a connection
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:
Add the dependency
Connect to the database
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:
Add the dependency
Create a client instance
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 subsequentbind()
calls in order. - Convenience methods
fetch_one::<Row>()
andfetch_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
(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:
Install the package
Create connection file
Set environment variables
Create APPLICATION_ID
and APPLICATION_SECRET
environment variables with your actual credentials.
Execute queries
Was this page helpful?