Skip to content

Instantly share code, notes, and snippets.

declare partitions array<date> default []
;
-- create this table if not exists
create table if not exists poc_eu.test_fact_wip_scd2_copy_api_del_ins (
event_id STRING,
effective_from TIMESTAMP,
effective_to TIMESTAMP
)
partition by date(effective_from)
cluster by event_id, effective_from, effective_to