Open ybressler opened 3 months ago
Thanks for reporting and sharing your use-case!
Out of curiosity, does dbt-score
run in the same virtual environment as dbt
? (alternatively, does dbt
run in a virtual environment, or is it installed system-wide?)
dbt-score
makes use of the environment variable DBT_PROJECT_DIR
to look for the dbt project. However I'm afraid it only works if that variable is a relative path appended to the current working directory, but making it work with absolute paths should be very easy
Ref: https://github.com/PicnicSupermarket/dbt-score/blob/master/src/dbt_score/dbt_utils.py#L59-L66
Also, just to check:
Have you tried running dbt-score lint --run-dbt-parse
? It will actually try to run dbt parse
, you will have to make sure your environment is setup correctly so it can find the dbt project though!
dbt-score
indeed executes in the same virtual environment as dbt
. (Using poetry as version manager)DBT_PROJECT_DIR
env var, instead, pass it to the command line on each execution. This has a bit to do with project layoutdbt-score lint --run-dbt-parse
fails, it cannot find the project yml fileUnderstood, thanks for the additional info. I think this feature definitely makes sense. Would you like to contribute it?
Want:
--project-dir
cli argument.Explanation:
Similar to
dbt run --project-dir my-project/
, I want to be able to parse and lint my project in a single command.My current workaround is to run
dbt parse ...
then point to the manifest. But I'd rather have a single command.