--- warning: DO NOT CHANGE THIS MANUALLY, THIS IS GENERATED BY https://github.com/duckdb/community-extensions repository, check README there title: chsql_native excerpt: | DuckDB Community Extensions ClickHouse Native Client & File Reader for chsql extension: name: chsql_native description: ClickHouse Native Client & File Reader for chsql version: 0.1.5 language: Rust build: cmake license: MIT excluded_platforms: "windows_amd64_rtools;windows_amd64_mingw;windows_amd64;wasm_threads;wasm_eh;wasm_mvp;linux_amd64_musl;" requires_toolchains: "rust;python3" maintainers: - lmangani - adubovikov - rustyconover repo: github: Query-farm/duckdb-extension-clickhouse-native ref: b4eb00a862edb20cd5b8c8dc05aa683385c8dfa1 docs: hello_world: | --- Simple Query Example --- export CLICKHOUSE_URL="tcp://user:pass@remote:9440/?secure=true&skip_verify=true" D SELECT * FROM clickhouse_scan("SELECT version(), 'hello', 123"); ┌────────────┬─────────┬────────┐ │ version() │ 'hello' │ 123 │ │ varchar │ varchar │ uint32 │ ├────────────┼─────────┼────────┤ │ 24.10.2.80 │ hello │ 123 │ └────────────┴─────────┴────────┘ --- Wide Query Example D SELECT * FROM clickhouse_scan("SELECT * FROM system.functions WHERE alias_to != '' LIMIT 10"); ┌────────────────────┬──────────────┬──────────────────┬──────────────────────┬───┬───────────┬────────────────┬──────────┬────────────┐ │ name │ is_aggregate │ case_insensitive │ alias_to │ … │ arguments │ returned_value │ examples │ categories │ │ varchar │ uint32 │ uint32 │ varchar │ │ varchar │ varchar │ varchar │ varchar │ ├────────────────────┼──────────────┼──────────────────┼──────────────────────┼───┼───────────┼────────────────┼──────────┼────────────┤ │ connection_id │ 0 │ 1 │ connectionID │ … │ │ │ │ │ │ rand32 │ 0 │ 0 │ rand │ … │ │ │ │ │ │ INET6_ATON │ 0 │ 1 │ IPv6StringToNum │ … │ │ │ │ │ │ INET_ATON │ 0 │ 1 │ IPv4StringToNum │ … │ │ │ │ │ │ truncate │ 0 │ 1 │ trunc │ … │ │ │ │ │ │ ceiling │ 0 │ 1 │ ceil │ … │ │ │ │ │ │ replace │ 0 │ 1 │ replaceAll │ … │ │ │ │ │ │ from_utc_timestamp │ 0 │ 1 │ fromUTCTimestamp │ … │ │ │ │ │ │ mapFromString │ 0 │ 0 │ extractKeyValuePairs │ … │ │ │ │ │ │ str_to_map │ 0 │ 1 │ extractKeyValuePairs │ … │ │ │ │ │ ├────────────────────┴──────────────┴──────────────────┴──────────────────────┴───┴───────────┴────────────────┴──────────┴────────────┤ │ 10 rows 12 columns (8 shown) │ └──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘ --- Native File Reader for chsql --- Test files can be generated with clickhouse-local. File reads are full-scans. --- Simple Example D SELECT * FROM clickhouse_native('/tmp/numbers.clickhouse'); ┌──────────────┬─────────┐ │ version() │ number │ │ varchar │ int32 │ ├──────────────┼─────────┤ │ 24.12.1.1273 │ 0 │ └──────────────┴─────────┘ --- Long Example D SELECT count(*), max(number) FROM clickhouse_native('/tmp/100000.clickhouse'); ┌──────────────┬─────────────┐ │ count_star() │ max(number) │ │ int64 │ int32 │ ├──────────────┼─────────────┤ │ 100000 │ 99999 │ └──────────────┴─────────────┘ --- Wide Example D SELECT * FROM clickhouse_native('/tmp/functions.clickhouse') WHERE alias_to != '' LIMIT 10; ┌────────────────────┬──────────────┬──────────────────┬──────────────────────┬──────────────┬─────────┬───┬─────────┬───────────┬────────────────┬──────────┬────────────┐ │ name │ is_aggregate │ case_insensitive │ alias_to │ create_query │ origin │ … │ syntax │ arguments │ returned_value │ examples │ categories │ │ varchar │ int32 │ int32 │ varchar │ varchar │ varchar │ │ varchar │ varchar │ varchar │ varchar │ varchar │ ├────────────────────┼──────────────┼──────────────────┼──────────────────────┼──────────────┼─────────┼───┼─────────┼───────────┼────────────────┼──────────┼────────────┤ │ connection_id │ 0 │ 1 │ connectionID │ │ System │ … │ │ │ │ │ │ │ rand32 │ 0 │ 0 │ rand │ │ System │ … │ │ │ │ │ │ │ INET6_ATON │ 0 │ 1 │ IPv6StringToNum │ │ System │ … │ │ │ │ │ │ │ INET_ATON │ 0 │ 1 │ IPv4StringToNum │ │ System │ … │ │ │ │ │ │ │ truncate │ 0 │ 1 │ trunc │ │ System │ … │ │ │ │ │ │ │ ceiling │ 0 │ 1 │ ceil │ │ System │ … │ │ │ │ │ │ │ replace │ 0 │ 1 │ replaceAll │ │ System │ … │ │ │ │ │ │ │ from_utc_timestamp │ 0 │ 1 │ fromUTCTimestamp │ │ System │ … │ │ │ │ │ │ │ mapFromString │ 0 │ 0 │ extractKeyValuePairs │ │ System │ … │ │ │ │ │ │ │ str_to_map │ 0 │ 1 │ extractKeyValuePairs │ │ System │ … │ │ │ │ │ │ ├────────────────────┴──────────────┴──────────────────┴──────────────────────┴──────────────┴─────────┴───┴─────────┴───────────┴────────────────┴──────────┴────────────┤ │ 10 rows 12 columns (11 shown) │ └─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘ extended_description: | ## chsql_native This experimental community extension implements a Native Clickhouse client for DuckDB. ### Client Configuration The extension can be configured the following using ENV variables ``` CLICKHOUSE_URL CLICKHOUSE_USER CLICKHOUSE_PASSWORD ``` Authentication and connection parameters can be included in the URL ``` export CLICKHOUSE_URL="tcp://user:pass@remote:9440/?secure=true&skip_verify=true" -- export CLICKHOUSE_URL="tcp://localhost:9000" ``` > This extension is experimental and potentially unstable. Do not use in production. See README for full examples. extension_star_count: 22 extension_star_count_pretty: 22 extension_download_count: 9286 extension_download_count_pretty: 9.3k image: '/images/community_extensions/social_preview/preview_community_extension_chsql_native.png' layout: community_extension_doc --- ### Compatibility Matrix This table covers all DuckDB releases that have not reached [end-of-life](https://duckdb.org/release_calendar), including LTS releases, and shows the 2 most recent patch releases of each. Older patch releases are not listed, but the extension may be available for them as well.
| Platform | 1.4.4 | 1.4.5 | 1.5.5 | 1.5.6 | 2.0.0 | | :--- | :---: | :---: | :---: | :---: | :---: | | Linux AMD64 | ❌ | ❌ | ✅ | ✅ | ❌ | | Linux ARM64 | ❌ | ❌ | ✅ | ✅ | ❌ | | macOS AMD64 | ❌ | ❌ | ✅ | ✅ | ❌ | | macOS ARM64 | ❌ | ❌ | ✅ | ✅ | ❌ | | Windows AMD64 | ❌ | ❌ | ❌ | ❌ | ❌ | | Windows ARM64 | ❌ | ❌ | ❌ | ❌ | ❌ | | WebAssembly | ❌ | ❌ | ❌ | ❌ | ❌ | ### Installing and Loading ```sql INSTALL {{ page.extension.name }} FROM community; LOAD {{ page.extension.name }}; ``` {% if page.docs.hello_world %} ### Example ```sql {{ page.docs.hello_world }}``` {% endif %} {% if page.docs.extended_description %} ### About {{ page.extension.name }} {{ page.docs.extended_description }} {% endif %} ### Added Functions | function_name | function_type | description | comment | examples | |-------------------|---------------|-------------|---------|----------| | clickhouse_native | table | NULL | NULL | | | clickhouse_scan | table | NULL | NULL | | ### Overloaded Functions This extension does not add any function overloads. ### Added Types This extension does not add any types. ### Added Settings This extension does not add any settings.