data_updater_v2.tables.provision
provision.py — this container’s tables, made once at deploy (and again after a restore):
the group tables of configs.data_updater_v2 (CONFIG_TABLES) with their edit stamps and
the four monitoring.data_updater_v2 tables in the central databases; in the pipeline’s
database every raw table (RAW: the catalogs, the changes, the calendar, the prices, the
events, the constituents, the metrics), the maintenance tables (MAINTENANCE) and the vendor
calls’ rate limiter (common_rates.limits). Made here, before any job, so two steps never
create one table at once and dbt’s views find every table they name from the first run. With
jobs (every job the location serves and its row: jobs.seeds()) each job without a row
gets one in its group’s table, switched off, its params written out — a missing row stops a
job, and nothing runs until a row is turned on by hand. Idempotent: what exists is left as it
is, rows kept, a stored row never touched.
Functions
provision
provision(db: DBClient, jobs: Mapping[str, Seed] | None = None) -> list[str]Make what is missing of the container’s tables, through db’s configs and
monitoring targets (DBClient.from_env routes both) and its own database: the group
tables of the controls (each of jobs without a row given its Seed in its group’s
table, off), then every raw and maintenance table, then the limiter’s. Returns the tables,
schema-qualified, by database, and the rows added (configs.<schema>.<group>:<job>).