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.
Signature
Section titled “Signature”=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.
Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
source | cell | A 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. |
Return shape
Section titled “Return shape”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_id | INTEGER |
order_date | DATE |
region_id | INTEGER |
product_id | INTEGER |
quantity | INTEGER |
revenue | DOUBLE |
(The grid above shows the two spilled columns; DB.SCHEMA adds no header of its own.)
Limits
Section titled “Limits”- 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.SCHEMAis resolving, the in-flight describe is cancelled and re-run.
Errors
Section titled “Errors”| Condition | Cell error | Message |
|---|---|---|
| The source host can’t be reached | #N/A | Source not reachable: alias |
| The describe ran longer than 60 seconds | #N/A | Query 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: … |
Example
Section titled “Example”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.
See also
Section titled “See also”=DB.SOURCE— name a source before inspecting it.=DB.QUERY— query the columns you discovered here.- Examples — worked end-to-end queries.