Hello! I'm currently using elementary as my data o...
# community-support
e
Hello! I'm currently using elementary as my data observability tool, and it's been really helpful to my data pipeline. And I have a small issue with testing. Can I do multiple testings with a single test definition in schema.yml? Currently I'm doing elementary testing like this...
Copy code
models:

    - name: my_model_01
      tests:
        - elementary.freshness_anomalies:
          timestamp_column: "created_at"
          tags: ["engineer", "source", "dbt"]
        - elementary.volume_anomalies:
          timestamp_column: "created_at"
          tags: ["engineer", "source", "dbt"]

    - name: my_model_02
      tests:
        - elementary.freshness_anomalies:
          timestamp_column: "created_at"
          tags: ["engineer", "source", "dbt"]
        - elementary.volume_anomalies:
          timestamp_column: "created_at"
          tags: ["engineer", "source", "dbt"]

    - name: my_model_{0n}
      tests:
        - elementary.freshness_anomalies:
          timestamp_column: "created_at"
          ...
and these things keep going on and on until it reaches my last dbt model. Is there any features that I can do like this below? (It doesn't exactly have to be on schema.yml,)
Copy code
elementary.freshness_anomalies:
- models: ["my_model_01", "my_model_02", "my_model_03"....]
  timestamp_column: "created_at"
  tags: ["engineer", "source", "dbt"]
I think this feature would help a lot to people who have numerous models and tests. But I cannot find any info about this online, please lead me the way.
➕ 1
j
Hi @Edwin Park! Completely understand the ask. However, it would go against how dbt is structured. The hierarchy dbt is using is
model-> test
or
model->column->test
(simplified). You are suggesting
test-model(s)
which is not something we offer (or even can). Sorry! But on the cloud version you get automated monitors on all your tables 🙂
👍 1
e
Thank you for the check. 🙂 I believe, someday, we can sort this out!
j
You can write a script that makes the yaml for you! That should be fairly simple to do. However, I think doing a different dbt structure will be hard
🤔 1
If you are familiar with python, this is a great package that can help you load the yaml, add your own generated code and export the yaml: https://pypi.org/project/ruamel.yaml/
👀 1
e
Oh, Definitely I'll look into it. :) It seems legit! Thanks for the guidance.