Replies: 1 comment 2 replies
-
Hi, we have a PoC feature called
The table columns are inferred automatically from the data files. Will post a link here once the PR is drafted. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Enable the ability to create persistent views or tables in PostgreSQL that reference external files via DuckDB’s read_parquet, read_csv, or other file readers — without requiring ingestion of the data into Postgres.
Currently, pg_duckdb allows embedding DuckDB as an engine inside PostgreSQL, but to query external files you must use transient DuckDB runtime calls, not schema-persistent objects.
Supporting file-backed views would allow PostgreSQL users to:
• Instantly query large Parquet datasets without ETL or import.
• Persist views that reference DuckDB’s file readers (read_parquet, read_csv, read_json, etc.).
• Integrate seamlessly with BI tools and ORMs that expect standard Postgres tables or views.
• Use pg_duckdb as a lightweight analytical layer for external data lakes — a true “zero-ETL” analytics pattern.
Example:
SELECT * FROM my_view LIMIT 10;
Expected Behavior
• PostgreSQL can store the view definition normally (pg_views, pg_catalog).
• On query execution, pg_duckdb should delegate the underlying execution plan to DuckDB.
• The DuckDB engine should lazily read the files at runtime, respecting the view definition.
• The user can refresh or drop the view like any other Postgres object.
• This feature should work in combination with DuckDB’s file globbing (**/*.parquet) and options like union_by_name.
Benefits
• Zero-copy, zero-ETL analytics on file-based datasets.
• Perfect for hybrid data lake / Postgres integration scenarios.
• Extremely fast development iteration (no loading, immediate schema exposure).
• Brings pg_duckdb to parity with the most useful part of MyDuckServer’s feature set.
Beta Was this translation helpful? Give feedback.
All reactions