--- warning: DO NOT CHANGE THIS MANUALLY, THIS IS GENERATED BY https://github.com/duckdb/community-extensions repository, check README there title: cassandra excerpt: | DuckDB Community Extensions Connect to Apache Cassandra, ScyllaDB, and DataStax Astra databases directly from DuckDB. Query Cassandra tables using SQL with support for all major Cassandra data types, SSL/TLS connections, and cloud deployments. extension: name: cassandra description: Connect to Apache Cassandra, ScyllaDB, and DataStax Astra databases directly from DuckDB. Query Cassandra tables using SQL with support for all major Cassandra data types, SSL/TLS connections, and cloud deployments. version: 1.0.0 language: C++ build: cmake excluded_platforms: "wasm_mvp;wasm_eh;wasm_threads;windows_amd64_mingw;linux_amd64_musl" license: MIT requires_toolchains: "cmake, openssl" maintainers: - dioptre repo: github: dioptre/duckdb-cassandra ref: a5d974c422c75f217e6f495c0dc159993a30c0f4 canonical_name: cassandra docs: hello_world: | -- Load the extension LOAD 'cassandra'; -- Connect to local Cassandra SELECT * FROM cassandra_scan('my_keyspace.my_table', host='127.0.0.1', port=9042); -- Execute custom CQL queries SELECT * FROM cassandra_query('SELECT * FROM my_keyspace.users WHERE status = ''active''', host='127.0.0.1'); -- Attach a Cassandra database for persistent access ATTACH 'host=127.0.0.1 port=9042 keyspace=my_keyspace' AS cass_db (TYPE cassandra); SELECT * FROM cass_db.users LIMIT 10; extended_description: | The Cassandra extension enables DuckDB to connect to Apache Cassandra, ScyllaDB, and DataStax Astra databases. It supports three connection methods: **1. Direct Table Scanning** - Query specific tables with `cassandra_scan()` **2. Custom CQL Queries** - Execute any CQL query with `cassandra_query()` **3. Database Attachment** - Attach entire keyspaces with `ATTACH` for persistent access **Supported Databases:** - Apache Cassandra (local and remote) - DataStax Astra (cloud Cassandra) - ScyllaDB (Cassandra-compatible) - Any Cassandra-compatible database **Security Features:** - SSL/TLS encryption with custom certificates - Username/password authentication - DataStax Astra token-based authentication - Base64 and hex-encoded certificate support **Data Type Support:** - All primitive types (text, int, bigint, double, boolean, etc.) - UUID and TimeUUID with proper conversion - Timestamp with timezone support - Collections (list, set, map) as JSON strings - Blob data with binary support - NULL value handling **Connection Examples:** ```sql -- SSL connection with certificates SELECT * FROM cassandra_scan('keyspace.table', host='secure-cluster.com', ssl=true, certfile_b64='LS0tLS1CRU...', usercert_b64='LS0tLS1CRU...', userkey_b64='LS0tLS1CRU...' ); -- DataStax Astra connection SELECT * FROM cassandra_query('SELECT * FROM users', client_id='your-client-id', client_secret='your-client-secret', astra_host='your-db-id-region.apps.astra.datastax.com', astra_ca_cert_b64='LS0tLS1CRU...', astra_client_cert_b64='LS0tLS1CRU...', astra_client_key_b64='LS0tLS1CRU...' ); ``` extension_star_count: 2 extension_star_count_pretty: 2 extension_download_count: 592 extension_download_count_pretty: 592 image: '/images/community_extensions/social_preview/preview_community_extension_cassandra.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 | |-----------------|---------------|-------------|---------|----------| | cassandra_query | table | NULL | NULL | | | cassandra_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
| name | description | input_type | scope | aliases | |--------------------------|--------------------------------------------------|------------|--------|---------| | cassandra_cert_file_hex | SSL certificate file in hex format | VARCHAR | GLOBAL | [] | | cassandra_consistency | Default consistency level | VARCHAR | GLOBAL | [] | | cassandra_contact_points | Comma-separated list of Cassandra contact points | VARCHAR | GLOBAL | [] | | cassandra_keyspace | Default Cassandra keyspace | VARCHAR | GLOBAL | [] | | cassandra_password | Cassandra password for authentication | VARCHAR | GLOBAL | [] | | cassandra_port | Cassandra port number | INTEGER | GLOBAL | [] | | cassandra_use_ssl | Enable SSL/TLS connections | BOOLEAN | GLOBAL | [] | | cassandra_user_cert_hex | SSL user certificate file in hex format | VARCHAR | GLOBAL | [] | | cassandra_user_key_hex | SSL private key file in hex format | VARCHAR | GLOBAL | [] | | cassandra_username | Cassandra username for authentication | VARCHAR | GLOBAL | [] |