I am trying to create a SCD (slowly changing dimension) type 2 table in BigQuery without using any DML's
test schema :
id | date | name | valid_from | valid_to | flag
I need to capture the name changes for a specific id
.
Thanks,
I am trying to create a SCD (slowly changing dimension) type 2 table in BigQuery without using any DML's
test schema :
id | date | name | valid_from | valid_to | flag
I need to capture the name changes for a specific id
.
Thanks,
Copyright © 2021 Jogjafile Inc.
You can create artificially date partitioned tables to achieve this. This way, each date's data is unique and can be accessed by
`select distinct column from `dataset.table$yyyymmdd;`
or for all the history, just doselect distinct column from dataset.table;
. Also, you can always overwrite/append to a given date's partition without harming others.