Skip to content

Latest commit

 

History

History
54 lines (41 loc) · 1.46 KB

README.md

File metadata and controls

54 lines (41 loc) · 1.46 KB

dbt-bigquery-extras

This is an experimental package for my study.

custom materialization

load

LOAD DATA statement as a model. Model body isn't needed.

{{
    config(
        materialized = 'load'
        load_options = {
            'uris': [
                'gs://bucket/dir1/*.parquet',
                'gs://bucket/dir2/*.parquet'
            ],
            'format': 'parquet',
        },
    )
}}

table_snapshot

CREATE SNAPSHOT TABLE statement as a model. Model body isn't needed.

The snapshot materialization is already implemented in here. It's used in the dbt snapshot command. To prevent duplication, I named it table_snapshot.

{{
    config(
        materialized = 'table_snapshot',
        source_table = 'my_schema.source_table'
    )
}}

table_clone

CREATE TABLE CLONE statement as a model. Model body isn't needed.

The clone materialization is already implemented in here. It's used in defer. To prevent duplication, I named it table_clone.

{{
    config(
        materialized = 'table_clone',
        source_table = 'my_schema.source_table'
    )
}}