ClickHouse
This page describes how to integrate WarpStream with ClickHouse, ingest data from WarpStream into ClickHouse, and query the data in ClickHouse.
Last updated
This page describes how to integrate WarpStream with ClickHouse, ingest data from WarpStream into ClickHouse, and query the data in ClickHouse.
Last updated
A video walkthrough can be found below:
WarpStream account - get access to WarpStream by registering here.
ClickHouse account - get access to ClickHouse by registering here.
A WarpStream cluster is up and running.
Obtain the Bootstrap Broker from the WarpStream console by navigating to your cluster and clicking the Connect tab. If you don't have SASL credentials, you can also create a set of credentials from the console.
Store these values as environment variables for easy reference:
Then, if you don't already have an available topic, create one using the WarpStream CLI or in the UI, then follow Step 2:
You should see the following output in your Terminal:
Created topic clickhouse_demo.
Using the WarpStream CLI, produce several messages to your topic:
Note that the WarpStream CLI uses double commas (,,)
as a delimiter between JSON records.
In the ClickHouse dashboard, navigate to "Data sources" and then click "Get started":
Select WarpStream from the list of options:
Fill in the fields using the data you generated in Step 1:
Next, select the incoming data format (JSON or AVRO) and then the topic. For this example, we use JSON format, and we have topics 'products' and 'reviews'. We'll use 'products', and ClickHouse will display a record from the Producer to confirm.
The data is then parsed, and you will then have the opportunity to make additional changes to the table that will be produced:
We now see our WarpStream pipe ingesting data into ClickHouse. Next, select 'SQL Console' in the left-hand navigation to interact with your new ClickHouse table.
We can now take full advantage of ClickHouse's power with WarpStream data. A simple SQL SELECT command is illustrated below:
Congratulations! You've set up a stream processing pipeline between WarpStream and ClickHouse and performed a basic SQL query. This is just the beginning of what you can do.
Next, check out the WarpStream docs for configuring the WarpStream Agent, or review the ClickHouse docs to learn more about what is possible with WarpStream and ClickHouse!