Install and load
Run these commands in a Haybarn SQL session. The extension is available from the community repository.
INSTALL paimon FROM community;
LOAD paimon FROM community;
Using upstream DuckDB? Follow the maintainer’s installation instructions.
Usage example
Query a local Paimon warehouse as a catalog
-- Query a local Paimon warehouse as a catalog
ATTACH './data' AS local_paimon (TYPE paimon);
SELECT count(*) FROM local_paimon.testdb.testtbl;
-- Or scan one table without attaching the warehouse
SELECT * FROM paimon_scan('./data/testdb.db/testtbl');
-- Configure credentials for remote object storage
CREATE SECRET my_oss (
TYPE paimon,
PROVIDER config,
key_id 'your-access-key-id',
secret 'your-access-key-secret',
endpoint 'oss-cn-hangzhou.aliyuncs.com',
scope 'oss://your-bucket/warehouse'
);
-- Attach and query a remote Paimon warehouse
ATTACH 'oss://your-bucket/warehouse' AS oss_paimon (TYPE paimon);
SELECT count(*) FROM oss_paimon.your_db.your_table;
-- Inspect the snapshots available for a Paimon table
SELECT snapshot_id, commit_time
FROM paimon_snapshots('./data/testdb.db/testtbl');
-- Query a specific snapshot
SELECT * FROM paimon_scan('./data/testdb.db/testtbl', snapshot_from_id=2);
Provided by polardb. Not yet verified on Haybarn 2.0.0.
Sample data & setupAbout this extension
The Paimon extension lets DuckDB read and query Apache Paimon tables directly. Apache Paimon is a lake format for realtime lakehouse workloads with Flink and Spark.
Remote filesystem warehouses support Alibaba Cloud OSS and Amazon S3. Configure S3 with DuckDB's credential chain or static credentials; remote object storage catalogs are currently read-only. Paimon REST catalogs can be attached with METASTORE 'rest', the catalog server URI, and an access token.
Project overview from the community descriptor.
Documentation and resources
Project and build details
- Repository
- polardb/duckdb-paimon
- License
- Apache-2.0
- Maintainers
- mrdrivingduck
- Written in
- C++
- Build source
6762e34b3f80- Build definition
- Community descriptor