Gourab Sarker
06/12/2024, 11:26 PMedr report --select invocation_id: <my_invocation_id>. I am using dbt-redshift and using the dbt Cloud CLI. However, when I run this command I get the following error (in thread). What are some steps I can take to troubleshoot?Gourab Sarker
06/12/2024, 11:26 PM2024-06-12 17:17:28 — INFO — Running with edr=0.15.1
2024-06-12 17:17:28 — ERROR — Unable to get the latest invocation: Failed to run dbt command.
2024-06-12 17:17:28 — ERROR — Failed to parse Elementary's database and schema.
2024-06-12 17:17:28 — INFO — Running dbt --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 /Users/gourab/dbt_env/lib/python3.11/site-packages/elementary/monitor/dbt_project
2024-06-12 17:17:28 — ERROR — Could not generate the report - Error: Failed to run dbt command.
Please reach out to our community for help with this issue.
Traceback (most recent call last):
File "/Users/gourab/dbt_env/lib/python3.11/site-packages/elementary/clients/dbt/dbt_runner.py", line 88, in _run_command
result = subprocess.run(
^^^^^^^^^^^^^^^
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/subprocess.py", line 571, in run
raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['dbt', '--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', '/Users/gourab/dbt_env/lib/python3.11/site-packages/elementary/monitor/dbt_project']' returned non-zero exit status 1.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Users/gourab/dbt_env/lib/python3.11/site-packages/elementary/monitor/api/report/report.py", line 50, in get_report_data
tests_api = TestsAPI(
^^^^^^^^^
File "/Users/gourab/dbt_env/lib/python3.11/site-packages/elementary/monitor/api/tests/tests.py", line 43, in __init__
self.test_results_db_rows = self._get_test_results_db_rows(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/gourab/dbt_env/lib/python3.11/site-packages/elementary/monitor/api/tests/tests.py", line 55, in _get_test_results_db_rows
return self.tests_fetcher.get_all_test_results_db_rows(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/gourab/dbt_env/lib/python3.11/site-packages/elementary/monitor/fetchers/tests/tests.py", line 25, in get_all_test_results_db_rows
run_operation_response = self.dbt_runner.run_operation(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/gourab/dbt_env/lib/python3.11/site-packages/elementary/clients/dbt/dbt_runner.py", line 160, in run_operation
success, command_output = self._run_command(
^^^^^^^^^^^^^^^^^^
File "/Users/gourab/dbt_env/lib/python3.11/site-packages/elementary/clients/dbt/dbt_runner.py", line 99, in _run_command
raise DbtCommandError(err, command_args, logs=logs)
elementary.exceptions.exceptions.DbtCommandError: Failed to run dbt command.Denis Kokorin
06/13/2024, 9:13 AM