Iceberg has branches as a core part of the data model1 and the Nessie catalog implements them both through REST parameters2, specialized sql syntax3, and via spark properties like spark.sql.catalog.*.ref4.
I've tried all of the above techniques, and I haven't been able to figure out a way to connect directly to a branch or query a branch from DuckDB. I tried to find issues or PRs relating to them, but the closest I could find was duckdb/duckdb#17986.
My company uses branches heavily, and it would be really nice to be able to interact with them easily via DuckDB.
(In case folks come here wanting the same thing, currently I've got a collection of horrible shell scripts that query the Nessie REST API and generate SQL statements that look like CREATE VIEW <branch>_<table> AS SELECT * FROM iceberg_scan('s3://path/to/metadata/file.json'), and it works okay for reading snapshots.)
Iceberg has branches as a core part of the data model1 and the Nessie catalog implements them both through REST parameters2, specialized sql syntax3, and via spark properties like
spark.sql.catalog.*.ref4.I've tried all of the above techniques, and I haven't been able to figure out a way to connect directly to a branch or query a branch from DuckDB. I tried to find issues or PRs relating to them, but the closest I could find was duckdb/duckdb#17986.
My company uses branches heavily, and it would be really nice to be able to interact with them easily via DuckDB.
(In case folks come here wanting the same thing, currently I've got a collection of horrible shell scripts that query the Nessie REST API and generate SQL statements that look like
CREATE VIEW <branch>_<table> AS SELECT * FROM iceberg_scan('s3://path/to/metadata/file.json'), and it works okay for reading snapshots.)Footnotes
https://iceberg.apache.org/docs/latest/branching/ ↩
https://projectnessie.org/guides/iceberg-rest/#example-iceberg-rest-uri-parameters ↩
https://projectnessie.org/guides/iceberg-rest/#time-travel ↩
https://projectnessie.org/iceberg/spark/#configuration ↩