Skip to content

[FEATURE] Add support to official clickhouse-connector #132

@PierreF

Description

@PierreF

Following #131, I'm going to work on a PR to add support for https://github.com/ClickHouse/clickhouse-connect

I'm going to work on a PR which add clickhouse-connect, so both clickhouse-connect and clickhouse-driver. The rational for this choice is:

  • I fear the change might a bit consequent and have new clickhouse-connect an opt-in seems safer
  • clickhouse-connect does not support native protocol, only HTTP protocol, which imply a breaking change

I could think of two way to support this:

  • Either have two "ENGINE", like clickhouse_backend.backend and clickhouse_backend.backend_http
  • Or add a flag to say which driver to use.

I think the flag version is better, e.g. something like:

DATABASES = {
    "clickhouse": {
        "ENGINE": "clickhouse_backend.backend",
        [...]
        "PORT": "8123",
        "OPTIONS": {
            "USE_HTTP_PROTOCOL": True,  # Or should it be "USE_CLICKHOUSE_CONNECT" ?
        },
    },
}

If I encounter other choice while working on the PR, I'll comment on this issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions