models:
  - name: this_is_a_model
    tests:
      - elementary.volume_anomalies:
          where_expression: "user_name != 'test'"

Generate your anomaly test with Elementary AI

Let our Slack chatbot create the anomaly test you need.

where_expression: [sql expression]

Filter the tested data using a valid sql expression.

  • Default: None
  • Relevant tests: All anomaly detection tests

The where_expression is used to filter out the data that you want to test. For example, to only test weekdays for anomalies, you can filter on the day of the week:

where_expression: EXTRACT(DOW FROM timestamp_column) BETWEEN 2 AND 6 
#Test Monday through Friday
models:
  - name: this_is_a_model
    tests:
      - elementary.volume_anomalies:
          where_expression: "user_name != 'test'"