I set up this config on a model level in my model....
# ask-elementary-ai
m
I set up this config on a model level in my model.yml file, in order to get more record stored on the test failures table. However it still returns just 5 records. Note that I am aware that I can set a different sample value on the dbt_project file however I would like to store a specific sample just for one test on that model
Copy code
config:
          elementary:
            test_sample_row_count: 100000
k
A message from kapa.ai
Based on the knowledge sources, the variable test_sample_row_count must be set under the global vars section in your dbt_project.yml file, not within a model's config block or model.yml file. Setting it at the model or test level (e.g., under config: elementary: test_sample_row_count) will not have any effect—Elementary only reads this variable from the global vars context in dbt_project.yml. Currently, there is no documented or supported way to set test_sample_row_count for a specific test or model only; it applies globally to all tests when set in dbt_project.yml. The only workaround mentioned is to run dbt test with different --vars values for different test selections, but this is a manual process and not per-test configuration within the YAML files themselves. For example:
Copy code
dbt test -s some_tests --vars 'test_sample_row_count: 5' dbt test -s some_other_tests --vars 'test_sample_row_count: 100'
But, other than this, per-test or per-model configuration is not currently supported by Elementary. If you need this feature, you might consider submitting a feature request to the Elementary team [as suggested in the community](https://slack.com/archives/C02CTC89LAX/p1674483957229789). In summary: test_sample_row_count must be set globally in dbt_project.yml under vars, and cannot be set per-model or per-test in model.yml or config blocks at this time. [See discussion](https://slack.com/archives/C02CTC89LAX/p1704277382272089) and [here](https://slack.com/archives/C02CTC89LAX/p1674483957229789).