z3z1ma / dbt-osmosis

Provides automated YAML management, a dbt server, streamlit workbench, and git-integrated dbt model output diff tools
https://z3z1ma.github.io/dbt-osmosis/
Apache License 2.0
478 stars 47 forks source link

dbt.exceptions.DbtProfileError error while running dbt-osmosis #6

Closed hcylia closed 2 years ago

hcylia commented 2 years ago

Hello,

I'm facing an issue while running dbt-osmosis with those commands :

dbt-osmosis run --project-dir ~/my/path/to/dbt --target sbx --profiles-dir ~/my/path/to/dbt
dbt-osmosis workbench

dbt is well configured and running for several years now but I'm having an error :

dbt.exceptions.DbtProfileError: Runtime Error
  Credentials in profile "MYPROFIL", target "sbx" invalid: Runtime Error
    Could not find adapter type bigquery!

Here is my dbt --version command result :

installed version: 1.0.1
   latest version: 1.0.4

Your version of dbt is out of date! You can find instructions for upgrading here:
https://docs.getdbt.com/docs/installation

Plugins:
  - postgres: 0.21.0
  - redshift: 0.21.0
  - bigquery: 1.0.0
  - snowflake: 0.21.0

Do you know where this might come from, please ?

Edit :

I found that even if I define the path in the UI, profiles_dir is never set, it always takes the dbt.config.profile.DEFAULT_PROFILES_DIR, so I created a profiles.yaml file in the DEFAULT_PROFILES_DIR (default : ~/.dbt), it seems like this solved the issue but that's weird that profiles_dir is always None, have I missed a step ?

z3z1ma commented 2 years ago

@hcylia This is resolved in my recent commit. dbt changed the programmatic interface for how its classes resolve profile path to using the flag module. I have updated dbt osmosis appropriately. I will be packaging an update for pypi soon.