elementary icon indicating copy to clipboard operation
elementary copied to clipboard

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

Open michael-c-hoffman opened this issue 1 year ago • 1 comments

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.

michael-c-hoffman avatar Oct 09 '24 14:10 michael-c-hoffman

same issue as from: https://elementary-community.slack.com/archives/C02CTC89LAX/p1730225547226989

macklin-fluehr avatar Dec 02 '24 16:12 macklin-fluehr