873 B
873 B
Datasets
One subdirectory per dataset. The folder name is the dataset's identity — used as:
- the
NVI_DATASETenv var value that selects it, - the Postgres schema where its tables live,
- the SQLite filename in
ctrl/seed/data/<name>.sqlitethat the loader reads from.
Adding a new dataset
- Place the source SQLite at
ctrl/seed/data/<name>.sqlite(or adaptctrl/seed/download.shto fetch it). - Create
api/datasets/<name>/:schema_docs.yaml— table and column descriptions.metrics.yaml— canonical SQL for business terms.
- Set
NVI_DATASET=<name>and restart the api. make seedwill load<name>.sqliteinto Postgres schema<name>.
The Plan/Analyses/Tools/Runtime code references no dataset name; only the
loader (api.tools.schema.load_schema) and the engine (api.tools.db)
consult the active-dataset setting.