ClickHouse database connector

Easily connect to your ClickHouse Server with Pecan, so you can create models using your existing data.

Ori Sagi avatar
Written by Ori Sagi
Updated over a week ago

ClickHouse is an open-source column-oriented DBMS (columnar database management system) for online analytical processing (OLAP) that allows users to generate analytical reports using SQL queries in real-time.

You'll need to provide certain details and credentials so that Pecan can access the relevant data in ClickHouse. If you need help with the below steps, be sure to consult with your internal IT or DevOps team.

Prerequisite steps

  1. First, make sure you whitelist these Pecan IP addresses:

  2. Before you add a ClickHouse connection, if you haven’t already, you’ll need to create a role with Read and Write permissions so that Pecan can access your server.

How to configure a ClickHouse Server connection

  1. Log in to Pecan, select the “Connections” tab, and click Add connection.

Select “ClickHouse” and complete the following fields:

  • Connection name – This is how you’ll identify the connection when creating and working with models on the platform. Names should be unique and reflect the data source and what’s stored in it. Valid characters include letters, numbers, and underscores. Connection names can’t be changed once created. Example: “clickhouse_paid_downloads_fall_2021”

  • Connection type – Select "Read" if the connection will be used to import data into Pecan. Select "Write" if it will be used to export predictions from Pecan to your Microsoft SQL Server.

  • Hostname – this is the address that provides remote access to your server.

  • Port – Provide the connection port for your server. If you leave this blank, Pecan will automatically use the default port 8123.

  • Use SSL - Check if your ClickHouse accepts encrypted connections via SSL protocol. This way, Pecan can configure the connection accordingly.

  • Database name – this is the name of the database Pecan should use. Servers can hold many different databases; if you want to use multiple databases to create models in Pecan, but they sit on the same server, you’ll need to create a new connection for each database.

  • Username and Password - these credentials are for the account that will enable Pecan to access your server.

3. Now, click Test connection to make sure everything is working correctly. Then click Create connection to complete the setup (for more information, see here).

Did this answer your question?