A star (generator) is born
We’ve likely been here: Table A has 56 columns and we want to select all but one of them (column_56
). So here we go, let’s get started…
select
column_1,
column_2,
column_3,
please_save_me…
from {{ ref('table_a') }}
At this point, you realize your will to continue typing out the next 52 columns has essentially dwindled down to nothing and you’re probably questioning the life choices that led you here.
But what if there was a way to make these 56+ lines of code come down to a handful? Well, that’s where a handy dbt macro comes into play.