{"id":50593964,"url":"https://github.com/clickhouse/adbc_clickhouse","last_synced_at":"2026-06-05T12:58:25.091Z","repository":{"id":332417079,"uuid":"1100267272","full_name":"ClickHouse/adbc_clickhouse","owner":"ClickHouse","description":"(Work-in-progress) Official ClickHouse driver for Arrow Database Connectivity (ADBC)","archived":false,"fork":false,"pushed_at":"2026-06-01T16:11:50.000Z","size":113,"stargazers_count":23,"open_issues_count":27,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-06-05T12:58:23.824Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ClickHouse.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE-APACHE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-11-20T04:01:18.000Z","updated_at":"2026-06-01T16:25:13.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/ClickHouse/adbc_clickhouse","commit_stats":null,"previous_names":["clickhouse/adbc_clickhouse"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/ClickHouse/adbc_clickhouse","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ClickHouse%2Fadbc_clickhouse","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ClickHouse%2Fadbc_clickhouse/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ClickHouse%2Fadbc_clickhouse/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ClickHouse%2Fadbc_clickhouse/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ClickHouse","download_url":"https://codeload.github.com/ClickHouse/adbc_clickhouse/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ClickHouse%2Fadbc_clickhouse/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33942436,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-05T02:00:06.157Z","response_time":120,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-06-05T12:58:24.358Z","updated_at":"2026-06-05T12:58:25.083Z","avatar_url":"https://github.com/ClickHouse.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ClickHouse ADBC Driver\n\nThe official ClickHouse driver for [Arrow Database Connectivity (ADBC)](https://arrow.apache.org/adbc/current/index.html).\n\nImplemented using the [official ClickHouse client for Rust](https://clickhouse.com/docs/integrations/rust).\n\nConnects using the [ClickHouse HTTP interface][ch-http].\n\n[ch-http]: https://clickhouse.com/docs/interfaces/http#overview\n\n## Note: Work-in-Progress\nThis driver is still under active development and should not be considered ready for production use.\n\nMany methods are stubbed out and return `NotImplemented` errors.\n\nHowever, the core query flow is supported:\n\n* Creating a `Driver` and `Database`\n* Setting URL, username and password on the `Database`\n* Creating a `Connection` and `Statement`\n* Setting a query with `Statement::set_sql_query()` and binding parameters with `Statement::bind()`\n* Binding a statement in streaming insert mode with `Statement::bind_stream()`\n* Executing a statement with `Statement::execute()` or `Statement::execute_update()`\n\n\n## Usage\n\n### ADBC Driver Manager\n\nBinary builds of the driver are graciously provided by [our friends at the ADBC Driver Foundry](https://docs.adbc-drivers.org/drivers/clickhouse/).\n\nThe driver can be installed through the `dbc` tool as shown in the link above, or downloaded manually from \u003chttps://github.com/adbc-drivers/clickhouse/releases\u003e.\n\nAlternatively, the driver DLL can be built from source as described in [Building from Source](#building-from-source) below.\n\nThe driver DLL can then be loaded by path or by name (assuming it is on the search path for your platform)\nusing the driver manager API.\n\nSee [the ADBC documentation for your client language](https://arrow.apache.org/adbc/main/index.html) for details.\n\nBecause this driver uses the [ClickHouse HTTP interface][ch-http], the database URI (`ADBC_OPTION_URI` in `adbc.h`)\nshould use the `http://` or `https://` schemes.\n\n### Rust API\n\nThe driver can be directly used as a Rust crate with or without the `ffi` feature (see [Building from Source](#building-from-source) below for prerequisites):\n\n`Cargo.toml`:\n```toml\n[dependencies]\nadbc_clickhouse = \"0.1.0-alpha.1\"\nadbc_core = \"0.22.0\"\narrow = \"57.0.0\"\n```\n\n```rust\nuse adbc_clickhouse::ClickhouseDriver;\n\nuse adbc_core::{Driver, Database, Connection, Statement};\nuse adbc_core::options::OptionDatabase;\n\nuse arrow::array::RecordBatchReader;\nuse arrow::error::ArrowError;\nuse arrow::record_batch::RecordBatch;\n\nlet mut driver = ClickhouseDriver::init();\n\n// A `Database` object in ADBC stores the login credentials for a specific database.\nlet database = driver.new_database_with_opts([\n    // The driver connects using the ClickHouse HTTP interface:\n    // https://clickhouse.com/docs/interfaces/http#overview\n    (OptionDatabase::Uri, \"http://localhost:8123\".into()),\n    (OptionDatabase::Username, \"default\".into()),\n    (OptionDatabase::Password, \"\".into()),\n])\n    .unwrap();\n    \n// Each new connection uses a different `session_id`:\n// https://clickhouse.com/docs/interfaces/http#using-clickhouse-sessions-in-the-http-protocol\n// Note that the default session timeout is 60 seconds.\nlet mut connection = database.new_connection().unwrap();\n\n// Each statement is assigned its own query ID.\nlet mut statement = connection.new_statement().unwrap();\n\nstatement\n    .set_sql_query(\"SELECT number, 'test_' || number as name FROM system.numbers LIMIT 10\")\n    .unwrap();\n\nlet reader = statement.execute().unwrap(); // `impl RecordBatchReader`\n\n// Required for `concat_batches()`.\n// This could also be taken from the first `RecordBatch`, \n// but getting it from the reader works even when the result set is empty.\nlet schema = reader.schema(); \n\nlet record_batches = reader\n    .collect::\u003cResult\u003cVec\u003cRecordBatch\u003e, ArrowError\u003e\u003e()\n    .unwrap();\n    \n// In practice, ClickHouse should return the data for the above query in a single batch.\n// However, for larger datasets, the data may be returned in multiple batches.\n// For the sake of the example, we assume that we may have to concatenate multiple batches.\nlet record_batch = arrow::compute::concat_batches(\u0026schema, \u0026record_batches)\n    .unwrap();\n    \nprintln!(\"{record_batch:?}\");\n```\n\n[Cargo]: https://doc.rust-lang.org/cargo/index.html\n\n### Feature Flags\n\n#### ADBC Driver Manager Integration\n\nWhen the `ffi` feature is enabled, this crate exports the `AdbcDriverInit()` and `AdbcClickhouseInit()` functions.\n\nIt then may be built or installed as a dynamic library and loaded by an [ADBC driver manager][adbc-driver].\n\n[adbc-driver]: https://arrow.apache.org/adbc/current/format/how_manager.html\n\n#### TLS Support\n\nThis package exposes the same Transport Layer Security (TLS) features as\n[the `clickhouse` crate](https://github.com/ClickHouse/clickhouse-rs?tab=readme-ov-file#tls) it uses under the hood:\n\n* `native-tls`: use the native TLS implementation for the platform\n  * OpenSSL on Linux\n  * SChannel on Windows\n  * Secure Transport on macOS\n* `rustls-tls`: enables both `rustls-tls-aws-lc` and `rustls-tls-webpki-roots`\n* `rustls-tls-aws-lc`: use [Rustls] with the [`aws-lc`] cryptography provider\n* `rustls-tls-ring`: use [Rustls] with the [`ring`] cryptography provider\n* `rustls-tls-native-roots`: configure [Rustls] to use the native TLS root certificate store for the platform\n* `rustls-tls-webpki-roots`: configure [Rustls] to use a statically compiled set of TLS roots ([`webpki-roots`] crate)\n\nNote that Rustls has no TLS roots by default; when using the `rustls-tls-aws-lc` or `rustls-tls-ring` features,\nyou should also enable either `rustls-tls-native-roots` or `rustls-tls-webpki-roots` to choose a TLS root store.\n\n[Rustls]: https://github.com/rustls/rustls\n[`aws-lc`]: https://github.com/aws/aws-lc-rs\n[`ring`]: https://github.com/briansmith/ring\n[`webpki-roots`]: https://github.com/rustls/webpki-roots\n\n## Building from Source\nUsers of the Rust API should also read this section.\n\n### Prerequisites\n\n* Rust and [Cargo] 1.91 or newer\n* On Linux when using the `tls-native-tls` feature: \n  * GCC/G++ and libc headers (`build-essential`) or Clang \n  * OpenSSL/LibreSSL/BoringSSL headers (`libssl-dev` on Debian/Ubuntu)\n* All platforms: \n  * `rustls-tls-aws-lc` feature: see [AWS Libcrypto requirements](https://aws.github.io/aws-lc-rs/requirements/)\n  * `rustls-tls-ring` feature: see [`ring` build requirements](https://github.com/briansmith/ring/blob/main/BUILDING.md)\n\nSee [the Feature Flags section](#feature-flags) for feature descriptions.\n\n### Driver DLL\n\nThe driver supports being built as a dynamic-link library (DLL) for loading with an [ADBC driver manager][adbc-driver].\n\nClone this repository and then choose one of the following `cargo build` commands\n(refer to [the Feature Flags section](#feature-flags) section above when customizing):\n\n* Build with Native TLS support (OpenSSL on Linux, Secure Transport on macOS, SChannel on Windows):\n```ignore\ncargo build --release --features ffi,native-tls\n```\n\n* Build with Rustls and `aws-lc` and the native TLS root certificate store for the platform:\n```ignore\ncargo build --release --features ffi,rustls-tls\n```\n\n* Build without TLS support (the `ffi` feature is required for use with a driver manager):\n```ignore\ncargo build --release --features ffi\n```\n\nWhen finished, the driver DLL can be found under `target/release` with the conventional name and\nextension for your platform:\n\n* Linux, BSDs: `libadbc_clickhouse.so`\n* macOS: `libadbc_clickhouse.dylib`\n* Windows: `adbc_clickhouse.dll`\n\n## Support Policies\n\nThis project adopts the same support policies as the [ClickHouse Rust client](https://github.com/ClickHouse/clickhouse-rs/tree/main?tab=readme-ov-file#support-policies).\n\n### Minimum Supported Rust Version (MSRV)\n\nThis project's MSRV is the second-to-last stable release as of the beginning of the current release cycle (`0.x.0`),\nwhere it will remain until the beginning of the _next_ release cycle (`0.{x+1}.0`).\n\nThe MSRV for the `0.1.0` release cycle is `1.91.0`.\n\nThis guarantees that `adbc_clickhouse` will compile with a Rust version that is at _least_ six weeks old,\nwhich should be plenty of time for it to make it through any packaging system that is being actively kept up to date.\n\nBeware when installing Rust through operating system package managers, as it can often be a year or more\nout-of-date. For example, Debian Bookworm (released 10 June 2023) shipped with Rust 1.63.0 (released 11 August 2022).\n\n### ClickHouse Versions\n\nThe supported versions of the ClickHouse database server coincide with the versions currently receiving security\nupdates.\n\nFor the list of currently supported versions, see \u003chttps://github.com/ClickHouse/ClickHouse/blob/master/SECURITY.md#security-change-log-and-support\u003e.\n\n## License\n\nLicensed under either of\n\n-   Apache License, Version 2.0\n    ([LICENSE-APACHE](LICENSE-APACHE) or http://www.apache.org/licenses/LICENSE-2.0)\n-   MIT license\n    ([LICENSE-MIT](LICENSE-MIT) or http://opensource.org/licenses/MIT)\n\nat your option.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fclickhouse%2Fadbc_clickhouse","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fclickhouse%2Fadbc_clickhouse","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fclickhouse%2Fadbc_clickhouse/lists"}