@kapa.ai
I have my profiles.yml in my dbt project directory and when I run dbt debug, it works fine.
However, after adding the elementary profiles to it and running erd report, I keep getting the error below:
2025-07-22 013203 — ERROR — Unable to get the latest invocation: Failed to run dbt command.
Runtime Error
Could not find profile named ‘elementary’
{“data”: {“exc”: “Runtime Error\n Could not find profile named ‘elementary’“}, “info”: {“category”: “”, “code”: “Z002”, “extra”: {}, “invocation_id”: “b6eb69a4-2610-4cf8-ba76-43b394c3aac3", “level”: “error”, “msg”: “Encountered an error:\nRuntime Error\n Could not find profile named ‘elementary’“, “name”: “MainEncounteredError”, “pid”: 78446, “thread”: “MainThread”, “ts”: “2025-07-22T003203.046465Z”}}
{“data”: {“exc”: “Runtime Error\n Could not find profile named ‘elementary’“}, “info”: {“category”: “”, “code”: “Z002”, “extra”: {}, “invocation_id”: “98e5b52f-0bdc-49f2-acf1-d15cd8c488c4", “level”: “error”, “msg”: “Encountered an error:\nRuntime Error\n Could not find profile named ‘elementary’“, “name”: “MainEncounteredError”, “pid”: 78446, “thread”: “MainThread”, “ts”: “2025-07-22T003204.018754Z”}}
2025-07-22 013204 — ERROR — Failed to parse Elementary’s database and schema.
2025-07-22 013204 — 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 /Users/mac/Documents/dbt/lib/python3.9/site-packages/elementary/monitor/dbt_project
{“data”: {“exc”: “Runtime Error\n Could not find profile named ‘elementary’“}, “info”: {“category”: “”, “code”: “Z002”, “extra”: {}, “invocation_id”: “16e6d00c-0575-4947-a7df-6cc5d59a949d”, “level”: “error”, “msg”: “Encountered an error:\nRuntime Error\n Could not find profile named ‘elementary’“, “name”: “MainEncounteredError”, “pid”: 78446, “thread”: “MainThread”, “ts”: “2025-07-22T003205.046877Z”}}
2025-07-22 013205 — ERROR — Could not generate the report - Error: Failed to run dbt command.
Runtime Error
Could not find profile named ‘elementary’
Please reach out to our community for help with this issue.
Traceback (most recent call last):
File “/Users/mac/Documents/dbt/lib/python3.9/site-packages/elementary/monitor/api/report/report.py”, line 84, in get_report_data
tests_api = TestsAPI(
File “/Users/mac/Documents/dbt/lib/python3.9/site-packages/elementary/monitor/api/tests/tests.py”, line 52, in init
self.test_results_db_rows = self._get_test_results_db_rows(
File “/Users/mac/Documents/dbt/lib/python3.9/site-packages/elementary/monitor/api/tests/tests.py”, line 64, in _get_test_results_db_rows
return self.tests_fetcher.get_all_test_results_db_rows(
File “/Users/mac/Documents/dbt/lib/python3.9/site-packages/elementary/monitor/fetchers/tests/tests.py”, line 26, in get_all_test_results_db_rows
run_operation_response = self.dbt_runner.run_operation(
File “/Users/mac/Documents/dbt/lib/python3.9/site-packages/elementary/clients/dbt/command_line_dbt_runner.py”, line 177, in run_operation
result = self._run_command(
File “/Users/mac/Documents/dbt/lib/python3.9/site-packages/elementary/clients/dbt/command_line_dbt_runner.py”, line 114, in _run_command
result = self._inner_run_command(
File “/Users/mac/Documents/dbt/lib/python3.9/site-packages/elementary/clients/dbt/api_dbt_runner.py”, line 54, in _inner_run_command
raise DbtCommandError(
elementary.exceptions.exceptions.DbtCommandError: Failed to run dbt command.
Runtime Error
Could not find profile named ‘elementary’
I have the following in the profiles.yml file in my dbt project root directory
# Elementary configuration profile
# This profile is used for the Elementary package to monitor data quality and expectations
elementary:
outputs:
default:
# This is the default output configuration for Elementary
type: “postgres”
host: “localhost”
user: “{{ env_var(‘DBT_USER’) }}”
pass: “{{ env_var(‘DBT_PASSWORD’) }}”
dbname: “{{ env_var(‘DBT_DATABASE’) }}”
schema: “elementary”
port: 5432
threads: 5