Snowflake dbt test error
See original GitHub issueDescribe the bug
A clear and concise description of what the bug is. What command did you run? What happened?
When I run dbt test
on snowflake I get an error.
16:44:26 | 2 of 2 START test not_null_handshake_tracks_parsed_timestamp......... [RUN]
16:44:28 | 1 of 2 ERROR accepted_values_handshake_tracks_parsed_organization____mindful_affirmations__aflorithmic__audiofunnel [ERROR in 1.98s]
16:44:28 | 2 of 2 ERROR not_null_handshake_tracks_parsed_timestamp.............. [ERROR in 2.08s]
16:44:28 |
16:44:28 | Finished running 2 tests in 3.59s.
Completed with 2 errors and 0 warnings:
Database Error in test accepted_values_handshake_tracks_parsed_organization____mindful_affirmations__aflorithmic__audiofunnel (models/example/schema.yml)
000606 (57P03): No active warehouse selected in the current session. Select an active warehouse with the 'use warehouse' command.
compiled SQL at target/compiled/analytics_handshake/models/example/schema.yml/schema_test/accepted_values_handshake_tracks_parsed_6b71fc6578ab3e8fc25252a71ddc89b5.sql
Database Error in test not_null_handshake_tracks_parsed_timestamp (models/example/schema.yml)
000606 (57P03): No active warehouse selected in the current session. Select an active warehouse with the 'use warehouse' command.
compiled SQL at target/compiled/analytics_handshake/models/example/schema.yml/schema_test/not_null_handshake_tracks_parsed_timestamp.sql
Steps To Reproduce
In as much detail as possible, please provide steps to reproduce the issue. Sample data that triggers the issue, example model code, etc is all very helpful here.
Expected behavior
Confused about this expecting tests to run.
Screenshots and log output
If applicable, add screenshots or log output to help explain your problem.
System information
Which database are you using dbt with?
- postgres
- redshift
- bigquery
- [ -] snowflake
- other (specify: ____________)
The output of dbt --version
:
(base) user@MacBook-Air analytics_handshake % dbt --version
installed version: 0.18.1
latest version: 0.18.1
Up to date!
Plugins:
- bigquery: 0.18.1
- snowflake: 0.18.1
- redshift: 0.18.1
- postgres: 0.18.1
The operating system you’re using:
Mac OS catalina
The output of python --version
:
Python 3.8.3
Additional context
Add any other context about the problem here.
It works with dbt run
just not with dbt test
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (1 by maintainers)
Top Results From Across the Web
Getting the below error when we connect dbt with snowflake ...
Getting the below error when we connect dbt with snowflake and run dbt models "Information schema query returned too much data. Please repeat...
Read more >Debugging errors - dbt Developer Hub
To fix this: Open the offending file (e.g. schema.yml ); Check the line in the error message (e.g. line 5 ); Find the...
Read more >Why do I get a 'select active warehouse' error in dbt when ...
A. The active profile coniguration at "~/.dbt/profiles.yml" Snowflake Profile: and search for 'warehouse:' my-snowflake-db: target: dev ...
Read more >How to implement testing in data build tool (dbt) - YouTube
Want to SUPERCHARGE your career and become an EXPERT in Snowflake ??❄️Mastering Snowflake is accepting applications now to work with us in ...
Read more >Modular Data Stack — Build a Data Platform with Prefect, dbt ...
Alerts on failure in dbt tests ∘ Summary of simple dbt ... The last post demonstrated how to ingest data into a Snowflake...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I had this same error and I resolved in the end. It was a problem of the user not having the privileges to access the warehouse specified.
Simply, log into Snowflake as the accountadmin and grant the privileges to the role in question.
it was working fine when the materialization was a view, but started failing for table materialization. Ask your account admin to go to Admin > Warehouses > {select the warehouse defined in the dbt profiles.yml} , click on the warehouse, scroll down to the bottom > click on +Privilege > Select Role {dbt role} > grant privileges. The issue will get resolved.