Datasets¶
A dataset is one table that others read, keyed by its name under datasets. Its entry says
what one row is (grain), what each column means (columns) and which vendor releases it reflects (dates_asof).
What an agent must know beyond that (definitions, rules, quirks, recipes) is not in the entry: it is a
fact in oryxkb/facts.yaml whose about names the dataset. Every key is optional. Each dataset gets its
own card.
Start with four keys: purpose, grain, columns and dates_asof. The rest is for when you need it.
Example¶
datasets:
Rents:
purpose: Quarterly asking rent per market and sector.
grain: [market_id, sector, period_yq]
profile:
period: period_yq
entities: [market_id]
coverage_by: [sector]
dates_asof:
vendor_a:
constant: "2026-09-30"
cadence: quarterly
columns:
market_id:
type: string
description: market code
sector:
type: string
description: property sector
period_yq:
type: string
description: calendar quarter
rent:
type: number
description: asking rent
currency: USD
per: year
as_of_sources: [vendor_a]
withheld:
- what: lease-level rows
where: Leases
why: licence review pending
removed_columns:
- name: rent_old
removed: 2026-10-29
use_instead: rent
license: CC-BY-4.0
aliases: [Rent]
A dataset that a pipeline step saves as several tables declares them under outputs; see
Outputs.
Fields explained¶
Grouped by job.
- Identity.
purposeis the one line an agent reads first;descriptionis longer text.grainlists the columns that identify one row; it is the most useful key in the file, because it tells an agent what a sum means and which joins are safe.aliaseslists former names of the dataset that still work. - Columns.
columnssays what each column is and its unit. See Columns. - Profile. The
profileblock (period,entities,coverage_by,series) shapes the coverage profile shown to agents. See Profile fields below. - Releases.
dates_asofsays where each vendor source's as-of date comes from: a fixed date, a column, a setting of the pipeline that builds the dataset, or an upstream dataset. See As-of dates. - Facts. Definitions, rules ("read market_id as text"), quirks, recipes, findings, open questions and proposed decisions are not keys
of the dataset. They are one list in
facts.yaml, each withabout: [Rents]or a column such asRents#market_id. They reach a consumer's card only when the dataset is exported (seeexportedbelow). - Who reads it.
exportedsays whether other projects read this dataset (defaulttrue, so a vendor folder needs nothing). A tool fills it from the engine, as it fills column types: in oryxflow, from the task'sexport = True. Facts about a dataset that is not exported stay with the project's own agents. In an engine-built project the adapter fills anexported: falseentry for every non-exported task, so the agent only adds facts. - What is missing.
removed_columnslists columns that used to exist and what replaces them.withheldsays what data is deliberately left out of what you share, and where to get it (so the agent that uses the data does not hunt for it).exported: falsesays something else: a whole dataset is internal and not read by other projects. - Commercial.
licenseis the licence text.pricinglists plans (Pricing). - Other.
checksnames other datasets whose checks must pass before this one is trusted, for example a validation table:checks: [RentsValidation].displaylists files made for people from this dataset (for example a spreadsheet), each with one line of description.identity_only_paramsis specific to the first implementation's pipeline engine (see the table).
Outputs¶
A pipeline step may save several tables under one dataset name, such as a summary and a by_market table. Declare
each under outputs, with its own purpose, grain and columns:
datasets:
RentsReport:
purpose: Quarterly rent report, saved as a summary and a by-market table.
outputs:
summary:
purpose: One row per sector and quarter.
grain: [sector, period_yq]
columns:
sector:
type: string
description: property sector
period_yq:
type: string
description: calendar quarter
rent_growth_annual:
type: number
description: rent growth over four quarters
unit: decimal
per: year
by_market:
purpose: One row per market and quarter.
grain: [market_id, period_yq]
columns:
market_id:
type: string
description: market code
period_yq:
type: string
description: calendar quarter
A dataset with outputs declares purpose, grain and columns inside each output, never on the dataset itself: a
dataset with outputs and columns or grain is an error. A fact names an output as
RentsReport.summary#rent_growth_annual, or that column in every output as RentsReport.*#rent_growth_annual
(About ids). The same column name may differ in scale between outputs, which is why facts are
scoped to the output. Write each column as a block map, one key per line; flow maps ({type: string, ...}) are a
style to avoid. A fact about an output
shows on its dataset's card, under that output.
Profile fields¶
The profile block holds four keys that only shape the profile shown to agents: period, entities,
coverage_by and series. Nothing checks them against any rule, beyond each named column being in the data. A tool
generates the profile from the data, so nobody types counts that go stale. You can leave the block out.
grain: [market_id, sector, period_yq]
profile:
period: period_yq
entities: [market_id]
coverage_by: [sector] # optional
series: [market_id, sector] # optional; default = grain minus period
The profile lines below follow the card of the first implementation; they are illustrative.
period: the time column. The profile reports the first and last period.
Coverage (G): period_yq 2010Q1..2026Q3.
series: the columns that pick out one time series, meaning one line on a chart. You rarely write it: when
grain and period are declared and period is in the grain, series defaults to the grain minus period
([market_id, sector] above). Write it only when one series is keyed by fewer columns than that. The tool counts the
series, how many reach the latest period, and how many have gaps.
Coverage (G): period_yq 2010Q1..2026Q3; 110 series by market_id x sector; 104 reach the latest period; 6 have gaps.
coverage_by (optional): a category column with few values to break coverage down by. For each value the
profile shows the first and last period, the row count and the number of distinct entities. It is not a uniqueness
rule. Do not use the period column; that would list every quarter.
By sector (G): industrial 2012Q1..2026Q3, 3,410 rows, 55 market_id; office 2010Q1..2026Q3, 4,120 rows, 55 market_id.
entities: the columns naming what the rows are about. The profile counts their distinct values, overall and per
coverage_by value (as in the line above).
Entities (G): 55 market_id.
How they differ: grain is what makes a row unique; series is the grain minus time; entities are the things you
would count ("55 markets"); coverage_by is how you would slice the counts.
Writing period, series, coverage_by or entities directly on the dataset, outside profile, is an unknown
key (error); a checker should say to move it under profile.
Definitions¶
"In the data" means among the columns of the dataset's data as stored (see Errors and warnings).
| Key | Type | Required | Priority | Check | Description |
|---|---|---|---|---|---|
purpose |
string | no | Important | prose lint | One line, shown first. |
description |
string | no | Useful | prose lint | Longer text. |
grain |
list of column names | no | Critical | each column must be in the data (error); hint if none is declared | The columns that identify one row. |
profile |
object | no | Important | unknown keys inside are errors | What shapes the profile shown to agents. Profile only. |
profile.period |
column name | no | Important | must be in the data (error) | The time column. |
profile.entities |
list of column names | no | Useful | must be in the data (error) | Columns naming what the rows are about; distinct values are counted. |
profile.coverage_by |
list of column names | no | Important | must be in the data (error) | A low-cardinality category to break coverage down by. |
profile.series |
list of column names | no | Useful | must be in the data (error) | Columns that identify one time series. Default: grain minus profile.period, when both are declared and the period is in the grain. |
columns |
map of name to Column | no | Critical | - | Column declarations, one block map per column (no flow maps). |
outputs |
map of name to Output | no | Important | error if set together with columns or grain |
The tables of a dataset saved as several; see Outputs. |
outputs.<name>.purpose |
string | no | Important | prose lint | What this output is. |
outputs.<name>.grain |
list of column names | no | Critical | each column must be in the output's data (error) | What one row of this output is. |
outputs.<name>.columns |
map of name to Column | no | Critical | - | Column declarations of this output. |
exported |
boolean | no, default true |
Useful | - | Whether other projects read this dataset. A tool fills it from the engine. Decides who sees the dataset's facts. |
withheld |
list of string or object (what, where, why) |
no | Useful | prose lint | What is deliberately not shared. |
withheld[].what |
string | yes (object form) | Useful | - | The omitted data. |
withheld[].where |
string | no | Useful | - | Where to get it. |
withheld[].why |
string | no | Useful | - | Why it is not shared. |
removed_columns |
list of object | no | Important | error if a removed column is still in the data (a tool may report it as a warning while publishing) | Columns that used to exist. Do not reuse the name for a new meaning; see Schema changes. |
removed_columns[].name |
string | yes | Important | as above | The removed column. |
removed_columns[].removed |
date | yes | Important | - | When it was removed. |
removed_columns[].use_instead |
string | no | Important | - | The column that replaces it. |
removed_columns[].note |
string | no | Important | prose lint | Free note. |
dates_asof |
map of source name to string or AsOf | no | Critical | see as-of | Where each vendor source's as-of date comes from: a fixed date, a column, a setting of the pipeline that builds the dataset, or an upstream dataset. See As-of dates. |
license |
string | no | None | - | Licence of this dataset. |
pricing |
list of PricingPlan, or [] |
no | None | see pricing | Plans for this dataset. [] means none, even if the project has some; absent means the project's. |
aliases |
list of string or object (name, until) |
no | Important | error unless each name uses only letters, digits and _ and does not start with a digit |
Former names of this dataset. |
aliases[].name |
string | yes (object form) | Important | as above | The former name. |
aliases[].until |
date | no | Important | - | Until when it still works. |
checks |
list of string | no | None | error if a name is not a dataset (or a <project>/<Dataset> id) |
Other datasets whose checks must pass before this one is trusted. |
display |
map of string to string | no | None | prose lint | Files made for people from this dataset, each with one line of description. |
identity_only_params |
list of string | no | None | - | Implementation-specific: settings of the pipeline run that name a variant but do not change the data. An implementation may check the names exist. |