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.
Make the data on S3 the product, and every tool a replaceable reader.
Beside Curated sit two more tables: rule results and quarantine. Both roads from Salesforce — and later Workday and other systems — write into the same Landing layer.
Rules are plain conditions in a list, so the runner can be swapped later without rewriting them. Carrie's reports read the results and quarantine tables from any tool.
- 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.
| Candidate use case | What it needs from the data |
|---|---|
| Enrollment and withdrawal prediction (the lead) | Every change, with its date. A model may only use what was known when the student applied. |
| Forecasting, ledger anomalies | Finance and Workday data in the same landing zone, not only Salesforce. |
| Duplicate person matching | One agreed person record across systems. |
One subject only: the individual application and its history. The ticket's test case is applications "with ap incomplete"; the exact condition is not written down yet.
The 13 live views are not touched during the proof of concept.
| Topic | Why it matters |
|---|---|
| Check or skip? | 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, should it reappear by itself? |
| Refresh | AWS pages disagree on automatic refresh over these tables. Plan for scheduled refresh. |
| Zero-ETL to S3 | How updates and deletes are applied is not documented. Test on one object first. |
| Lowercase names | Redshift views over open tables need lowercase names. Curated uses them throughout. |
| Permissions | Today's permission model for the lake could not be read. It must be decided once. |
Why accept the cost: the thin slice is the same size as the original proof of concept, and it tests the foundation and the rules together.
Full detail and evidence: docs/WIN-3370_lakehouse_foundation_design.md