Reputation: 233
I'm trying to connect to snowflake via dbt but connections fail with the error below:
Using profiles.yml file at /home/myname/.dbt/profiles.yml
Using dbt_project.yml file at /mnt/c/Users/Public/learn_dbt/rks-learn-dbt/learn_dbt/dbt_project.yml
Configuration:
profiles.yml file [ERROR invalid]
dbt_project.yml file [OK found and valid]
Profile loading failed for the following reason:
Runtime Error
Could not find profile named 'learn_dbt'
Required dependencies:
- git [OK found]
Any advice please.
Note: I am learning to setup dbt connections looking at udemy videos.
Below is my profiles.yml
file:
learn_dbt:
target: dev
outputs:
dev:
type: snowflake
account: XXXXXX
user: XXXX
password: XXXX
role: transform_role
database: analytics
warehouse: transform_wh
schema: dbt
threads: 1
client_session_keep_alive: False
Upvotes: 8
Views: 15970
Reputation: 129
I think that something change on the connector or maybe at the account names on the side of snowflake but the next steps worked for me.
abc123468.us-east-0.snowflakecomputing.com/
, you are going to require the abc123468.us-east-0
from the URL, copy and paste it into your profiles.yml
file in the account tag.dbt debug
and wait for the connection to be done.It worked for me becouse I didn't had an extra sso auth activated, if you are using something such like OKTA or another auth method maybe this is not going to work.
Another method to get this URL that I mentioned on the steps before, in the bottom left corner you can find this information.
Always refer to the official docs for more info -> https://docs.getdbt.com/docs/cloud/connect-data-platform/connect-snowflake
One last! Be sure that the role that you selected is able to usage and select data from the database and schema.
Upvotes: 0
Reputation: 2074
I had to run pip install dbt-snowflake
and then it worked.
It seems dbt has seperated it's modules to dbt-core and it's adapters dbt-snowflake
, dbt-postgres
etc
Upvotes: 6
Reputation: 61
Overall this error mean it is unable to connect to yead your environment template to get your snowflake account details.
'env.pd.template.bat' or 'env.pd.template.sh' is the base file which has your Snowfalke account settings, so you have run this command to connect to snowflake from your editor.
You can use '.bat', or .sh commands based on Powershell or CMD editor.
In my scenario I ran 'env.pd..private.bat', you need to run this command everytime to connect to snowflake account with your credentials. I ran this in cmd window. It fixed my error.
Upvotes: 0
Reputation: 264
I think this is a similar issue to what i had when using the cloud environment.
If you are using a snowflake instance on the West coast the the account name looks like
If you are using a snowflake instance on the East coast the the account name looks like <xxx12345.us-east-1>
Upvotes: 3
Reputation: 601
My first guess is that you have a profiles.yml
file in your dbt project folder and dbt is not actually using the one in /home/myname/.dbt/
.
Could you try running the following?
dbt debug --profiles-dir /home/myname/.dbt
The flag --profiles-dir
works on most dbt cli commands and lets you use a custom profiles.yml
that's outside your project. I use this flag all the time.
Upvotes: 9