-
Notifications
You must be signed in to change notification settings - Fork 53
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
No database selected #112
Comments
Still totally stuck on this, below is a copy of my profiles.yml
|
It looks like you have to provide database in SQL query. e.g: |
You need to use ref() or source() inside your model: For exemple in your case, you need to transform this query: select *
from source_data into something like: select *
from {{ source('database', 'table') }} When you will run this model, dbt will compile the model and the SQL output will be something like: select *
from `database`.`table` |
I also had the same problem. Eventually I realized that I was using a non-MySQL function inside my model. Once I changed that, it worked. I think the error message is misleading |
Describe the bug
Hi I've just set up a brand new project using db init and dbt-mysql. I've setup my profiles.yaml and checked that dbt debug connects to my database properly and returns no errors.
When I run
dbt run
, I get the following errorHow do I specify the database in dbt?
The text was updated successfully, but these errors were encountered: