Scott Wood
Scott Wood

Reputation: 1127

How can I specify what snowflake warehouse to use in dbtvault?

I've specified the warehouse in the profile settings, and have created a profile.yml file that specifies the warehouse, but it keeps giving me this error. I am able to create a staging layer thing. The system is able to connect to snowflake, with a proper warehouse (I think) for this, but not for the hub. What's going on? I will put my profile.yml file and my dbt_project.yml file in here, but I suspect that you will need something else that I'm unaware of. Thanks,

profile.yml:

snowflake-demo: target: dev outputs: dev: type: snowflake account: liveops.us-central1.gcp

  user: swood
  password: XXXXXXXX

  role: PC_DBT_ROLE
  database: USER_SANDBOX_DB
  warehouse: USER_SANDBOX_XS_WH
  schema: SWOOD
  threads: 4
  client_session_keep_alive: False

dbt_project.yml:

# Name your project! Project names should contain only lowercase characters
# and underscores. A good package name should reflect your organization's
# name or the intended use of these models
name: 'scotts_project'
version: '1.0.0'
config-version: 2

# This setting configures which "profile" dbt uses for this project.
profile: 'snowflake_demo'

# These configurations specify where dbt should look for different types of files.
# The `source-paths` config, for example, states that models in this project can be
# found in the "models/" directory. You probably won't need to change these!
model-paths: ["models"]
analysis-paths: ["analyses"]
test-paths: ["tests"]
seed-paths: ["seeds"]
macro-paths: ["macros"]
snapshot-paths: ["snapshots"]

target-path: "target"  # directory which will store compiled SQL files
clean-targets:         # directories to be removed by `dbt clean`
  - "target"
  - "dbt_packages"


# Configuring models
# Full documentation: https://docs.getdbt.com/docs/configuring-models

# In this example config, we tell dbt to build all models in the example/ directory
# as tables. These settings can be overridden in the individual model files
# using the `{{ config(...) }}` macro.
models:
  my_new_project:
    # Applies to all files under models/example/
    example:
      materialized: view

Upvotes: 1

Views: 1379

Answers (1)

Gokhan Atil
Gokhan Atil

Reputation: 10079

Based on your comment, I suggest you check the grants on the warehouse:

show grants on warehouse USER_SANDBOX_XS_WH;

If your role (PC_DBT_ROLE) doesn't have usage privilege on the warehouse, run the following commands:

USE ROLE accountadmin;
GRANT USAGE ON WAREHOUSE USER_SANDBOX_XS_WH to ROLE PC_DBT_ROLE;

Upvotes: 3

Related Questions