Closed d1bevz closed 2 years ago
Hi! Yes, check the README.md on develop branch. There are few ways to specify partition using dbt-greenplum: https://github.com/markporoshin/dbt-greenplum/blob/develop/README.md
An example of partition usage
{% set fields_string %}
user_id int4 null,
incomingyear timestamp null
{% endset %}
{% set raw_partition %}
PARTITION BY RANGE (incomingyear)
(
START ('2021-01-01'::timestamp) INCLUSIVE
END ('2023-01-01'::timestamp) EXCLUSIVE
EVERY (INTERVAL '1 year'),
DEFAULT PARTITION extra
);
{% endset %}
{{
config(
schema='marts',
materialized='incremental',
distributed_by='user_id',
fields_string=fields_string,
raw_partition=raw_partition
)
}}
select
user_id,
incomingyear
from
table
Very nice! Thank you for your adapter! Very quick response :)
Does this adapter support for a partition clause? Like
PARTITION BY RANGE (dt) (DEFAULT PARTITION other)