Skip to main content
read_json reads line-delimited JSON files and returns one row per JSON object. Each object key becomes a typed column.

Signature

Supported extensions: .json and .jsonl. Chowder skips empty lines and lines containing only spaces, tabs, or carriage returns. Every other line must contain one complete JSON object.

Example

Columns

Chowder detects the columns and their types from the data:
  • Object keys become columns.
  • Nested objects become STRUCT columns.
  • Arrays become ARRAY columns.
  • Scalar values become BOOLEAN, BIGINT, DOUBLE, or VARCHAR columns.
  • A key missing from an object is null in that row.
read_json does not add a source column because the input may already contain a column with that name. A glob that matches no files returns an empty result. A malformed line fails the query.

Execution

  • Chowder reads only the columns the query selects, and LIMIT stops reading once the query has enough rows.