I am using dbt fusion with elementary package. How...
# ask-elementary-ai
r
I am using dbt fusion with elementary package. How to configure elementary package. When I put following code to dbt_project.yml: models: elementary: +database: ac-dwh-core the the result of dbt parse is: error: dbt1060: Ignored unexpected key 'elementary'. Try '+elementary' instead. YAML path: 'elementary'.
k
A message from kapa.ai
The error you're seeing (
dbt1060: Ignored unexpected key 'elementary'. Try '+elementary' instead. YAML path: 'elementary'.
) is due to the placement and indentation of the
elementary
configuration in your
dbt_project.yml
. Elementary's configuration must be a direct child of the
models:
key, not nested under your project name or any other section.
Here’s how you should structure your `dbt_project.yml`:
Copy code
yaml models:   # Your project-specific configs here   my_project:     # ... other configs    # Elementary config must be at the same level as your project name   elementary:     +database: ac-dwh-core     # Optionally, you can also specify the schema     # +schema: elementary
Common mistakes: - Placing
elementary:
under your project name (e.g.,
my_project:
) instead of directly under
models:
. - Incorrect indentation. Reference: This structure is confirmed in the official documentation and multiple support threads, which emphasize that the
elementary
section must be a sibling to your project name under
models:
and not nested within it. This ensures dbt recognizes the configuration and applies it to the Elementary package models as intended [Install Elementary dbt package (Cloud)](https://docs.elementary-data.com/cloud/onboarding/quickstart-dbt-package#step-by-step:install-elementary-dbt-package), [Slack thread example](https://slack.com/archives/C02CTC89LAX/p1689894685010429). Example:
Copy code
yaml models:   my_project:     materialized: table    elementary:     +database: ac-dwh-core     +schema: elementary
Note: - The
+
prefix is required for model-level configs. - If you are using dbt 1.8 or above, you may also need to add the following to allow Elementary to override materializations:
Copy code
yaml   flags:     require_explicit_package_overrides_for_builtin_materializations: false
[See more details here](https://docs.elementary-data.com/cloud/onboarding/quickstart-dbt-package#step-by-step:install-elementary-dbt-package). If you follow this structure, the error should be resolved and Elementary models will be created in the specified database and schema.
r
@elementary.ai and how to disable output like: Elementary: Runtime data: {"config":{"anomaly_sensitivity":3,"disable_warn_alerts":false,
@elementary.ai and how to disable output like: Elementary: Runtime data: {"config":{"anomaly_sensitivity":3,"disable_warn_alerts":false, ...
@kapa.ai and how to disable output like: Elementary: Runtime data: {"config":{"anomaly_sensitivity":3,"disable_warn_alerts":false,
k
A message from kapa.ai
To disable or reduce the output like:
Copy code
Elementary: Runtime data: {"config":{"anomaly_sensitivity":3,"disable_warn_alerts":false, ...
there is no explicit configuration in the knowledge sources to suppress this specific runtime log output from Elementary. The available configuration options in
dbt_project.yml
and CLI flags focus on disabling Elementary's hooks, alerts, or features, but do not mention a way to silence or reduce the verbosity of Elementary's runtime logging. If you want to reduce Elementary's activity (and thus some of its output), you can disable certain features or hooks using variables in your
dbt_project.yml
, for example:
Copy code
yaml vars:   disable_run_results: "{{ target.name != 'prod' }}"   disable_tests_results: "{{ target.name != 'prod' }}"   disable_dbt_artifacts_autoupload: "{{ target.name != 'prod' }}"   disable_dbt_invocation_autoupload: "{{ target.name != 'prod' }}"
Or, you can disable the entire package for certain environments:
Copy code
yaml models:   elementary:     +enabled: "{{ target.name == 'prod' }}"
[See example and discussion here](https://slack.com/archives/C02CTC89LAX/p1674814915518089). However, these settings control what Elementary does, not what it prints. There is no mention in the knowledge sources of a flag or variable to suppress the "Runtime data" log line specifically. If you need to fully suppress this output, you may need to look into dbt or Elementary's logging configuration, but this is not documented in the provided sources. Summary: You can disable Elementary's features and hooks, but there is no documented way in the knowledge sources to suppress the "Runtime data" output specifically. If you need more control over logging verbosity, this is not covered in the current documentation or support threads.
r
@kapa.ai and what about variable 'edr_cli_run'
k
A message from kapa.ai
The variable
edr_cli_run
is mentioned in the context of disabling Elementary's hooks for certain environments. However, the knowledge sources indicate that
edr_cli_run
is primarily intended for internal use with the
edr
CLI, and not as a general-purpose variable for user configuration. A user reported issues when trying to use
edr_cli_run
to disable hooks in development, and support staff clarified that it is not meant to be used this way. Instead, the recommended and safer approach to disable Elementary's hooks is to use the following variables in your `dbt_project.yml`:
Copy code
yaml vars:   disable_run_results: "{{ target.name != 'prod' }}"   disable_dbt_invocation_autoupload: "{{ target.name != 'prod' }}"   disable_dbt_artifacts_autoupload: "{{ target.name != 'prod' }}"
This approach is supported and avoids errors related to missing folders or compilation issues. The support team also asked for feedback on why users want to disable these features, to help improve the product in the future. In summary, you should not use
edr_cli_run
for disabling hooks; use the documented variables instead for environment-specific control over Elementary's behavior [see discussion here](https://slack.com/archives/C02CTC89LAX/p1669760137760489).
r
@kapa.ai and can I disable on run start hook?
k
A message from kapa.ai
Yes, you can disable the Elementary on-run-start hook by disabling the entire Elementary package for specific environments using the
+enabled
flag in your
dbt_project.yml
. For example:
Copy code
yaml models:   elementary:     +enabled: "{{ target.name == 'prod' }}"
This will prevent Elementary (including its hooks) from running in any environment except
prod
[see example](https://slack.com/archives/C02CTC89LAX/p1675438839754619). Alternatively, you can use a variable to control when Elementary is enabled, such as:
Copy code
yaml models:   elementary:     +enabled: "{{ var('elementary_enabled', True) }}"
And then run dbt with:
Copy code
dbt run --vars '{"elementary_enabled": false}'
[see example](https://slack.com/archives/C02CTC89LAX/p1677660628796219). There is no specific variable documented to disable only the on-run-start hook (as there is for on-run-end hooks), so the recommended approach is to disable the entire package for the environments where you do not want the hooks to run.