Reta Gasser
07/10/2025, 9:03 PMcould not find profile named elementary I will post full error in thread.kapa.ai
07/10/2025, 9:03 PMReta Gasser
07/10/2025, 9:03 PMkapa.ai
07/10/2025, 9:04 PMcould not find profile named elementary is a common issue when using Elementary Data. This error means that the CLI is unable to locate a dbt profile named elementary in your profiles.yml file. Here are the most common causes and solutions: 1. Missing or Incorrect Profile Name Your profiles.yml file must contain a top-level key named elementary. For example: yaml elementary: outputs: default: type: snowflake account: <account> user: <user> password: <password> role: <role> warehouse: <warehouse> database: <database> schema: <schema> threads: 2 If your profile is named something else, rename it to elementary or use the correct profile name with the CLI if supported. The profile name must match exactly, including case and indentation. This is a frequent cause of the error, as seen in several support threads [Slack thread](https://slack.com/archives/C02CTC89LAX/p1680261939270689). 2. profiles.yml Location By default, dbt and Elementary look for profiles.yml in the ~/.dbt directory. If your profiles.yml is elsewhere, you must specify the location using the --profiles-dir flag: edr report --profiles-dir /path/to/your/profiles If you are running the command from the directory containing profiles.yml, you can use: edr report --profiles-dir . [Slack thread](https://slack.com/archives/C02CTC89LAX/p1679232209390069) 3. Profile Content and Indentation Ensure your profiles.yml is correctly indented and contains all required fields for your data warehouse. Indentation errors or missing fields can cause the profile to be unreadable [Slack thread](https://slack.com/archives/C02CTC89LAX/p1660757938346229). 4. Multiple Profiles If you have multiple profiles in your profiles.yml, make sure there is a dedicated elementary profile. Elementary requires its own profile, separate from your main dbt project profile [Slack thread](https://slack.com/archives/C02CTC89LAX/p1686013979045139). 5. Authentication Method For some warehouses (e.g., Snowflake), certain authentication methods like externalbrowser may not work in all environments. If you are using such a method, consider switching to user/password or keyfile authentication if possible [Slack thread](https://slack.com/archives/C02CTC89LAX/p1660757938346229). If you post your full error and your profiles.yml (with sensitive info redacted), I can help you debug further!Reta Gasser
07/10/2025, 9:30 PM--profiles-dir src/slack_report I got
Error: Got unexpected extra arguments (profiles-dir src/slack_report --gcs-bucket-name tmc-dbt --bucket-file-path elementary/sae-report.html --gcs-timeout-limit 4800 --slack-token xoxb-249541362435-2529728678550-n0LyoMz5yVIM9ZnrB3t4LjBN --slack-channel-name dts-test-alerts --disable-passed-test-metrics true --days-back 3 --update-bucket-website false --report-url <https://tmc-elementary-658278252325.us-central1.run.app> --project-name TMC Elementary --env Production -p . -t prod)Reta Gasser
07/10/2025, 9:34 PMReta Gasser
07/10/2025, 9:39 PM2025-07-10 21:37:57 — 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": 3, "invocations_per_test": 720, "disable_passed_test_metrics": true}} --project-dir /usr/local/lib/python3.10/site-packages/elementary/monitor/dbt_project --profiles-dir /app/src --target prod
07/10/2025 3:37:57 PM
{"data": {"exc": "Runtime Error\n Could not find profile named 'elementary'"}, "info": {"category": "", "code": "Z002", "extra": {}, "invocation_id": "6d2a1619-6cf6-44c5-8146-e02e7490c119", "level": "error", "msg": "Encountered an error:\nRuntime Error\n Could not find profile named 'elementary'", "name": "MainEncounteredError", "pid": 13, "thread": "MainThread", "ts": "2025-07-10T21:37:57.010694Z"}}
07/10/2025 3:37:57 PM
[31;20m2025-07-10 21:37:57 — ERROR — Could not generate the report - Error: Failed to run dbt command.Reta Gasser
07/10/2025, 9:43 PMkapa.ai
07/10/2025, 9:43 PMReta Gasser
07/10/2025, 9:44 PMkapa.ai
07/10/2025, 9:44 PMkapa.ai
07/10/2025, 9:45 PMReta Gasser
07/10/2025, 9:58 PMkapa.ai
07/10/2025, 9:58 PMkapa.ai
07/10/2025, 9:58 PMprofiles.yml in /app/src (since you are using --profiles-dir /app/src). - The file must be named exactly profiles.yml (not, for example, profile.yml or Profiles.yml) [Slack thread](https://slack.com/archives/C02CTC89LAX/p1679232209390069). 2. Check Profile Name and Structure - The file must contain a top-level key named elementary. For example: yaml elementary: target: prod outputs: prod: type: <warehouse_type> ... - The target you specify (--target prod) must match a key under outputs [Slack thread](https://slack.com/archives/C02CTC89LAX/p1686013979045139). 3. File Formatting - YAML formatting and indentation must be correct. Even a small indentation error can cause dbt to not recognize the profile [Slack thread](https://slack.com/archives/C02CTC89LAX/p1660757938346229). 4. Absolute vs. Relative Paths - If you are using service account files (e.g., for BigQuery), try using the absolute path for the keyfile, as relative paths can sometimes cause issues [Github Issue #1702](https://github.com/elementary-data/elementary/issues/1702). ### Additional Info That Would Help - The (redacted) contents of your /app/src/profiles.yml file. - Confirmation that /app/src/profiles.yml is readable by the process running the command. - The exact command you are running. - The output of ls /app/src to confirm the file is present. ### If All Else Fails If you have confirmed all of the above and it still does not work, the knowledge sources suggest that the most common root causes are: - The profile is not named elementary. - The file is not in the directory specified by --profiles-dir. - There is a formatting or indentation error in the YAML. If you can share the (redacted) contents of your profiles.yml and the exact command you are running, I can help you debug further based on the documented troubleshooting steps. If you have already checked all these and it still fails, the knowledge sources do not provide additional troubleshooting steps beyond what is listed above. Please provide the requested details for more targeted help.Reta Gasser
07/10/2025, 10:06 PMelementary:
target: dev
outputs:
prod:
type: "bigquery"
project: "tmc-data-warehouse"
dataset: "dbt_elementary"
method: service-account
# NOTE - This needs to be the ABSOLUTE path to the Service Account file
keyfile: "{{ env_var('GOOGLE_APPLICATION_CREDENTIALS') }}"
threads: 4Reta Gasser
07/10/2025, 10:07 PMkapa.ai
07/10/2025, 10:07 PMkapa.ai
07/10/2025, 10:07 PMCould not find profile named 'elementary' almost always means that dbt (and thus Elementary) cannot find a profile named elementary in the profiles.yml file at the location specified by --profiles-dir. - The knowledge sources repeatedly confirm that the following must be true: - The file must be named profiles.yml and be located in the directory you specify with --profiles-dir. - The file must contain a top-level key named elementary. - The outputs section under elementary must contain the target you are specifying (e.g., prod). - The YAML must be correctly formatted and indented. - If you are using service account files (e.g., for BigQuery), the path to the keyfile should be absolute, not relative, as this has caused issues for others [Github Issue #1702](https://github.com/elementary-data/elementary/issues/1702). ### What I Still Need You mentioned "see profiles file above," but I do not see the contents of your profiles.yml file in this thread. The knowledge sources and support threads always request to see the (redacted) contents of the profiles.yml file to help debug further, as this is the most direct way to identify issues such as: - Incorrect profile name - Indentation or formatting errors - Missing or mismatched target names ### Next Steps Please paste the (redacted) contents of your /app/src/profiles.yml file here. This will allow me to review it for the common issues described in the knowledge sources and provide specific guidance. If you have already checked all the above and the error persists, the knowledge sources do not provide additional troubleshooting steps without seeing the actual profiles.yml content. Please share that file (with sensitive info removed) so I can help you further.Reta Gasser
07/10/2025, 10:07 PMelementary:
target: dev
outputs:
prod:
type: "bigquery"
project: "tmc-data-warehouse"
dataset: "dbt_elementary"
method: service-account
# NOTE - This needs to be the ABSOLUTE path to the Service Account file
keyfile: "{{ env_var('GOOGLE_APPLICATION_CREDENTIALS') }}"
threads: 4kapa.ai
07/10/2025, 10:07 PMkapa.ai
07/10/2025, 10:07 PMprofiles.yml. Based on the knowledge sources, here are the issues and recommendations: --- ### 1. Mismatch Between Target and Outputs Your profile specifies: yaml elementary: target: dev outputs: prod: ... But there is no dev output under outputs. The target value must match one of the keys under outputs. In your case, you have prod as the only output, but target is set to dev. This will cause dbt (and Elementary) to fail to find the correct configuration, resulting in the error you are seeing. How to fix: Either change your target to `prod`: yaml elementary: target: prod outputs: prod: type: "bigquery" project: "tmc-data-warehouse" dataset: "dbt_elementary" method: service-account keyfile: "{{ env_var('GOOGLE_APPLICATION_CREDENTIALS') }}" threads: 4 Or add a dev output if you intend to use a dev environment. --- ### 2. Environment Variable for Keyfile Using {{ env_var('GOOGLE_APPLICATION_CREDENTIALS') }} for the keyfile is supported by dbt, but several users have reported issues with relative paths or environment variables not being picked up in some environments. If you continue to have issues, try setting the keyfile to an absolute path directly, as this has resolved similar errors for others [Github Issue #1702](https://github.com/elementary-data/elementary/issues/1702), [Slack thread](https://slack.com/archives/C02CTC89LAX/p1731008431456499). --- ### 3. File Location and Naming Ensure that: - The file is named exactly profiles.yml. - It is located in /app/src (since you are using --profiles-dir /app/src). --- ### 4. Summary - The most immediate issue is the mismatch between target: dev and the available outputs. Change target to prod or add a dev output. - If you still get a keyfile error, try using the absolute path for the keyfile. - Make sure the file is in the correct location and named correctly. --- These steps are directly supported by the knowledge sources and have resolved similar issues for other users [Oss CLI install & configure](https://docs.elementary-data.com/oss/cli-install), [Slack thread](https://slack.com/archives/C02CTC89LAX/p1680261939270689). If you make these changes and still encounter issues, please share the updated error message for further troubleshooting.