Destinations
Connect ClickHouse as a destination
Create a ClickHouse service account, copy your address from ClickHouse Cloud, and connect ClickHouse to an Artie pipeline as a destination.
You need a ClickHouse service before you start. For ClickHouse Cloud, follow the ClickHouse Cloud Quick Start.
Required settings
Artie asks for these four values. Each field name matches its label in the Artie dashboard.
| Field | What to enter |
|---|---|
| Address | The host and port of your ClickHouse service, as host:port. See Find the address. |
| Username | The service account user, artie in the service account script. |
| Password | The service account password. |
| Database name | The database Artie writes to. |
Create a service account
In ClickHouse, run this script to create the user Artie writes with:
CREATE USER artie IDENTIFIED BY '<password>';
-- Replace <database> with your desired destination database.
GRANT CREATE TABLE,
ALTER ADD COLUMN,
ALTER MODIFY COLUMN,
ALTER DROP COLUMN,
INSERT,
DROP TABLE
ON <database>.* TO artie;Replace <password> with the password for the user, and <database> with your destination database.
To let Artie create the destination database, grant that permission separately:
GRANT CREATE DATABASE ON *.* TO artie;If your ClickHouse server has table_engines_require_grant=1, grant the table engines Artie uses:
GRANT TABLE ENGINE ON MergeTree TO artie;
GRANT TABLE ENGINE ON ReplacingMergeTree TO artie;If your ClickHouse server has access_control_improvements.select_from_system_db_requires_grant=1, also grant the metadata reads Artie uses:
GRANT SELECT ON system.databases TO artie;
GRANT SELECT ON system.tables TO artie;
GRANT SELECT ON system.columns TO artie;Find the address
In ClickHouse Cloud, set Connect with to Go, then copy the address highlighted in this image:

The address must end with a numeric port, for example abc123.us-east-1.aws.clickhouse.cloud:9440. Artie connects with TLS. In ClickHouse Cloud, the Go connection details show the secure native port, 9440.
Add ClickHouse to a pipeline
When you create a pipeline, the Destination section of the setup has these steps.
Choose the destination
In Choose destination, select ClickHouse.
Run the service account script
Prepare destination shows the script from Create a service account. Run it in ClickHouse, then select Continue.
When the pipeline reuses an existing ClickHouse connector, this step is already marked done and Next passes it.
Enter the connection details
In Connect and verify, enter Address, Username and Password.
Choose the database
In Database name, select the database Artie writes to.
To create a database, type its name and select Create “NAME”, where
NAMEis the name you typed. In the Add a new database dialog, select Create database. This needs theCREATE DATABASEgrant.Verify the destination
Select Verify destination. Artie shows “Destination verified”.
If you haven’t chosen tables yet, the button reads Test connection. A passing test shows “Connection works. Choose tables to finish verifying the destination.”
The setup has no Network access step for ClickHouse, because ClickHouse destinations don’t support SSH tunnels.
To change these settings on an existing pipeline, select Edit pipeline, then open the Destination: ClickHouse tab.
What Artie creates
Artie creates its destination tables in the database you chose and writes every change as an inserted row.
| Table type | Engine |
|---|---|
| Replicated table | ReplacingMergeTree(__artie_updated_at, __artie_delete) |
| History mode table | MergeTree() ORDER BY __artie_updated_at |
Both engines use __artie_updated_at, so a ClickHouse pipeline needs Add ‘Artie updated at’ column turned on. It’s on by default. With it off, the pipeline fails to start. You can’t rename the column for ClickHouse.
Artie adds __artie_delete to every replicated table as a UInt8 column. Both columns are described in System columns.
Data types
Artie maps its own types to these ClickHouse types. Artie’s typing library covers how source types become Artie types.
| Artie type | ClickHouse type |
|---|---|
| Float, double | Float64 |
| Small integer | Int16 |
| Integer | Int32 |
| Big integer, or an integer of unknown size | Int64 |
| Decimal with a precision up to 76 | DECIMAL(precision, scale) |
| Decimal with a higher or unknown precision | String |
| Boolean | Bool |
| Date | Date |
| Timestamp, with or without a time zone | DateTime64(6) |
| Time, interval, UUID, string | String |
| Array | Array(String) |
| Struct or JSON | JSON |
Artie converts timestamps that have a time zone to UTC. A null array is stored as an empty array, and a null JSON value as {}.
Was this page helpful?
- Need help? Message us on Slack or email [email protected].
- Want a walkthrough? Book a demo.
- LLM? Read llms.txt.