Menu

Load CSV and JSON from Azure Blob into Postgres with pg_duckdb
πŸ“°

Load CSV and JSON from Azure Blob into Postgres with pg_duckdb

DEV Community: azureΒ·Franck PachotΒ·4 days ago
#dkGsTRln
#devtoazure#devto#dev#table#postgres
Reading 0:00
15s threshold

Data arrives as files. A vendor drops a CSV in a container, an upstream system exports newline-delimited JSON, a daily extract lands in Blob. The usual way into Postgres is a client-side load tool and a hand-written COPY with a column list. With pg_duckdb you can skip most of that: point read_csv() / read_json() at the file in Blob, let DuckDB infer the schema, and CREATE TABLE AS straight into a normal PostgreSQL table β€” or just query the file in place and never import it.

Setup

Only the Blob secret is needed:

CREATE EXTENSION IF NOT EXISTS pg_duckdb ; SELECT duckdb .…

Continue reading β€” create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.