Connecting Mitzu to ClickHouse

[Edit this page](https://github.com/ClickHouse/clickhouse-docs/blob/main/docs/integrations/data-visualization/community_integrations/mitzu-and-clickhouse.md)

Community Maintained

Mitzu is a no-code, warehouse-native product analytics application. Similar to tools like Amplitude, Mixpanel, and PostHog, Mitzu empowers users to analyze product usage data without requiring SQL or Python expertise.

However, unlike these platforms, Mitzu doesn't duplicate the company's product usage data. Instead, it generates native SQL queries directly on the company's existing data warehouse or lake.

## Goal[​](#goal "Direct link to Goal")

In this guide, we're going to cover the following:

- Warehouse-native product analytics
- How to integrate Mitzu to ClickHouse

Example datasets

If you don't have a data set to use for Mitzu, you can work with NYC Taxi Data.
This dataset is available in ClickHouse Cloud or [can be loaded with these instructions](/docs/getting-started/example-datasets/nyc-taxi).

This guide is just a brief overview of how to use Mitzu. You can find more detailed information in the [Mitzu documentation](https://docs.mitzu.io/).

## 1. Gather your connection details[​](#1-gather-your-connection-details "Direct link to 1. Gather your connection details")

To connect to ClickHouse with HTTP(S) you need this information:

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| Parameter(s) Description|  |  |  |  |  |  | | --- | --- | --- | --- | --- | --- | | `HOST` and `PORT` Typically, the port is 8443 when using TLS or 8123 when not using TLS.|  |  |  |  | | --- | --- | --- | --- | | `DATABASE NAME` Out of the box, there is a database named `default`, use the name of the database that you want to connect to.| `USERNAME` and `PASSWORD` Out of the box, the username is `default`. Use the username appropriate for your use case. | | | | | | | |

The details for your ClickHouse Cloud service are available in the ClickHouse Cloud console.
Select a service and click **Connect**:

Choose **HTTPS**. Connection details are displayed in an example `curl` command.

If you're using self-managed ClickHouse, the connection details are set by your ClickHouse administrator.

## 2. Sign in or sign up to Mitzu[​](#2-sign-in-or-sign-up-to-mitzu "Direct link to 2. Sign in or sign up to Mitzu")

As a first step, head to <https://app.mitzu.io> to sign up.

## 3. Configure your workspace[​](#3-configure-your-workspace "Direct link to 3. Configure your workspace")

After creating an organization, follow the `Set up your workspace` onboarding guide in the left sidebar. Then, click on the `Connect Mitzu with your data warehouse` link.

## 4. Connect Mitzu to ClickHouse[​](#4-connect-mitzu-to-clickhouse "Direct link to 4. Connect Mitzu to ClickHouse")

First, select ClickHouse as the connection type and set the connection details. Then, click the `Test connection & Save` button to save the settings.

## 5. Configure event tables[​](#5-configure-event-tables "Direct link to 5. Configure event tables")

Once the connection is saved, select the `Event tables` tab and click the `Add table` button. In the modal, select your database and the tables you want to add to Mitzu.

Use the checkboxes to select at least one table and click on the `Configure table` button. This will open a modal window where you can set the key columns for each table.

  
> To run product analytics on your ClickHouse setup, you need to > specify a few key columns from your table.
>
> These are the following:
>
> - **User id** - the column for the unique identifier for the users.
> - **Event time** - the timestamp column of your events.
> - Optional[**Event name**] - This column segments the events if the table contains multiple event types.

  

Once all tables are configured, click on the `Save & update event catalog` button, and Mitzu will find all events and their properties from the above-defined table. This step may take up to a few minutes, depending on the size of your dataset.

## 4. Run segmentation queries[​](#4-run-segmentation-queries "Direct link to 4. Run segmentation queries")

User segmentation in Mitzu is as easy as in Amplitude, Mixpanel, or PostHog.

The Explore page has a left-hand selection area for events, while the top section allows you to configure the time horizon.

  

Filters and Breakdown

Filtering is done as you would expect: pick a property (ClickHouse column) and select the values from the dropdown that you want to filter.
You can choose any event or user property for breakdowns (see below for how to integrate user properties).

## 5. Run funnel queries[​](#5-run-funnel-queries "Direct link to 5. Run funnel queries")

Select up to 9 steps for a funnel. Choose the time window within which your users can complete the funnel.
Get immediate conversion rate insights without writing a single line of SQL code.

  

Visualize trends

Pick `Funnel trends` to visualize funnel trends over time.

## 6. Run retention queries[​](#6-run-retention-queries "Direct link to 6. Run retention queries")

Select up to 2 steps for a retention rate calculation. Choose the retention window for the recurring window for
Get immediate conversion rate insights without writing a single line of SQL code.

  

Cohort retention

Pick `Weekly cohort retention` to visualize how your retention rates change over time.

## 7. Run journey queries[​](#7-run-journey-queries "Direct link to 7. Run journey queries")

Select up to 9 steps for a funnel. Choose the time window within which your users can finish the journey. The Mitzu journey chart gives you a visual map of every path users take through the selected events.

  

Break down steps

You can select a property for the segment `Break down` to distinguish users within the same step.

  

## 8. Run revenue queries[​](#8-run-revenue-queries "Direct link to 8. Run revenue queries")

If revenue settings are configured, Mitzu can calculate the total MRR and subscription count based on your payment events.

## 9. SQL native[​](#9-sql-native "Direct link to 9. SQL native")

Mitzu is SQL Native, which means it generates native SQL code from your chosen configuration on the Explore page.

  

Continue your work in a BI tool

If you encounter a limitation with Mitzu UI, copy the SQL code and continue your work in a BI tool.

## Mitzu support[​](#mitzu-support "Direct link to Mitzu support")

If you're lost, feel free to contact us at [[email protected]](email://support@mitzu.io)

Or you our Slack community [here](https://join.slack.com/t/mitzu-io/shared_invite/zt-1h1ykr93a-_VtVu0XshfspFjOg6sczKg)

## Learn more[​](#learn-more "Direct link to Learn more")

Find more information about Mitzu at [mitzu.io](https://mitzu.io)

Visit our documentation page at [docs.mitzu.io](https://docs.mitzu.io)

- [Goal](#goal)- [1. Gather your connection details](#1-gather-your-connection-details)- [2. Sign in or sign up to Mitzu](#2-sign-in-or-sign-up-to-mitzu)- [3. Configure your workspace](#3-configure-your-workspace)- [4. Connect Mitzu to ClickHouse](#4-connect-mitzu-to-clickhouse)- [5. Configure event tables](#5-configure-event-tables)- [4. Run segmentation queries](#4-run-segmentation-queries)- [5. Run funnel queries](#5-run-funnel-queries)- [6. Run retention queries](#6-run-retention-queries)- [7. Run journey queries](#7-run-journey-queries)- [8. Run revenue queries](#8-run-revenue-queries)- [9. SQL native](#9-sql-native)- [Mitzu support](#mitzu-support)- [Learn more](#learn-more)

Was this page helpful?