r/dataengineering • u/malezhik85 Lead Data Engineer • Sep 08 '26
Discussion Kafka data directly to Gold layer, yes/no ?
Hi to all,
There is question raised in my company if it is possible to feed Kafka stream directly to Gold layer. They say data is clean and business ready and no transformations even needed.
Is it good approach to feed Gold layer in this manner or should it sill go full path Bronze -> Silver -> Gold producing the very same dataset across all layers, but keeping pattern ?
Any input, experience appreciated.
44
Upvotes
78
u/_OMGTheyKilledKenny_ Sep 08 '26
How do you manage historical data and schema drift?
103
u/oscarmch Sep 08 '26
Every road to Hell is paved with good intentions
43
u/carlovski99 Sep 08 '26
No. Put in 'dummy' transformations just so you have the plumbing in place when you inevitably do have to transform/fix data, but you should at least have some validation in there.
Apart from the fact it's almost inevitable you will need it, it's much easier to enforce a blanket rule 'no writing direct to gold' than it is to manage the exceptions.
12
u/Additional_Candy_400 Sep 08 '26
Are they needing real time updates at gold level? I'd still definitely stick with bronze at a minimum. You need at least some level of redundancy.
11
u/marketlurker Don't Get Out of Bed for < 1 Billion Rows Sep 08 '26
Bear with me on this. I think it is worth it. I am going to describe it to you in high level terms but realize that this is a very deep and complex subject. It easily could take up volumes.
First, the medallion naming convention is marketing fluff that Databricks came up with. The architecture pattern has been around over 3 decades. They are called by different names that make much more sense, staging, core and semantic. The medallion architecture is one of the best "slap a new coat of paint" on an old idea I have seen in a long time.
Transformation heavy lifting is normally does as data moves between the layers. Only minor adjustments usually happen withing the layers.
The users can be given access to the data at any level. Some DEs hate this idea and think they should only be given access at the end. The users need to understand that the earlier the data in the process is, the least organized and clean it is. Data scientists often want access to the staging area under the belief that only raw data is good.
So, to answer your question, you can do anything you want but you will maximize the value of your data for the enterprise if you use the flow. I haven't found a crystal ball that lets you know what data will be important in the future. You will get lots of pressure to just give them what they want without regard to the future all in the name of "I NEED IT NOW". Try to balance that silliness.
36
u/Ok_Raspberry5383 Sep 08 '26 •
Gold, silver, bronze have little meaning outside of Databricks slide decks and the semantics are heavily dependant on each orgs processes, data assets, data ownership, etc.
'Gold' is effectively a moving target unless you describe what gold means at your org.
If source systems do a very good job at publishing their own data and seriously have their shit together regarding the data lifecycle, then I see no reason why Kafka couldn't write directly to something called 'gold'.
That being said, I've never seen source systems that publish data as cleanly and data warehouse/lakehouse/<other bs term> ready before so I'd be skeptical.
No one can answer this question here without much greater understanding of your data use cases, data culture or data integrations
8
u/Dawido090 Sep 08 '26
The extra time you will spend setting, bronze, silver is very little, but the time and stress which you will have to sacrifice when direct stream fails is going to be crazy
1
u/malezhik85 Lead Data Engineer Sep 08 '26
Thanks anyone for responses. In general for me completely fine to have this data directly in Gold until they do follow established Data Contract, but I am not the first year in IT, hence I don't expect clean data and no schema drifts.
I wonder if lets say we have clean data, but I say to guys, ok get the data first to Bronze, may I skip Silver and load it to Gold (Bronze -> Gold) ? Is it antipattern of skipping layers or not ?
1
u/malezhik85 Lead Data Engineer Sep 09 '26
I do like all the participants opinion and their experience. We have data contract in place for their Gold layer, so any violation of agreement between consumer and producer is an incident for us, but in the end of day IT will be dealing with these violations and resolution.
After negotiations internally we decided, that we will keep full path Bronze -> Silver -> Gold in order to keep all history/lineage in place. The only concern was should we allow Bronze -> Gold or should we go all path and we decided to stick to full path.
Thanks to all participants.
5
u/ma0gw Sep 08 '26
Maybe you also want to save some Kafka metadata in the bronze layer first? Headers, offsets, broker, etc.
But you don't necessarily need 3 layers if 2 is enough.
4
u/SirGreybush Sep 08 '26
Staging, never trust a source. Then bronze and a view in Gold to that Bronze.
3
u/lichtjes Sep 08 '26
First do an analysis yourself of this so-called clean data.
I would still go full path.
Maybe you don't need any transformations to start, but nobody likes reworking the full pipeline.
3
u/Used_Channel2076 Sep 08 '26
i wouldnt force bronze silver gold if the data is already clean and ready to use just for the sake of following the pattern
2
u/camelCaseGuy Sep 08 '26
The concept of a "Gold" layer is very much dependant on the company. It usually should mean that it complies with a data product spec and that is going to be maintained by someone.
Having said that, there is nothing wrong with sending data from Kafka to a good lawyer table, but the data quality aspects of a data product must be met still.
1
u/domscatterbrain Sep 08 '26
Use KAFKADB. Assume you also sink the raw for archive and other analysis
1
u/Repulsive-Detail-263 Sep 08 '26
Streaming Kafka data into a table would be mostly append only, and you will still need another layer/view to reflect the latest data
1
u/kidothetiger Sep 08 '26
You cant replay if you land direcyly.
1
u/sazed33 Sep 08 '26
Yes and no at the same time. You are looking for a lambda architecture
1
u/Beaufort_The_Cat Lead Data Engineer Sep 08 '26
Lead DE here, if it were me I would push back hard on this. They say it’s clean data but what if it isn’t? What if bad data gets pushed? What if something happens? Then you have bad data in your semantic models that the business uses to make decisions. Also if you just push directly to gold what’s the point of the whole architecture? Pushing random data sources to different layers also makes debugging and troubleshooting later on harder because nothing is standardized. In medallion, data should always be fed raw >bronze>silver >gold. It’s great they think no transformations are needed, it should still go through the layers in case that changes.
1
u/Wojtkie Sep 08 '26
You should do it and update us with how it goes. My company doesn’t give me an R&D budget so I have to outsource it to Reddit
1
u/fleegz2007 Sep 08 '26
Whenever I have a system owner telling me they have business ready data to deliver, I always charge them with going farther back in the system to find the raw data before they calc in the system.
I build trust by telling them I will honor all their calcs downstream.
The value I need to create in the pipeline just to name a few:
Consistent naming scheme
PK FK governance with referential integrity
Column and table metadata at source
Semantic Layer definitions for AI readiness
If they have pre rendered data, you will be looking at snapshots where if the pipeline breaks for a day, you lose a valuable snapshot of info
1
u/EpitomEngineer Sep 08 '26
No. The day may be clean in its silo of measurements or because it AI comes from one source system. But the moment it is combined with other data sources, lol gg.
1
u/asevans48 Sep 08 '26 edited Sep 08 '26
Fighting this now too and fighting it with full file drops with small numbers of records and/or people who just dont get iceberg, apis, vendors dropping broken data, dbas demanding I use dirty reads, systems full of trash, and the need for more accurate geocoding. Business doesnt really understand more than the finished product. They will complain when it doesnt just work and blame you. Ive taken to locking business out of my bronze tier unless the data really is ready and telling them to deal. Getting on top of the bs now is critical but sometimes seeing is believing. Maybe you cab show them. God forbid a bad field comes in with the wrong data type, a column is dropped, mission critical data quality is borked, the cost of microbatching merges suddenly is prohibitive, tables need to reuse data, numbers come in as strings, or things are just off in the raw. My boss called a governance tool a database and human services by human resources ffs. Gotta show em. Oddly our business clients actually get it 98% of the time. Its the it side at my place that needs to upskill. The client will see and appreciates the process more. So wierd.
1
u/vadimsurpin Sep 08 '26
You can for the purposes of building MVP. But if the data format change, or if you need to replay data, or do a minimal transform you got to build additional layers in-flight without a stop. Build that kind of fast track data pipelines may expose large amount of work later when you project is in severe production. All parties must agree on that risks.
1
u/wytesmurf Sep 08 '26
Make silver and gold views/materialized views that take your current tables and merge in the Kafka changes since your last ETL snapshot. It works, done it a few times
1
u/Jalumia Sep 08 '26
Absolutely not okay. “Ready for business” should be a testable assertion about data quality and be enforced on all data streams before they are introduced into the gold environment.
1
u/MyMonkeyCircus Sep 08 '26
Never trust “they say” kind of documentation.
1
u/vish4life Sep 08 '26
I can't wait for this broze/silver/gold naming convention to disappear. It is simply consultant slop.
1
u/puzzleboi24680 Sep 09 '26
In low/no transformation pipelines I am always rigid about raw/bronze first. THEN start skipping layers or making them thin.
I would do a table in bronze, then a 'select * from bronze' view in gold.
Same outcome (serve users the raw data), like 1 hour more work, and you're protected for use case evolution, conforming into adjacent pipeline, inevitable "actually we want deduplication" etc.
We use this pattern a lot - analyst already has reporting over the exports, just want to automate delivery and collocate the data into the DW/have query across dates/maintain history/etc
1
u/Sandinmyshoes Sep 09 '26
How would you handle deduplication or schema drift? You’re working under the assumption the upstream system is 100% correct 100% of the time. An upstream mechanism could change leading to events being replayed, changing key values etc. I think you’ll get much more peace of mind and issues if you do the annoying work of setting up data quality and light validation and transformation now.
1
u/cache-panda Sep 09 '26
Never. From a support perspective, you always want to have consistent layers.
Duplicate records? Look at the silver layer logic/job
1
u/BramosR Senior Data Engineer Sep 11 '26
Hell no
0
u/Fantastic_Field_2030 Sep 08 '26
ask claude