Skip to content

edr --project-dir is not used when edr calls an underlying dbt command #1720

@michael-c-hoffman

Description

@michael-c-hoffman

Describe the bug
When running edr report --project-dir <myprojectdir> when edr runs an underlying dbt command it does not use the supplied project-dir, but instead the project-dir from where edr is installed to.
Is it possible to utilize an existing dbt project when running the edr commands? or does edr require using it's internal dbt installation and configurations?

To Reproduce
Steps to reproduce the behavior:

  1. Run edr report with specifying the project-dir option to point to an existing dbt installation
  2. See error
edr report --project-dir /project/
024-10-08 19:59:47 — INFO — Running dbt command --log-format json run-operation elementary.log_macro_results --args {"macro_name": "elementary_cli.get_test_results", "macro_args": {"days_back": 7, "invocations_per_test": 720, "disable_passed_test_metrics": false}} --project-dir /usr/local/python/3.12.6/lib/python3.12/site-packages/elementary/monitor/dbt_project

Expected behavior

edr report --project-dir /project/
024-10-08 19:59:47 — INFO — Running dbt command --log-format json run-operation elementary.log_macro_results --args {"macro_name": "elementary_cli.get_test_results", "macro_args": {"days_back": 7, "invocations_per_test": 720, "disable_passed_test_metrics": false}} --project-dir /project/

Environment (please complete the following information):

  • Elementary CLI (edr) version: [0.16.1]
  • Elementary dbt package version: [0.16.1], can be found in packages.yml file
  • dbt version [1.8.6]
  • Data warehouse [snowflake] - version 1.8.3

Additional context
Add any other context about the problem here.

Would you be willing to contribute a fix for this issue?
Let us know if you're willing to contribute so that we'll be able to provide guidance.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions