Design a standard way to add rules to data on its way into the data warehouse — and prove it with one real rule from Carrie.
Today each rule is written by hand, one at a time. The ticket's own word for that is "ad hoc".
"Ingestion" is the middle arrow on the left: getting data out of Salesforce and into Redshift. This ticket is about what happens to data during that step.
IndividualApplication.ies-data-salesforce-extraction, pulls changed records on a schedule.IndividualApplicationHistory, which is not in the zero-ETL list.ETL means Extract, Transform, Load: code we own that moves data. Zero-ETL means AWS does the move for us.
salesforce_reportingA materialized view is a saved query whose result is stored, so reports read it quickly.
mv_individual_application_history) reads the files from the ETL job.This is the shelf that reports take data from. So any rule that changes or hides data has to take effect here, whichever road the data came in on.
Illustration: store a country as its full name instead of a code.
Illustration: an application with no program attached.
Illustration: test records created by staff.
The illustrations are made up to show the idea. The real rules come from Carrie.
mv_individual_application only renames columns, for example "InternalStatus" becomes internal_status. No rules at all.
WHERE old_value IS NOT NULL AND old_value != ''
In mv_individual_application_history, on the legacy history rows. They are dropped silently.
Carrie's reports read the results and quarantine tables. Nothing is dropped without a trace.
- id: sf_ia_incomplete_001 owner: Carrie Rackers Cunningham ticket: WIN-3370 source_object: IndividualApplication type: check # transform | check | skip condition: "<to be given by Carrie>" severity: warn active: true
No new job. No view edited by hand.
This format is a proposal. It has not been built yet.
The ticket names one test case: student applications "with ap incomplete". The exact condition is not written down anywhere yet.
| Topic | Why it matters |
|---|---|
| Check or skip? | They sound alike but a skip removes data from reports. Each rule must say which one it is. |
| Related records | If an application is skipped, what about its timeline and participant records? |
| Coming back | When a skipped record is later fixed in Salesforce, should it reappear by itself? |
| Auto refresh | 13 views refresh automatically. Adding rules to them must not break that. Untested. |
| Freshness | AWS states a minimum delay of one hour for zero-ETL from applications like Salesforce. |
| Deletes | The ETL job does not capture records deleted in Salesforce. |
| Unconfirmed | That the 13 views read the zero-ETL copy is inferred from a schema name, not yet proven. |
Instead of copying straight into Redshift, zero-ETL can write files to S3 storage (the "lakehouse"), and Redshift reads them from there.
Verdict: possible, but a separate decision. The rule layer works the same either way, so it does not need to wait for this.
Full detail and evidence: docs/WIN-3370_ingestion_rules_architecture.md