2023-04-17 16:45:47 +02:00
---
title: Clickhouse
2023-05-04 12:37:18 -07:00
slug: /connectors/database/clickhouse
2023-04-17 16:45:47 +02:00
---
# Clickhouse
{% multiTablesWrapper %}
| Feature | Status |
| :----------------- | :--------------------------- |
| Stage | PROD |
| Metadata | {% icon iconName="check" /%} |
| Query Usage | {% icon iconName="check" /%} |
| Data Profiler | {% icon iconName="check" /%} |
| Data Quality | {% icon iconName="check" /%} |
2023-05-19 20:49:27 +05:30
| Lineage | {% icon iconName="check" /%} |
2023-04-17 16:45:47 +02:00
| DBT | {% icon iconName="check" /%} |
| Supported Versions | -- |
| Feature | Status |
| :----------- | :--------------------------- |
2023-05-19 20:49:27 +05:30
| Lineage | {% icon iconName="check" /%} |
2023-04-17 16:45:47 +02:00
| Table-level | {% icon iconName="check" /%} |
| Column-level | {% icon iconName="check" /%} |
{% /multiTablesWrapper %}
In this section, we provide guides and references to use the Clickhouse connector.
Configure and schedule Clickhouse metadata and profiler workflows from the OpenMetadata UI:
2023-04-21 16:05:21 +05:30
- [Clickhouse ](#clickhouse )
- [Requirements ](#requirements )
2023-04-28 07:09:12 -07:00
- [Profiler \& Data Quality ](#profiler-&-data-quality )
- [Usage \& Lineage ](#usage-&-lineage )
2023-04-21 16:05:21 +05:30
- [Metadata Ingestion ](#metadata-ingestion )
- [Service Name ](#service-name )
- [Connection Options ](#connection-options )
- [Metadata Ingestion Options ](#metadata-ingestion-options )
- [Troubleshooting ](#troubleshooting )
- [Workflow Deployment Error ](#workflow-deployment-error )
- [Related ](#related )
2023-04-17 16:45:47 +02:00
2023-07-06 15:11:13 +02:00
{% partial file="/v1.1.0/connectors/ingestion-modes-tiles.md" variables={yamlPath: "/connectors/database/clickhouse/yaml"} /%}
2023-04-17 16:45:47 +02:00
## Requirements
2023-04-21 16:05:21 +05:30
Clickhouse user must grant `SELECT` privilege on `system.*` and schema/tables to fetch the metadata of tables and views.
* Create a new user
* More details https://clickhouse.com/docs/en/sql-reference/statements/create/user
```sql
CREATE USER < username > IDENTIFIED WITH sha256_password BY < password >
```
* Grant Permissions
* More details on permissions can be found here at https://clickhouse.com/docs/en/sql-reference/statements/grant
```sql
-- Grant SELECT and SHOW to that user
-- More details on permissions can be found here at https://clickhouse.com/docs/en/sql-reference/statements/grant
GRANT SELECT, SHOW ON system.* to < username > ;
GRANT SELECT ON < schema_name > .* to < username > ;
```
### Profiler & Data Quality
2023-07-06 15:11:13 +02:00
Executing the profiler workflow or data quality tests, will require the user to have `SELECT` permission on the tables/schemas where the profiler/tests will be executed. More information on the profiler workflow setup can be found [here ](https://docs.open-metadata.org/connectors/ingestion/workflows/profiler ) and data quality tests [here ](https://docs.open-metadata.org/connectors/ingestion/workflows/data-quality ).
2023-04-21 16:05:21 +05:30
### Usage & Lineage
For the usage and lineage workflow, the user will need `SELECT` privilege. You can find more information on the usage workflow [here ](https://docs.open-metadata.org/connectors/ingestion/workflows/usage ) and the lineage workflow [here ](https://docs.open-metadata.org/connectors/ingestion/workflows/lineage ).
2023-04-17 16:45:47 +02:00
## Metadata Ingestion
2023-07-06 15:11:13 +02:00
{% partial
file="/v1.1.0/connectors/metadata-ingestion-ui.md"
variables={
connector: "Clickhouse",
selectServicePath: "/images/v1.1.0/connectors/clickhouse/select-service.png",
addNewServicePath: "/images/v1.1.0/connectors/clickhouse/add-new-service.png",
serviceConnectionPath: "/images/v1.1.0/connectors/clickhouse/service-connection.png",
}
/%}
2023-04-17 16:45:47 +02:00
2023-07-06 15:11:13 +02:00
{% stepsContainer %}
2023-04-17 16:45:47 +02:00
{% extraContent parentTagName="stepsContainer" %}
#### Connection Options
- **Username**: Specify the User to connect to Clickhouse. It should have enough privileges to read all the metadata.
- **Password**: Password to connect to Clickhouse.
- **Host and Port**: Enter the fully qualified hostname and port number for your Clickhouse deployment in the Host and Port field.
2023-07-06 15:11:13 +02:00
{% partial file="/v1.1.0/connectors/database/advanced-configuration.md" /%}
You can find the full list of accepted options [here ](https://clickhouse-driver.readthedocs.io/en/latest/api.html#clickhouse_driver.connection.Connection ).
2023-06-28 20:31:50 +05:30
2023-04-17 16:45:47 +02:00
- **Connecting to Clickhouse with SSL Certificate**: You will need to use the `clickhouse+native` connection scheme. Then in the `Connection Options` reference the following key with their value:
- `verify` : `true`
- `secure` : `true`
2023-07-06 15:11:13 +02:00
- `keyfile` : `/path/to/key/file`
2023-04-17 16:45:47 +02:00
2023-07-06 15:11:13 +02:00
The `keyfile` needs to be accessible by the service running the ingestion. For example if you are running the ingestion in a docker container, your `keyfile` needs to be present in the container at the location specify as a value in the `Connection Options` . Additionally, your `keyfile` needs to be in the `.cert` or `.pem` format.
2023-04-17 16:45:47 +02:00
{% /extraContent %}
2023-07-06 15:11:13 +02:00
{% partial file="/v1.1.0/connectors/test-connection.md" /%}
2023-04-17 16:45:47 +02:00
2023-07-06 15:11:13 +02:00
{% partial file="/v1.1.0/connectors/database/configure-ingestion.md" /%}
2023-04-17 16:45:47 +02:00
2023-07-06 15:11:13 +02:00
{% partial file="/v1.1.0/connectors/ingestion-schedule-and-deploy.md" /%}
2023-04-17 16:45:47 +02:00
{% /stepsContainer %}
2023-07-06 15:11:13 +02:00
{% partial file="/v1.1.0/connectors/troubleshooting.md" /%}
2023-04-17 16:45:47 +02:00
2023-07-06 15:11:13 +02:00
{% partial file="/v1.1.0/connectors/database/related.md" /%}