> ## Documentation Index
> Fetch the complete documentation index at: https://docs.keephq.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# ClickHouse

> ClickHouse provider allows you to interact with ClickHouse database.

## Overview

ClickHouse is an open-source column-oriented DBMS for online analytical processing that allows users to generate analytical reports using SQL queries in real-time.

## Authentication

This provider requires authentication.

* **username**: Clickhouse username (required: True, sensitive: False)
* **password**: Clickhouse password (required: True, sensitive: True)
* **host**: Clickhouse hostname (required: True, sensitive: False)
* **port**: Clickhouse port (required: True, sensitive: False)
* **database**: Clickhouse database name (required: False, sensitive: False)
* **protocol**: Protocol ('clickhouses' for SSL, 'clickhouse' for no SSL, 'http' or 'https') (required: True, sensitive: False)
* **verify**: Enable SSL verification (required: False, sensitive: False)

Certain scopes may be required to perform specific actions or queries via the provider. Below is a summary of relevant scopes and their use cases:

* **connect\_to\_server**: The user can connect to the server (mandatory)

## In workflows

This provider can be used in workflows.

As "step" to query data, example:

```yaml theme={null}
steps:
    - name: Query clickhouse
      provider: clickhouse
      config: "{{ provider.my_provider_name }}"
      with:
        query: {value}  
        single_row: {value}  
```

As "action" to make changes or update data, example:

```yaml theme={null}
actions:
    - name: Query clickhouse
      provider: clickhouse
      config: "{{ provider.my_provider_name }}"
      with:
        query: {value}  
        single_row: {value}  
```

Check the following workflow examples:

* [clickhouse\_multiquery.yml](https://github.com/keephq/keep/blob/main/examples/workflows/clickhouse_multiquery.yml)
* [query\_clickhouse.yml](https://github.com/keephq/keep/blob/main/examples/workflows/query_clickhouse.yml)

## Connecting with the ClickHouse provider

1. Obtain the required authentication parameters.
2. Add ClickHouse provider to your keep account and configure with the above authentication parameters.

## Useful Links

* [ClickHouse](https://clickhouse.com/)
* [ClickHouse Statements](https://clickhouse.com/docs/en/sql-reference/statements/)
