Part 9. Raw and Bronze Landing
Raw and Bronze are responsible for input reproducibility. In the tutorial example, raw is the CSV files generated by scripts/generate_data.py. In a production setup, raw can be a landing zone in object storage, a Kafka topic, a CDC table, or an external source. But the principle is the same: the meaning of the data must not be changed at the first step.
Raw
The Raw layer answers the question "what arrived." It must not:
- rename business fields;
- delete rows;
- hide PII;
- correct values without evidence;
- aggregate.
If the source contains an empty revoked_at, raw preserves the empty revoked_at. The decision "an empty value means active consent" appears later, in the staging specification.
Bronze
Bronze adds minimal technical normalization: file format, basic type handling, load metadata, lineage. In the tutorial dbt-duckdb example there is almost no separate bronze layer, because CSVs are read directly by staging models. But it is important to understand the boundary in the text: bronze must not make product decisions.
Verifiability
Raw/Bronze acceptance facts:
- source files exist;
- headers match expectations;
- synthetic data generation is reproducible;
- the semantics of empty values and
nullis described in the manifest; - PII is not lost before the policy is approved.
Walkthrough for the Reader
Raw and Bronze are often underestimated, because "there is no business yet" there. But that is exactly where it is decided whether the team will later be able to explain the origin of the data. If the source file was overwritten to get a green test, the error only disappeared on the surface: along with it, the evidence that the source sent an ambiguous value also disappeared. In a banking context this is especially bad, because the dispute often arises not today, but a month later, when the calculation needs to be reconstructed.
The Raw layer should be boring and honest. It preserves the input. Bronze may add minimal technical normalization: file location, source name, load date, basic typing, presence checks. But Bronze also must not resolve questions that belong to the product. If an empty revoked_at means active consent, that must be recorded in the specification and staging logic, and not hidden in a manual CSV edit.
It is useful for the reader to distinguish between fixing data and describing data. In the tutorial example, the temptation is great: open the CSV, replace the empty string with a date, get a green dbt build. But that path teaches the wrong behavior. The right path is: record what arrived; describe how staging interprets emptiness; add a check; record in the test note why this decision was made.
Raw/Bronze is the place where SDD Data protects the future conversation. When a reviewer asks "why were active consents counted exactly this way," the answer should not sound like "that's how it ended up after cleaning the file." The answer should lead to raw, the manifest, the specification, staging, and the test. The shorter this chain of evidence, the less trust in the data mart.
Practice
Find one field with ambiguous empty-value semantics in the raw source. Write down where it should be saved as a raw fact, where it should be typed, and where it should be turned into a business rule.
Qwen Query
Check the raw sources in book3/examples/bank-lakehouse/raw.
Compare the headers with the expected sources from the domain map.
Compile a list of source facts and open questions.
Do not modify dbt models.
Minimal Output
After the chapter:
- raw files can be generated by a command;
- the tutorial example has manifest notes for at least two sources, and the
remaining sources are examined as an exercise;
- disputed values are flagged as open questions;
- nobody has confused raw cleaning with business modeling.
Common Mistake
Fixing raw data so that "dbt build passes." If dbt build fails because of an empty date, fix the staging contract or type handling, not by erasing the source signal from raw.
Review Questions
- Why must raw not delete PII?
- Where should the decision that an empty
revoked_atmeans active consent be made? - What acceptance facts does the raw/bronze layer have?