Search Shortcut cmd + k | ctrl + k
altertable

Query Altertable's lakehouse directly from your local DuckDB.

Maintainer(s): redox

Compatibility Matrix

This table covers all DuckDB releases that have not reached end-of-life, 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

INSTALL altertable FROM community;
LOAD altertable;

Example

INSTALL altertable FROM community;
LOAD altertable;

-- Attach an Altertable database
CREATE SECRET my_altertable (
    TYPE altertable,
    USER 'my-user',
    PASSWORD 'my-pass'
);
ATTACH 'catalog=my-altertable-catalog' AS db (TYPE ALTERTABLE, SECRET my_altertable);

-- Query remote Altertable tables with standard SQL
SELECT * FROM db.main.events;

-- Create and load remote tables through the attached database
CREATE TABLE db.main.example_events (id INTEGER, name VARCHAR);
INSERT INTO db.main.example_events VALUES (1, 'launch');

DETACH db;

About altertable

The Altertable extension connects DuckDB to Altertable databases over the high-performance Arrow Flight SQL protocol. It lets you attach remote Altertable catalogs and browse remote schemas and tables through DuckDB's catalog.

Features include:

  • ATTACH support for remote Altertable databases
  • direct reads from attached schemas and tables
  • attached writes with CREATE TABLE, CREATE TABLE AS, INSERT, UPDATE and DELETE
  • DuckDB secrets support for storing Altertable credentials

Added Functions

function_name function_type description comment examples
altertable_query table Execute a SELECT query on an attached Altertable database and return the results as a DuckDB table. NULL [SELECT * FROM altertable_query('db', 'SELECT id, name FROM users WHERE active = true');]
altertable_execute table Execute a remote DDL or DML statement on an attached Altertable database. NULL [CALL altertable_execute('db', 'CREATE TABLE my_table (id INTEGER, name VARCHAR)');]
altertable_scan table NULL NULL NULL
altertable_scan_pushdown table NULL 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
altertable_connection_cache Whether to reuse pooled Arrow Flight SQL connections between DuckDB transactions BOOLEAN GLOBAL []
altertable_debug_show_queries DEBUG SETTING: print all queries sent to Altertable to stdout BOOLEAN GLOBAL []