Build button in dbt
In dbt, you do dbt build by typing this:
dbt build -s Dim_Product.sql
You can build the predecessors of that model too (meaning upstream), by adding a plus sign like this:
dbt build -s +Dim_Product.sql
That means that all the models which are used by Dim_Product will be built first. And that is not just 1 layer before, but ALL the layers before. All the upstream model will be build.
You can build the downstream models too, by adding a plus sign after the model name, like this:
dbt build -s Dim_Product.sql+
That “.sql” is optional actually. You don’t have to put it in. So this is perfectly valid:
dbt build -s Dim_Product+
Now here’s what I’d like to tell you about today: in dbt we have a button to do all that so you don’t have to type anything!
This is dbt development screen:
Notice the red arrow above? That’s the Build button? If you don’t click the Build button but the down arrow next to it, you’ll see this:
You can build just the model currently on the screen, or with the downstream, or with the upstream. Or both. Or run the model. Or test the model.
Very useful isn’t it?
Data Cloud Platform, Data Analytics Engineer, Certified DBA MSc, BSc
4 个月Cool Vincent. Very cool..
Data Cloud Platform, Data Analytics Engineer, Certified DBA MSc, BSc
4 个月... and I'm still learning, new data platforms, new data execution paradigms, etc. etc. every day... to become a better and better Data Engineer it's a journey, not just a pivot and a certification or two - sorry software engineers, sorry...
Data Cloud Platform, Data Analytics Engineer, Certified DBA MSc, BSc
4 个月OK for transformations and like the idea of SQL transformations as"code" wrapped up with git, ci/cd and other software engineering principles and pretty straight forward and useful, very popular, but IMHO too geared towards software engineers who think they are data engineers because they can write Python, use pandas, SQL alchemy etc. to connect to a database. No - a data engineer is way, way more than that - I know, I have been both and know what I had to learn to go from SE, through DBA to Data & Analytics Engineer. Regards, Andy. ??