recon_gen.common.etl_examples
Canonical INSERT-pattern examples for ETL authors (X.1.h).
Returns a runnable-against-the-prefix-of-your-choice SQL string that
demonstrates every base-table shape the dashboards rely on. The output
is exemplary, not executable against your real demo seed — every
pattern uses fixed sentinel IDs (-EXAMPLE suffix) so the
statements are self-contained and never collide with seeded rows.
Each block carries:
a
-- WHY:header naming the business invariant the pattern protects, anda
-- Consumed by:header naming the dashboard view that reads the resulting rows.
The integrator’s ETL strips the -EXAMPLE suffix and wires the
column projections to their upstream feed’s source fields. The
<prefix> placeholder gets templated by sed (or whatever
inline-substitute the integrator’s deploy pipeline uses) at the
caller’s discretion — the helper itself stays prefix-agnostic.
Pre-X.1.h the helper returned a single placeholder line referencing
deleted apps/payment_recon/etl_examples.py /
apps/account_recon/etl_examples.py files (gone in M.4.3 / M.4.4),
giving operators a one-line file the etl.md handbook claimed
“covered every base-table shape.” X.1.h replaced the placeholder with
real patterns.
Functions
Return the canonical INSERT-pattern SQL string. |
- recon_gen.common.etl_examples.generate_etl_examples_sql()[source]
Return the canonical INSERT-pattern SQL string.
See module docstring for the full contract; the output is one pattern block per
Pattern Nheading, each carrying-- WHY:+-- Consumed by:documentation. Output is stable across invocations (no random IDs, no timestamps that vary by clock).- Return type:
str