No active warehouse selected in mart ? staging and inter work ?

I’m running on a error in my dbt project / snowflake. i’m creating models in staging which reference tmp table (working).
then i join all the table i need in intermediate folder (works too) and then i create the final table in the marts section which is an incremental model.

here i’ have the following error : no active warehouse selected in the current session. Select an active warehouse with the ‘use warehouse’ command.

how can i solve this ?

here are the final model in marts which run the error

{{ config(materialized="incremental", unique_key="id_statut_produit") }}

with
source as (select * from {{ ref("inter_statuts_produits") }}),
    vcs_statuts_produits as (
        select
        md5(libelle_etat || code_lgo) as id_statut_produit,
        libelle_etat,
	    code_lgo,
	    modif_date_heure
        from source
    {% if is_incremental() %}
        where id_statut_produit >= (select max(id_statut_produit) from {{ this }})
    {% endif %}
)
select * from 
vcs_statuts_produits

Finded the issue had to use surrogate_key and then modifying some option on my profile because the i defined a user which didn’t had the right to write into the base

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.