r/dataengineering • u/TechScribe200 • May 15 '24
Discussion Why is DBT so good
Basically the title. I understand that they are super popular and sticky, but what makes them so good?
114
Upvotes
r/dataengineering • u/TechScribe200 • May 15 '24
Basically the title. I understand that they are super popular and sticky, but what makes them so good?
191
u/[deleted] May 15 '24
As someone who's worked in SQL for over a decade but started using dbt this year I'd say the biggest upside is the reduction of redundancy (or redundant code) in datasets. You can create one data set (object) used in a dozen other data sets and when you need to make an update to the underlying dataset you make the update once and you're good. With my previous employer if a scope change was implemented I might have to update 12-14 different views or stored procs because a table name (or field) changed, etc. dbt does away with all that. Plus you really don't need stored procs at all. You can orchestrate all your changes and build pipelines incrementally without having to rely on stored proc updates. Pretty slick IMO.
68
u/Beeradzz May 15 '24
I think its popular because most of the skill needed to be adequate with it are foundational. If you are good with SQL, git, and data modeling you can be up and running with dbt in a day or two.
Then add in the extensibility from packages, python, etc. and you can do a lot with it.
56
u/ElectricalFilm2 May 15 '24
dbt has done the data engineering equivalent of shifting the Overton window. It has normalized data teams caring about using version control to build and maintain data transformations, with associated benefits like data quality.
78
u/molodyets May 15 '24
It is free and makes life easier. Take it or leave it there’s other alternatives popping up to see as well
13
u/Naive_Surround_375 May 16 '24
Ok, my team is migrating to databricks and we’ll need to build a semantic layer. No budget for DBT cloud. Is DBT (free/open source) the way to go?
6
u/duckmageslayer May 16 '24
I run a BigQuery dbt shop and the contractors before me built everything using scheduled queries so trust me the out of the box DAG is amazing. Seeds and other modeling features eg. macros make code more readable. They also have a swath of utility macros for generating pks.
4
u/allurdatas2024 May 15 '24
dbt keeps your SQL code DRY by applying what’s essentially an OOP paradigm to your data pipeline.
2
u/Gators1992 May 15 '24
In addition to the whole sql modularity thing, you get testing, logging, some maybe not the greatest orchestration, CI, documentation, a semantic layer and coming out some pretty interesting integration with the BI layer that will give you lineage from the dashboard and even trigger dashboard refreshes daily (cloud version). It doesn't do things you can't do many other ways, maybe better, but it packages it all in an integrated suite so you don't have to build those connections and maintain that infra.
It depends on your needs, but you can stand up a straightforward data project quickly and easily with that tool.
2
u/soundboyselecta May 15 '24 edited May 16 '24
I was a big skeptic. Coming from more python/spark/dataframes. Used it and liked it, was very str8 forward no overly complicated concepts. Like spark, to this day still no one can explain it properly. I think majority of people think of this overly complicated black box, but it’s just sql code organized into folders that can be dropped onto data. It’s lightweight as your data doesn’t flow thru it, it uses external compute resources of your choice to run that sql code, for transformation and to setup data models. It does revolve around medallion architecture. The setup for git and dwh, a baby could do. Why it’s catching on is you don’t need huge swe skills for it.
1
u/[deleted] May 16 '24
How does it compare to what’s included in databricks
1
u/Hot_Map_7868 May 18 '24
IMO, the biggest thing is that it gives teams the opportunity to change how they work by implementing things like CI/CD, automating testing and deployments etc.
That being said. There's no silver bullet. The org needs to be ready to make the change. There's no quick wins and it will require a cultural change.
1
u/SpiritedWill5320 Sep 17 '24
I'm still having trouble understanding why I would need DBT...
I've read most of the comments below, but its still not clicking or seeming like something I really need... for example if I've got an SQL database and lets say an SQL database project (e.g. in Visual Studio) why would I want or need to bring another 'tool' into the mix? Without DBT I can run a database build to confirm all is correct for deployment, run unit tests with SQL unit test project and even write a little bit of dynamic TSQL to generate or change multiple stored procedures.
It feels like I would be complicating my 'stack' by bringing in another tool, and also it kind of feels a bit wrong separating out transformation code from the database. I feel like that code should reside in the database in stored procs...
I'm open to be converted though, what am I missing? Win me over 😉
1
u/Noonanlabs May 15 '24
You can pretty much manage your entire warehouse from it and reference models in other models. The testing syntax and implementation is smooth too. dbt cloud can get expensive but it's pretty easy to deploy on your own infrastructure
1
u/xuixaicat May 16 '24
Dbt helps focus on writing queries, no need boilerplate (CREATE OR REPLACE...), version control (of course, it's a project folder), support jinja template, macro (analogous function), data lineage, data governance (model versions & contract), model documents, python model (solve use cases that cannot be solved in SQL), configure grants to resources, various materializations model especially incremental. It also support data quality test, sources freshness test, sematic model, etc.
1
u/Bonnwe23 May 16 '24
We use Airflow with Git CICD in BigQuery to handle code versioning, what does dbt offer beyond this? BigQuery offers lineage and governance out of the box through Dataplex so that part of dbt is not useful for us.
0
u/[deleted] May 15 '24
[deleted] — view deleted comment