Join us at Microsoft Ignite in Chicago, Nov 19-21. Booth 614! ->->
  • Install dbt-core and dbt-clickhouse

    pip install dbt-clickhouse
    
  • Provide dbt with the connection details for our ClickHouse instance. The full list of connection configuration options is available here. Configure clickhouse_cloud profile in ~/.dbt/profiles.yml file and provide user, password, schena host properties:

    clickhouse_cloud:
      target: dev
      outputs:
        dev:
          type: clickhouse
          schema: <target_schema>
          host: <host>
          port: 8443 # use 9440 for native
          user: default
          password: <password>
          secure: True
    
  • Create a dbt project:

    dbt init project_name
    
  • Inside project_name dir, update your dbt_project.yml file to specify a profile name to connect to the ClickHouse server.

    profile: 'clickhouse_cloud'
    
  • Execute dbt debug with the CLI tool to confirm whether dbt is able to connect to ClickHouse.
    Confirm the response includes Connection test: [OK connection ok] indicating a successful connection.

Other integrations

Get started with ClickHouse Cloud for free

We'll get you started on a 30 day trial and $300 credits to spend at your own pace.