You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
CROSS JOIN and UNNEST is actually easier, especially if there're many fields
There's no need to explicity specify each field during deconstruction and thus no risk of manual errors
The following CTE block:
data-engineer-handbook/bootcamp/materials/1-dimensional-data-modeling/lecture-lab/incremental_scd_query.sql
Lines 67 to 75 in 954ac02
can be simplified to (using
CROSS JOIN
to theUNNEST
ed array):provided that you remove the
UNNEST
call inchanged_records.records
(i.e., just leaverecords
as anARRAY
):data-engineer-handbook/bootcamp/materials/1-dimensional-data-modeling/lecture-lab/incremental_scd_query.sql
Lines 46 to 60 in 954ac02
This is especially helpful when your
scd_type
has a lot more fields and you need to de-structure them all.The text was updated successfully, but these errors were encountered: