Cant change materialized from view to table

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.

    compiled Code at target\run\dbtlearn\models\SRC\fct\fact_review.sql
    10:03:36
    10:03:36 Done. PASS=5 WARN=0 ERROR=1 SKIP=0 TOTAL=6

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?

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. It might not have transferred perfectly.

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. It might not have transferred perfectly.