a month ago
I recently published my first technical blog! I was a little nervous about sharing it, but I’m happy to take this first step. I hope to keep sharing what I learn and improve my writing along the way.
For this article, I chose a question I’ve encountered in real projects: when does it make sense to split a Medallion layer into separate stages?
The article explores how to make that decision based on responsibilities, reuse, data quality, ownership, and consumer needs. It also separates three decisions that can easily become mixed together: organizing transformation logic, storing intermediate results, and making outputs available to consumers.
It includes a practical Silver example using a private materialized view, expectations, and a quarantine output, followed by a discussion of how logical layers relate to Unity Catalog schemas.
My main takeaway is that a layer should have a clear responsibility and a reason for its output to exist.
Read the article here:
https://www.sunnydata.ai/blog//blog/medallion-architecture-databricks-layers
I’d be interested to hear what you think and how you approach these decisions in your projects. Suggestions on what I could improve or explain more clearly would also be welcome.
2 weeks ago
Congrats on the first post, Juan. Treating logic, storage, and publishing as three separate decisions is the most useful part, because most layer debates go wrong when those get collapsed into one.
My default is simplicity. Start with bronze, silver and gold, and add a stage only when you can point to a concrete business reason. Your test (a clear responsibility, and someone who needs the output) is a good one. I’d make the burden of proof explicit: every extra stage is a permanent cost in refresh time, storage, lineage to explain, and one more thing to break. If you can’t name the cost it removes, it hasn’t earned its place. Good reasons I’ve seen:
“It felt cleaner” or “every transformation gets a layer” don’t qualify. That’s the mistake your “common mistakes” section calls out, and I’d put it even more bluntly.
Two things I’d like to see expanded:
I also liked the point that schemas don’t have to map one-to-one to stages. Looking forward to the catalog and schema post.
2 weeks ago
Congrats on the first post, Juan. Treating logic, storage, and publishing as three separate decisions is the most useful part, because most layer debates go wrong when those get collapsed into one.
My default is simplicity. Start with bronze, silver and gold, and add a stage only when you can point to a concrete business reason. Your test (a clear responsibility, and someone who needs the output) is a good one. I’d make the burden of proof explicit: every extra stage is a permanent cost in refresh time, storage, lineage to explain, and one more thing to break. If you can’t name the cost it removes, it hasn’t earned its place. Good reasons I’ve seen:
“It felt cleaner” or “every transformation gets a layer” don’t qualify. That’s the mistake your “common mistakes” section calls out, and I’d put it even more bluntly.
Two things I’d like to see expanded:
I also liked the point that schemas don’t have to map one-to-one to stages. Looking forward to the catalog and schema post.
a week ago
Hi @slowder!
Thanks for taking the time to read it and leave feedback.
“If you can’t name the cost it removes, it hasn’t earned its place” is a useful way to sharpen the checklist. I’d apply that separately to adding a logical step and persisting its output, since that distinction is central to the article.
Both suggestions give me something concrete to expand. For stored intermediates, I’d look at reuse, recompute cost, and freshness requirements together rather than suggest a fixed number of consumers.
The quarantine ownership point is especially good. I covered where rejected records go, but I should say more about who reviews them, how corrections happen, and how they get reprocessed. That would make the example much more useful in practice.
Thanks again. I’ll keep these points in mind for the next article.
a week ago
Thanks for sharing this article! I particularly like the point that separating transformation logic, persisting intermediate results, and exposing datasets to consumers are three different architectural decisions.
In our environment, we use Databricks for processing, AWS S3 for storage, HVR for OLTP ingestion, and downstream jobs for data outgestion. One practical challenge is deciding whether to introduce an additional Silver sublayer when multiple downstream pipelines need the same standardized and validated data.
My approach would be to consider a separate stage when it provides reusable business logic, independent data-quality checks, clearer ownership, or easier troubleshooting. I would also evaluate the cost of maintaining an intermediate Delta table versus recomputing the transformation.
One question I have: when several downstream pipelines reuse the same Silver transformation, would you generally recommend persisting it as a Delta table or using a private materialized view in Lakeflow Spark Declarative Pipelines? How would you evaluate the trade-offs in refresh cost, incremental processing, and operational flexibility?
a week ago
Thanks for reading @krishgarikipati ! I’d make the choice based on where the reuse happens.
A private materialized view persists its results, but it’s scoped to the pipeline that creates it. I’d use it for shared intermediate logic within that pipeline. If separate pipelines need the output, I’d publish a Silver dataset in Unity Catalog, either as a materialized view or a job-maintained Delta table.
I’d lean toward a published materialized view when its refresh behavior fits the workload. Incremental refresh requires serverless and a supported query; the default cost model can still choose a full recompute, so I’d check the event log before estimating savings.
If I needed more control over writes, backfills, or downstream integration, I’d consider a regular Delta table. For your setup, I’d also check whether the outgestion jobs query Databricks or read storage directly.
My starting point would be one shared Silver output with a clear owner and freshness requirement, then compare its storage and refresh costs against repeated computation.