<@U088WCP3B4P> Where to place the "arguments" prop...
# ask-elementary-ai
m
@kapa.ai Where to place the "arguments" property in my elementary dbt tests in a yaml file? Here is an example:
Copy code
- elementary.dimension_anomalies:
              tags: ["elementary"]
              dimensions:
                - source_currency
                - destination_currency
              meta:
                description: Monitors the frequency of values in the configured dimensions over time.
Copy code
[WARNING][MissingArgumentsPropertyInGenericTestDeprecation]: Deprecated
functionality
Found top-level arguments to test `elementary.dimension_anomalies`. Arguments to
generic tests should be nested under the `arguments` property.`
k
A message from kapa.ai
You’re seeing a dbt deprecation warning: generic test configs should be nested under an arguments key. For Elementary tests in YAML, move all test-specific params (dimensions, tags, meta, etc.) under arguments. Example:
Copy code
yaml models:   - name: your_model     tests:       - elementary.dimension_anomalies:           arguments:             dimensions:               - source_currency               - destination_currency             tags: ["elementary"]             meta:               description: Monitors the frequency of values in the configured dimensions over time.
Notes: - Elementary tests are standard dbt generic tests and are configured in the same YAML files as native dbt tests (e.g., schema.yml). Ensure tests are defined under the model (not under config) (["Add anomaly detection tests"](https://docs.elementary-data.com/data-tests/add-elementary-tests#adding-tests-examples); [Slack thread example](https://slack.com/archives/C02CTC89LAX/p1730300160839989)). - dimension_anomalies requires dimensions and supports other anomaly params at the test level (["dimension_anomalies"](https://docs.elementary-data.com/data-tests/anomaly-detection-tests/dimension-anomalies#test-configuration)).
m
I don't see anything about arguments in the docs you linked. What is the appropriate slack channel to ask this question to a human
r
@kapa.ai after nesting generic test configs under the arguments key, encountered this error in Github actions under dbt-action@v1.7.3 macro 'dbt_macro__test_schema_changes' takes no keyword argument 'arguments'.
k
A message from kapa.ai
This error means the dbt version running in GitHub Actions doesn’t support the new arguments nesting for generic tests. When dbt parses the test, it forwards an arguments dict to the test macro (e.g., dbt_macro__test_schema_changes). Older dbt macro signatures don’t accept arguments, so compilation fails. What to do: - Use legacy (unnested) params for Elementary tests in that CI job, or - Upgrade the dbt runner in GitHub Actions to a version that supports arguments for generic tests. Relevant context: - Similar “macro ... takes no keyword argument …” errors often stem from mismatched dbt versions or conflicting/overridden macros. Upgrading or aligning versions resolved related issues for users; macro name conflicts in other packages also caused similar errors. [[Snowflake create_schema](https://slack.com/archives/C02CTC89LAX/p1692270804605609); [Macro conflict](https://github.com/elementary-data/elementary/issues/1492)]. If upgrading dbt in CI isn’t possible, revert your YAML test to the prior style in that environment, for example:
Copy code
yaml models:   - name: your_model     tests:       - elementary.schema_changes
I don’t have a source explicitly confirming Elementary’s tests require arguments today, so if the error persists after upgrading dbt, check for: - An overridden test macro named schema_changes in your project or dependencies. [[Macro conflict](https://github.com/elementary-data/elementary/issues/1492)]. - Using the correct Elementary package version, since older versions lacked some parameters across tests and raised similar keyword-argument errors. [[Freshness anomalies params](https://slack.com/archives/C02CTC89LAX/p1685592068134349); [Ignore small changes params](https://slack.com/archives/C02CTC89LAX/p1702542302494829); [Training period fix](https://github.com/elementary-data/elementary/issues/1641)].