Query Altertable's lakehouse directly from your local DuckDB.
Maintainer(s):
redox
Installing and Loading
INSTALL altertable FROM community;
LOAD altertable;
Example
INSTALL altertable FROM community;
LOAD altertable;
-- Attach an Altertable catalog using Arrow Flight SQL
ATTACH 'user=my-user password=my-pass catalog=my-altertable-catalog' AS db (TYPE 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:
ATTACHsupport for remote Altertable databases- direct reads from attached schemas and tables
- attached writes with
CREATE TABLE,CREATE TABLE AS, andINSERT - 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 | [] |