# \#materialization

**URL:** https://discourse.getdbt.com/tag/materialization/25.md

[Latest](https://discourse.getdbt.com/latest.md) · [Categories](https://discourse.getdbt.com/categories.md) · [Tags](https://discourse.getdbt.com/tags.md)

---

## [Prevent accidental replacement of production tables while allowing dbt-managed schema evolution](https://discourse.getdbt.com/t/prevent-accidental-replacement-of-production-tables-while-allowing-dbt-managed-schema-evolution/20903)

<div class="topic-metadata">

**Author:** [@MichalR](https://discourse.getdbt.com/u/MichalR)\
**Replies:** 2\
**Last updated:** [November 10, 2026, 6:21am UTC](https://discourse.getdbt.com/t/prevent-accidental-replacement-of-production-tables-while-allowing-dbt-managed-schema-evolution/20903 "2026-11-10T06:21:25Z")

</div>

We had an incremental model using the delete+insert strategy. Instead of updating the existing production table, dbt treated it as missing, followed its initial-creation path, and replaced it with an empty table. Overri…

---

## [Creating Custom Materialization](https://discourse.getdbt.com/t/creating-custom-materialization/12826)

<div class="topic-metadata">

**Author:** [@soliev](https://discourse.getdbt.com/u/soliev)\
**Replies:** 4\
**Last updated:** [July 21, 2025, 1:09pm UTC](https://discourse.getdbt.com/t/creating-custom-materialization/12826 "2025-07-21T13:09:27Z")

</div>

Developing a Custom Materialization Strategy I’ve observed that, as of now, there are no existing materialization strategies that employ the TRUNCATE INSERT method with tables. Due to this gap, I am motivated to develop …

---

## [Replicating Lazy (Late-Binding) Views in PostgreSQL Using dbt Custom Materialization — Safe for Production?](https://discourse.getdbt.com/t/replicating-lazy-late-binding-views-in-postgresql-using-dbt-custom-materialization-safe-for-production/19222)

<div class="topic-metadata">

**Author:** [@kemaltulum](https://discourse.getdbt.com/u/kemaltulum)\
**Replies:** 0\
**Last updated:** [April 30, 2025, 4:00pm UTC](https://discourse.getdbt.com/t/replicating-lazy-late-binding-views-in-postgresql-using-dbt-custom-materialization-safe-for-production/19222 "2025-04-30T16:00:15Z")

</div>

Hi all, I’m trying to replicate lazy (late-binding) view behavior in PostgreSQL using a custom dbt materialization — mainly to avoid tight coupling between views and underlying tables, like what’s possible in Snowflake …

---

## [Creating Temp Views/Table in Databricks using dbt core](https://discourse.getdbt.com/t/creating-temp-views-table-in-databricks-using-dbt-core/18795)

<div class="topic-metadata">

**Author:** [@Nagaraj](https://discourse.getdbt.com/u/Nagaraj)\
**Replies:** 0\
**Last updated:** [March 25, 2025, 2:28pm UTC](https://discourse.getdbt.com/t/creating-temp-views-table-in-databricks-using-dbt-core/18795 "2025-03-25T14:28:46Z")

</div>

The problem I’m having I would like to use transient tables in Databricks for staging data, so exploring on how to create temporary tables or views in Databricks using dbt core. Please let me know if you are familiar wi…

---

## [Using Delta Live Tables Sink as a Custom Materialization in dbt](https://discourse.getdbt.com/t/using-delta-live-tables-sink-as-a-custom-materialization-in-dbt/18436)

<div class="topic-metadata">

**Author:** [@Schuetzi](https://discourse.getdbt.com/u/Schuetzi)\
**Replies:** 0\
**Last updated:** [February 27, 2025, 10:20am UTC](https://discourse.getdbt.com/t/using-delta-live-tables-sink-as-a-custom-materialization-in-dbt/18436 "2025-02-27T10:20:18Z")

</div>

We are using Databricks and would like to implement all data transformations—both streaming and batch—entirely within dbt. Currently, dbt supports Streaming Tables in Databricks, which internally create Delta Live Table…

---

## [DBT materialisation](https://discourse.getdbt.com/t/dbt-materialisation/16737)

<div class="topic-metadata">

**Author:** [@SakshiBhat](https://discourse.getdbt.com/u/SakshiBhat)\
**Replies:** 1\
**Last updated:** [November 4, 2024, 4:11pm UTC](https://discourse.getdbt.com/t/dbt-materialisation/16737 "2024-11-04T16:11:53Z")

</div>

I have specified the materialisation as incremental in dbt\_project.yml. On execution, it is creating a view in BQ instead of a table. It looks like the materialisation is not getting picked and dbt is creating view by d…

---

## [Getting intermediate table counts](https://discourse.getdbt.com/t/getting-intermediate-table-counts/15600)

<div class="topic-metadata">

**Author:** [@Scrap8498](https://discourse.getdbt.com/u/Scrap8498)\
**Replies:** 0\
**Last updated:** [September 26, 2024, 6:46am UTC](https://discourse.getdbt.com/t/getting-intermediate-table-counts/15600 "2024-09-26T06:46:39Z")

</div>

I have a question Suppose we a model and we have intermediate tables in them, for debugging purpose i want count of rows of those intermediate table formed before the final select statement, how to do this? Consider th…

---

## [How to understand which materialization needs to be used.](https://discourse.getdbt.com/t/how-to-understand-which-materialization-needs-to-be-used/14673)

<div class="topic-metadata">

**Author:** [@panpaliyapratiksha18](https://discourse.getdbt.com/u/panpaliyapratiksha18)\
**Replies:** 0\
**Last updated:** [August 5, 2024, 9:14am UTC](https://discourse.getdbt.com/t/how-to-understand-which-materialization-needs-to-be-used/14673 "2024-08-05T09:14:07Z")

</div>

at most 55 slices are allowed in a query, current number: 85 HINT: rewrite your query Getting this error

---

## [Custom materialisation](https://discourse.getdbt.com/t/custom-materialisation/14460)

<div class="topic-metadata">

**Author:** [@CodeError](https://discourse.getdbt.com/u/CodeError)\
**Replies:** 4\
**Last updated:** [July 23, 2024, 12:36pm UTC](https://discourse.getdbt.com/t/custom-materialisation/14460 "2024-07-23T12:36:17Z")

</div>

The problem I’m having As a test I’ve copied an existing incremental materialisation from github: https://github.com/dbt-labs/dbt-adapters/blob/main/dbt/include/global\_project/macros/materializations/models/incremental/…

---

## [Does dbt cloud IDE supports creating Materialized views on BigQuery?](https://discourse.getdbt.com/t/does-dbt-cloud-ide-supports-creating-materialized-views-on-bigquery/11054)

<div class="topic-metadata">

**Author:** [@daniel.chiang](https://discourse.getdbt.com/u/daniel.chiang)\
**Replies:** 2\
**Last updated:** [July 2, 2024, 4:36pm UTC](https://discourse.getdbt.com/t/does-dbt-cloud-ide-supports-creating-materialized-views-on-bigquery/11054 "2024-07-02T16:36:08Z")

</div>

I’ve been reading tons of releasing notes as well as issues recently. Yet it’s still puzzling to me whether dbt cloud IDE currently supports creating Materialized views on BQ. I am new to the community and to the dbt pe…

---

## [GTID issue using snapshot feature](https://discourse.getdbt.com/t/gtid-issue-using-snapshot-feature/13508)

<div class="topic-metadata">

**Author:** [@sthienard](https://discourse.getdbt.com/u/sthienard)\
**Replies:** 0\
**Last updated:** [May 24, 2024, 12:31pm UTC](https://discourse.getdbt.com/t/gtid-issue-using-snapshot-feature/13508 "2024-05-24T12:31:49Z")

</div>

The problem I’m having I get a MySQL ERROR : Statement violates GTID consistency: CREATE TEMPORARY TABLE and DROP TEMPORARY TABLE can only be executed outside transactional context. The context of why I’m trying to do …

---

## [what can i do if destination mysql database has a GTID constraint on](https://discourse.getdbt.com/t/what-can-i-do-if-destination-mysql-database-has-a-gtid-constraint-on/7204)

<div class="topic-metadata">

**Author:** [@ftwcpc](https://discourse.getdbt.com/u/ftwcpc)\
**Replies:** 1\
**Last updated:** [May 2, 2024, 5:09pm UTC](https://discourse.getdbt.com/t/what-can-i-do-if-destination-mysql-database-has-a-gtid-constraint-on/7204 "2024-05-02T17:09:23Z")

</div>

The problem I’m having The destination Mysql replication has GTID on and ‘create table as select …’ not work for me. The context of why I’m trying to do this I try to write data to cloud data base with dbt.

---

## [Split single run of \`dbt materialize\` by temporal field and commit them separately](https://discourse.getdbt.com/t/split-single-run-of-dbt-materialize-by-temporal-field-and-commit-them-separately/12614)

<div class="topic-metadata">

**Author:** [@sazary](https://discourse.getdbt.com/u/sazary)\
**Replies:** 1\
**Last updated:** [April 8, 2024, 12:18pm UTC](https://discourse.getdbt.com/t/split-single-run-of-dbt-materialize-by-temporal-field-and-commit-them-separately/12614 "2024-04-08T12:18:30Z")

</div>

i’m using dbt to materialize a table on a postgresql. this table has a temporal field (timestamp). the problem is that when this table is being created for the first time dbt runs all of it using a single sql query (as …

---

## [Dynamically set materialization based on run\_started\_at](https://discourse.getdbt.com/t/dynamically-set-materialization-based-on-run-started-at/10046)

<div class="topic-metadata">

**Author:** [@chris\_ostlin](https://discourse.getdbt.com/u/chris_ostlin)\
**Replies:** 1\
**Last updated:** [December 12, 2023, 6:33pm UTC](https://discourse.getdbt.com/t/dynamically-set-materialization-based-on-run-started-at/10046 "2023-12-12T18:33:11Z")

</div>

Background (feel free to skip) My team has set up dbt to produce materialized stage tables from a single source, fetching data that’s between 6 and 2 hours old (we don’t extract everything up to realtime due to a sometim…

---

## [Config Block and Project.yml hierarchy](https://discourse.getdbt.com/t/config-block-and-project-yml-hierarchy/9711)

<div class="topic-metadata">

**Author:** [@jnahas](https://discourse.getdbt.com/u/jnahas)\
**Replies:** 2\
**Last updated:** [August 25, 2023, 7:49pm UTC](https://discourse.getdbt.com/t/config-block-and-project-yml-hierarchy/9711 "2023-08-25T19:49:46Z")

</div>

HI Everyone, I hope you all are well. If I have a certain table in the dbt\_project.yml as a view for example and then in the .sql file in a config block as a table, will the .sql file override the dbt\_project and create…

---

## [Are snapshots a type of materialization?](https://discourse.getdbt.com/t/are-snapshots-a-type-of-materialization/9169)

<div class="topic-metadata">

**Author:** [@soumaya.mauthoor](https://discourse.getdbt.com/u/soumaya.mauthoor)\
**Replies:** 0\
**Last updated:** [July 17, 2023, 1:33pm UTC](https://discourse.getdbt.com/t/are-snapshots-a-type-of-materialization/9169 "2023-07-17T13:33:40Z")

</div>

Are snapshots a type of materialization?

---

## [How to change default 'Transient' materialization with Snowflake](https://discourse.getdbt.com/t/how-to-change-default-transient-materialization-with-snowflake/7197)

<div class="topic-metadata">

**Author:** [@rsnt2010](https://discourse.getdbt.com/u/rsnt2010)\
**Replies:** 4\
**Last updated:** [July 5, 2023, 8:15am UTC](https://discourse.getdbt.com/t/how-to-change-default-transient-materialization-with-snowflake/7197 "2023-07-05T08:15:30Z")

</div>

Hi Team, It looks like dbt is creating a ‘Transient’ table by default when connected with Snowflake. ‘Transient’ table in Snowflake will only have a data retention period of 1 day. When i see final target sql queries ge…

---

## [dbt {materialized = "view"} creates a table in the database](https://discourse.getdbt.com/t/dbt-materialized-view-creates-a-table-in-the-database/7876)

<div class="topic-metadata">

**Author:** [@EranK](https://discourse.getdbt.com/u/EranK)\
**Replies:** 2\
**Last updated:** [April 19, 2023, 12:32pm UTC](https://discourse.getdbt.com/t/dbt-materialized-view-creates-a-table-in-the-database/7876 "2023-04-19T12:32:17Z")

</div>

Trying to understand dbt Materialization strategies - Some of our models are using the {materialized = “view”} option, and still I see that an underlying table is created in the database (We are using AWS Redshift) dbt…

---

## [dbt python model to configure as view](https://discourse.getdbt.com/t/dbt-python-model-to-configure-as-view/7628)

<div class="topic-metadata">

**Author:** [@Sam777](https://discourse.getdbt.com/u/Sam777)\
**Replies:** 1\
**Last updated:** [April 2, 2023, 5:37pm UTC](https://discourse.getdbt.com/t/dbt-python-model-to-configure-as-view/7628 "2023-04-02T17:37:30Z")

</div>

The problem I’m having is I can’t configure dbt python model as view. import snowflake.snowpark.functions as F def model(dbt, session): dbt.config(materialized="view") df = dbt.ref("sample") return df Facing…

---

## [Rebuild an incremental model while keeping the older version](https://discourse.getdbt.com/t/rebuild-an-incremental-model-while-keeping-the-older-version/7302)

<div class="topic-metadata">

**Author:** [@xiangshi.yin](https://discourse.getdbt.com/u/xiangshi.yin)\
**Replies:** 1\
**Last updated:** [March 15, 2023, 5:14am UTC](https://discourse.getdbt.com/t/rebuild-an-incremental-model-while-keeping-the-older-version/7302 "2023-03-15T05:14:58Z")

</div>

The problem I’m having I know we could use the --full-refresh option for dbt run to rebuild the data table from the beginning of time and wipe out all the records from the previous model runs. Is it possible to rebuild …

---

## [DBT with Unity Catalog - Failing to perform Incremental Materialization](https://discourse.getdbt.com/t/dbt-with-unity-catalog-failing-to-perform-incremental-materialization/6083)

<div class="topic-metadata">

**Author:** [@sudhirnune](https://discourse.getdbt.com/u/sudhirnune)\
**Replies:** 0\
**Last updated:** [January 13, 2023, 1:41pm UTC](https://discourse.getdbt.com/t/dbt-with-unity-catalog-failing-to-perform-incremental-materialization/6083 "2023-01-13T13:41:57Z")

</div>

HI all, We are using DataBricks with Unity Catalog and we observe a peculiar issue with the Incremental Materailization. This Materialization is not working as expected, it behaves as table Materialization rather than A…

---

## [Can I create a custom materialized view materialisation for Snowflake?](https://discourse.getdbt.com/t/can-i-create-a-custom-materialized-view-materialisation-for-snowflake/5403)

<div class="topic-metadata">

**Author:** [@leinemann](https://discourse.getdbt.com/u/leinemann)\
**Replies:** 3\
**Last updated:** [November 25, 2022, 8:14am UTC](https://discourse.getdbt.com/t/can-i-create-a-custom-materialized-view-materialisation-for-snowflake/5403 "2022-11-25T08:14:52Z")

</div>

Hi there, I’m looking to create a materialized view materialization for snowflake. What happened to the option to create a custom materialization described in the legacy documentation? many thanks, Christoph.

---

## [clarification on using or not adapter in materialisation definition](https://discourse.getdbt.com/t/clarification-on-using-or-not-adapter-in-materialisation-definition/5246)

<div class="topic-metadata">

**Author:** [@obar1](https://discourse.getdbt.com/u/obar1)\
**Replies:** 1\
**Last updated:** [November 3, 2022, 9:45am UTC](https://discourse.getdbt.com/t/clarification-on-using-or-not-adapter-in-materialisation-definition/5246 "2022-11-03T09:45:59Z")

</div>

reading Creating new materializations | dbt Developer Hub (getdbt.com) there is an explicit example on using one for RS as {% materialization my\_materialization\_name, adapter='redshift' %} but then it’s looks not real…

---

## [Custom materialization to load from external table into Snowflake](https://discourse.getdbt.com/t/custom-materialization-to-load-from-external-table-into-snowflake/967)

<div class="topic-metadata">

**Author:** [@sudhirnune](https://discourse.getdbt.com/u/sudhirnune)\
**Replies:** 5\
**Last updated:** [December 7, 2020, 10:09am UTC](https://discourse.getdbt.com/t/custom-materialization-to-load-from-external-table-into-snowflake/967 "2020-12-07T10:09:22Z")

</div>

Hi All, Did any one test or create a Custom Materialization which uses COPY INTO command to load data from External table to snowflake ? If you have created a Custom Materialization can you please share the details.

---

## [FAQ: Configuring models' materializations based on environments](https://discourse.getdbt.com/t/faq-configuring-models-materializations-based-on-environments/463)

<div class="topic-metadata">

**Author:** [@claire](https://discourse.getdbt.com/u/claire)\
**Replies:** 0\
**Last updated:** [July 17, 2019, 6:14pm UTC](https://discourse.getdbt.com/t/faq-configuring-models-materializations-based-on-environments/463 "2019-07-17T18:14:25Z")

</div>

We’ve had a couple of questions recently about configuring models based on your environment (or target) over on Slack, spefically around: Using views in dev and tables in prod \[Snowflake only\] Using transient tables …
