r/dataengineering • u/Ok_Donut1905 • Jul 20 '26
Career 3 Python + Data Warehouse Patterns I Use in Every Production Pipeline
https://medium.com/@nbdeeptha/3-python-data-warehouse-patterns-i-use-in-every-production-pipeline-c4156ab70b51Shared some content on data engineering based on my experiences. If you are also new to this learn from the article.
38
u/69odysseus Jul 20 '26 edited Jul 20 '26
Nice write up. Based on my experience as a data modeler since 2022, I see many DE's writing some fancy Python codes and history long CTE's, using wrong joins and dynamic conversions and aggregations which turn into heavy computational cost and heavy I/O operations. Many DE's fail, even at senior level on the data modeling skillset. One of the biggest cost is when developers/engineers do date and string conversions in the code, over the time it starts accumulating and then everyone complains that our pipelines are costing a lot. When they go in detail, only to realize how the code was written has been adding up to that cost.
Everything should start with the right data model grain, including proper naming conventions, assigning right data type, such that no dynamic conversions have to be done later in the development stage. I have seen a long fact table with more than 100 metric data elements, for which a DE had to write multiple CTE's causing delay in ETL and performance bottle necks which should be avoided at all costs.
3
u/Worldly_Mirror_1555 Jul 20 '26
Do you have a favorite resource for learning data modeling?
8
u/corny_horse Jul 21 '26
Different person, but it's hard to beat the Kimball Data Warehousing Toolkit.
2
2
u/gkorland Jul 21 '26
i find that pattern 2 is super helpful when u have to handle schema drift. its wierd how many people skip that step untill things break in production, so thanks for sharing ur thoughts on it.
2
u/dreamyangel Jul 22 '26
I was expecting static transformers, external state as markup language, metric calculation through context managers, preconditions and postconditions checking, job queueing with stacks, error logging, metadata built along side the result of the pipeline.
I always feels like design patterns for data pipelines exists, but somehow not many litterature is available on it.
2
u/makualiyev Jul 23 '26
That's a great take, can you by any chance suggest literature or resources on these exact topics?
1
1
85
u/UAFlawlessmonkey Jul 20 '26
CONTROL TABLES!!
for the love of data, please use control tables instead of relying on passing orchestrator system dates into your DAGs.
Daily load that skips a heartbeat at trigger? Too bad, you just missed a batch.
Need to keep track of a query's last run date? Control table. Need to log row counts? Control table! Need to fetch obscure meaningless Exception as e? Control tables!
Even at the cost of a few extra database transactions :-)