Skip to content

DB.SCHEMA

=DB.SCHEMA lists the columns of a source you named with =DB.SOURCE. Use it to discover what you can query before writing the SQL for =DB.QUERY.

=DB.SCHEMA(source)

It takes exactly one source cell. To inspect several sources, call =DB.SCHEMA once per source — there is no multi-source form.

ParameterTypeDescription
sourcecellA single cell holding the result of =DB.SOURCE. A bare URL, a filename, or an array of sources is rejected — name the source with =DB.SOURCE first.

DB.SCHEMA spills a 2-column (name, type) grid: one row per column, with no header row. The first column is the column name; the second is its DuckDB type.

For the samples sales source the spill looks like:

order_idINTEGER
order_dateDATE
region_idINTEGER
product_idINTEGER
quantityINTEGER
revenueDOUBLE

(The grid above shows the two spilled columns; DB.SCHEMA adds no header of its own.)

  • 60-second timeout — describing an unreachable or very slow source is cancelled after 60 seconds with #N/A.
  • Recalculation — if the source cell changes while DB.SCHEMA is resolving, the in-flight describe is cancelled and re-run.
ConditionCell errorMessage
The source host can’t be reached#N/ASource not reachable: alias
The describe ran longer than 60 seconds#N/AQuery timed out (60 s) — try a smaller filter
The source can’t be parsed as its declared format#VALUE!Cannot parse source: …
DuckDB rejects the describe#VALUE!SQL: …

Name the samples sales file in A1, then list its columns in B1:

A1: =DB.SOURCE("https://dev-fdb.sumpalabs.com/samples/sales.parquet", "sales")
B1: =DB.SCHEMA(A1)

B1 spills the six (name, type) rows shown above.

  • =DB.SOURCE — name a source before inspecting it.
  • =DB.QUERY — query the columns you discovered here.
  • Examples — worked end-to-end queries.