Querying a Partitioned Azure Blob Data Lake from PostgreSQL with pg_duckdb
The article explains how the pg_duckdb extension lets PostgreSQL query a partitioned Parquet data lake stored in Azure Blob Storage as a single table. Its read_parquet() function accepts glob patterns and explicit file lists, so a query reads only the files it needs. Hive-style folder names such as year=2024 are exposed as real columns when hive_partitioning is enabled, and files can be pruned by partition. Examples use PostgreSQL 18.6 with pg_duckdb 1.1.0, showing that partition values are inferred as bigint and that union_by_name can align columns across files with differing schemas. The author notes that ARRAY[...] syntax is required for lists in PostgreSQL, since DuckDB's bracket syntax is rejected by the PostgreSQL parser.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.
Discussion (0)
Log in to join the discussion and vote.
Log in