Read AWS Ion data and write Ion text or binary with typed mappings
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 ion FROM community;
LOAD ion;
Example
-- Read Ion files (text or binary)
SELECT * FROM read_ion('sample.ion');
-- Control schema and parsing options
SELECT * FROM read_ion('sample.ion', columns := {id: 'BIGINT', label: 'VARCHAR'});
SELECT * FROM read_ion('scalars.ion', records := false);
SELECT * FROM read_ion('array.ion', format := 'array');
-- Write Ion text or binary
CREATE TABLE ion_demo AS SELECT 1::INTEGER AS id, 'hello' AS label;
COPY ion_demo TO 'out.ion' (FORMAT ION);
COPY ion_demo TO 'out.ion' (FORMAT ION, BINARY TRUE);
About ion
The ion extension enables DuckDB to read AWS Ion in text and binary formats and write Ion text or binary, preserving Ion types where possible for richer analytics.
Added Functions
| function_name | function_type | description | comment | examples |
|---|---|---|---|---|
| read_ion | table | NULL | NULL | |
| to_ion | scalar | 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.