can we partition by two fields in dbt

173 Views Asked by At

here is my scenario i have a table where i am loading the yearly data with country_id (integer). so i want to partition it by country_id then year. i am using insert_overwrite strategy.

sample code:
{{ config(materialized='incremental',incremental_strategy="insert_overwrite",cluster_by = ["country_id"],partition_by={"field": "year","data_type": "int64","range": {"start": 2000,"end": 3000,"interval": 1}}) }}

I am planning to implement append stratergy and partition column will be country_id and year. if you have suggestion it will be appreciated.

0

There are 0 best solutions below