← Saturday, October 17, 2026DatabasesGuide

DuckDB converts JSON text columns into typed columns directly in SQL

duckdb.org by The DuckDB team 7 min read Editor score 7/10

DuckDB can infer and adjust a schema from JSON stored in a VARCHAR column, then produce typed columns without exporting the data to a file. This removes an unnecessary round trip from common analytics and ingestion workflows.

What
DuckDB can turn JSON stored in a VARCHAR table column into typed columns directly in SQL, without writing it to a file first.
How
Casting the column to JSON lets json_group_structure merge the structures of its values into one schema, including keys that appear in only some rows.
Why it matters
Direct conversion avoids a file round trip, while schema inference can avoid repeatedly parsing JSON for each extracted field.

Discussion

Discussion is not switched on yet. Use Note above to keep your own thoughts on this story.

Headline, summary, brief and diagram are written by a model from the source's own text; the link, byline and numbers come from the source. Read the original before relying on a claim.

Your note

Private to you. Stored in this browser, and synced to your account when you are signed in.