# Cant change materialized from view to table

**URL:** <https://discourse.getdbt.com/t/cant-change-materialized-from-view-to-table/13106>\
**Category:** Help\
**Created:** [April 29, 2024, 10:07am UTC](https://discourse.getdbt.com/t/cant-change-materialized-from-view-to-table/13106 "2024-04-29T10:07:18Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![snirw](https://avatars.discourse-cdn.com/v4/letter/s/97f17d/32.png) [@snirw](https://discourse.getdbt.com/u/snirw)\
**Post date:** [April 29, 2024, 10:07am UTC](https://discourse.getdbt.com/t/cant-change-materialized-from-view-to-table/13106/1 "2024-04-29T10:07:18Z")

</div>

Hi all

I am new to dbt and just began my journey, as part of my practice I tried to change the default (creating a view) to a table.  
In this practice project, I have managed to connect to snowflake.

I am using Win 10, and visual studio code

This is how I config my dbt\_project.yml:  
models:  
dbtlearn:  
+materialized: view  
dim:  
+materialized: table  
fct:  
+materialized: ephemeral

When I run it using dbt run I got the following output:  
10:03:03 Running with dbt=1.7.11  
10:03:05 Registered adapter: snowflake=1.7.1  
10:03:05 [WARNING]: Configuration paths exist in your dbt\_project.yml file which do not apply to any resources.  
There are 2 unused configuration paths:

- models.dbtlearn.fct

- models.dbtlearn.dim  
10:03:05 Found 6 models, 0 sources, 0 exposures, 0 metrics, 430 macros, 0 groups, 0 semantic models  
10:03:05  
10:03:12 Concurrency: 1 threads (target=‘dev’)  
10:03:12  
10:03:12 1 of 6 START sql view model DEV.src\_hosts … [RUN]  
10:03:15 1 of 6 OK created sql view model DEV.src\_hosts … [SUCCESS 1 in 3.31s]  
10:03:15 2 of 6 START sql view model DEV.src\_listing … [RUN]  
10:03:18 2 of 6 OK created sql view model DEV.src\_listing … [SUCCESS 1 in 2.71s]  
10:03:18 3 of 6 START sql view model DEV.src\_reviews … [RUN]  
10:03:21 3 of 6 OK created sql view model DEV.src\_reviews … [SUCCESS 1 in 3.22s]  
10:03:21 4 of 6 START sql view model DEV.dim\_hosts\_clean … [RUN]  
10:03:26 4 of 6 OK created sql view model DEV.dim\_hosts\_clean … [SUCCESS 1 in 5.15s]  
10:03:26 5 of 6 START sql view model DEV.dim\_listing\_cleans … [RUN]  
10:03:32 5 of 6 OK created sql view model DEV.dim\_listing\_cleans … [SUCCESS 1 in 6.15s]  
10:03:32 6 of 6 START sql incremental model DEV.fact\_review … [RUN]  
10:03:36 6 of 6 ERROR creating sql incremental model DEV.fact\_review … [ERROR in 3.51s]  
10:03:36  
10:03:36 Finished running 5 view models, 1 incremental model in 0 hours 0 minutes and 30.51 seconds (30.51s).  
10:03:36  
10:03:36 Completed with 1 error and 0 warnings:  
10:03:36  
10:03:36 Database Error in model fact\_review (models\SRC\fct\fact\_review.sql)  
000606 (57P03): No active warehouse selected in the current session. Select an active warehouse with the ‘use warehouse’ command.

I don’t understand why although I have defined that all the “dim” should be table it created as a view and why although it is capable of creating a view I have an error when I am trying to create incremental?

---

<div class="post-metadata">

**Author:** ![a\_slack\_user](https://sea2.discourse-cdn.com/flex020/user_avatar/discourse.getdbt.com/a_slack_user/32/1629_2.png) [@a\_slack\_user](https://discourse.getdbt.com/u/a_slack_user)\
**Post date:** [April 29, 2024, 8:10pm UTC](https://discourse.getdbt.com/t/cant-change-materialized-from-view-to-table/13106/2 "2024-04-29T20:10:25Z")

</div>

Its telling you it cant find any models in the dim and fact folders.  
With that dbt\_project.yml you need to have a folder called dim and a folder called fct directly in your models folder.

Note: `@Meagan Palmer (Altis)` originally [posted this reply in Slack](https://getdbt.slack.com/archives/CBSQTAPLG/p1714421417509389?thread_ts=1714385260.602509&cid=CBSQTAPLG). It might not have transferred perfectly.

---

<div class="post-metadata">

**Author:** ![a\_slack\_user](https://sea2.discourse-cdn.com/flex020/user_avatar/discourse.getdbt.com/a_slack_user/32/1629_2.png) [@a\_slack\_user](https://discourse.getdbt.com/u/a_slack_user)\
**Post date:** [April 29, 2024, 8:11pm UTC](https://discourse.getdbt.com/t/cant-change-materialized-from-view-to-table/13106/3 "2024-04-29T20:11:46Z")

</div>

Also, having facts as ephemeral wont cause them to be run/used at all unless you reference them in a different model.

Note: `@Meagan Palmer (Altis)` originally [posted this reply in Slack](https://getdbt.slack.com/archives/CBSQTAPLG/p1714421500606259?thread_ts=1714385260.602509&cid=CBSQTAPLG). It might not have transferred perfectly.

---

<div class="post-metadata">

**Author:** ![snirw](https://avatars.discourse-cdn.com/v4/letter/s/97f17d/32.png) [@snirw](https://discourse.getdbt.com/u/snirw)\
**Post date:** [May 19, 2024, 2:33pm UTC](https://discourse.getdbt.com/t/cant-change-materialized-from-view-to-table/13106/4 "2024-05-19T14:33:02Z")

</div>

> [@a\_slack\_user](#):
>
> ts as ephemeral won’t cause them to be run/used at all unless you reference them in a different model.

I don’t understand why I managed to create views but failed to create tables?

---

<div class="post-metadata">

**Author:** ![a\_slack\_user](https://sea2.discourse-cdn.com/flex020/user_avatar/discourse.getdbt.com/a_slack_user/32/1629_2.png) [@a\_slack\_user](https://discourse.getdbt.com/u/a_slack_user)\
**Post date:** [May 19, 2024, 8:10pm UTC](https://discourse.getdbt.com/t/cant-change-materialized-from-view-to-table/13106/5 "2024-05-19T20:10:54Z")

</div>

It always creates views by default

Note: `@Meagan Palmer (Altis)` originally [posted this reply in Slack](https://getdbt.slack.com/archives/CBSQTAPLG/p1716149447457229?thread_ts=1714385260.602509&cid=CBSQTAPLG). It might not have transferred perfectly.
