Mutation functions in the ADBC Scanner DuckDB extension
Function category
Mutation
2 functionsWrite — DDL/DML through `adbc_execute`, plus bulk Arrow-native loads via `adbc_insert`.
Signature
adbc_execute(connection_handle: BIGINT, query: VARCHAR) → BIGINT
Arguments (Positional)
| Argument | Type | Mode | Description |
|---|---|---|---|
Argument
connection_handle
|
Type
BIGINT
|
Mode Positional | Description |
Argument
query
|
Type
VARCHAR
|
Mode Positional | Description |
Description
Execute a non-SELECT statement (DDL or DML). Use for CREATE / INSERT / UPDATE / DELETE / DROP / ALTER.
1
Example 1
SELECT adbc_execute(conn, 'CREATE TABLE test (id INTEGER)');
2
Example 2
SELECT adbc_execute(conn, 'INSERT INTO test VALUES (1)');
3
Example 3
SELECT adbc_execute(conn, 'DELETE FROM test WHERE id = 1');
Signature
adbc_insert(
connection_handle := BIGINT,
data := TABLE,
mode := VARCHAR,
table_name := VARCHAR
) → None
Arguments (Named)
| Argument | Type | Mode | Description |
|---|---|---|---|
Argument
connection_handle
|
Type
BIGINT
|
Mode Named | Description |
Argument
table_name
|
Type
VARCHAR
|
Mode Named | Description |
Argument
data
|
Type
TABLE
|
Mode Named | Description |
Argument
mode
|
Type
VARCHAR
|
Mode Named | Description |
Description
Bulk-insert into a remote table — passes Arrow record batches directly through the driver's bulk-load path. Faster than row-by-row INSERT.
1
Example 1
SELECT * FROM adbc_insert(conn, 'target_table', (SELECT * FROM source_table));
2
Example 2
SELECT * FROM adbc_insert(conn, 'target', (SELECT * FROM source), mode := 'create');
3
Example 3
SELECT * FROM adbc_insert(conn, 'target', (SELECT * FROM source), mode := 'append');