refactor CHPA 01 and 02 warehouse jobs

This commit is contained in:
2026-08-20 19:39:11 +08:00
parent 8c3f45f178
commit fd1355a4fb
26 changed files with 4391 additions and 44 deletions
+2
View File
@@ -100,6 +100,8 @@ SQL rules:
- Replace update-driven staging with ordered CTEs only after proving the result is equivalent.
- Keep one-time target DDL in a commented, separate Databricks cell above the write.
- Prefer `CREATE TABLE IF NOT EXISTS <new_table> LIKE <verified_legacy_table>` when the legacy schema is the authoritative type contract.
- For a stateful rolling/incremental target, seed retained state with an approved clone or backfill before the first run; an empty `LIKE` table is not sufficient.
- When a legacy `SELECT *` contract is unknown, define and document a deliberate narrowed contract with zero-row CTAS type inference instead of creating unknown columns that remain NULL.
- Do not guess source field types when no DDL or `DESCRIBE` output is available.
## Validation