You can change things between tables and views by changing a keyword rather than writing the data definition language (DDL) to do this behind the scenes. [https://docs.getdbt.com/guides/snowflake?step=8#change-the-way-your-model-is-materialized]
TODO: --full-refresh [https://docs.getdbt.com/guides/snowflake?step=8#change-the-way-your-model-is-materialized]
dbt ships with five materializations:
- view
- table
- incremental
- ephemeral
- materialized_view.
Check out the dbt documentation on materializations for more information on each of these options.
dbt also supports creating your own custom materializations, if required, however this is an advanced feature of dbt.
dbt allows us to configure:
tags
to support easy categorization and graph selection
custom schemas to split your models across multiple schemas
aliases if your view/table name should differ FROM the filename
Snippets of SQL to run at the start or end of a model, known as hooks
Warehouse-specific configurations for performance (e.g. sort and dist keys on Redshift, partitions on BigQuery)
Check out the dbt docs on model configurations to learn more.
TODO: See https://docs.getdbt.com/docs/deploy/deployments
TODO: See https://docs.getdbt.com/docs/deploy/deployments#monitor-jobs-and-alerts
- See guide to Post to Microsoft Teams when a job finishes
- See Materialize queries with exports
- See Integrate with other orchestration tools
- See dbt docs on Build your metrics
- See The Ultimate Guide to dbt on Snowflake: Day 1
- TODO: See extension
innoverio.vscode-dbt-power-user
- See dbt docs Snowflake setup
- See Snowflake's BEST PRACTICES FOR OPTIMIZING YOUR DBT AND SNOWFLAKE DEPLOYMENT
- See post Snowflake Queries: How Much Is Each One Costing You?
- See Select post Calculating cost per query in Snowflake
- See Snowflake docs on Understanding overall cost
- See Select