Agregar el job que reconstruye silver y gold sin ingerir

This commit is contained in:
2026-12-02 21:57:33 -06:00
parent b5480e8bbb
commit d27319ad1f
+14 -1
View File
@@ -107,6 +107,19 @@ def analyze():
analyze_studies()
@dg.op
def build_gold(context: dg.OpExecutionContext) -> None:
"""Silver and everything derived from it, with the deployed code: what an ingest ends
with, without ingesting (after deploying a version that changes the tables)."""
silver.build(["silver+"])
context.log.info("silver and gold rebuilt")
@dg.job(tags=WRITES)
def rebuild():
build_gold()
@dg.op
def make_backup(context: dg.OpExecutionContext) -> str:
"""The data folder into BACKUP_DIR (persistance.backup); the newest BACKUP_KEEP stay."""
@@ -131,4 +144,4 @@ nightly = (
else []
)
defs = dg.Definitions(jobs=[ingest, train, score, analyze, backup], schedules=nightly)
defs = dg.Definitions(jobs=[ingest, train, score, analyze, rebuild, backup], schedules=nightly)