Hey, is it deprecated to set up tests with `elemen...
# community-support
k
Hey, is it deprecated to set up tests with
elementary.table_anomalies
? All I see in the docs are volume/freshness anomalies etc. What would be the new way of setting up:
Copy code
- elementary.table_anomalies:
      timestamp_column: event_timestamp
      severity: '{{ "error" if target.name == "prod" else "warn" }}'
      tags:
      - elementary
      table_anomalies: ["row_count", "freshness"]
      anomaly_direction: both
      sensitivity: 3
      seasonality: day_of_week
?
✅ 1
👀 1
i
Hi @Kasper Ramström! Yes, we deprecated it in favor of more explicit tests - see
volume_anomalies
,
freshness_anomalies
and
event_freshness_anomalies
in the docs. That being said,
table_anomalies
should still work well for you, we kept backward compatibility here.
k
ok great, thanks!
I now have this configuration:
Copy code
- name: product_search_latest
  tests:
  - elementary.volume_anomalies:
      severity: '{{ "error" if target.name == "prod" else "warn" }}'
      tags:
      - elementary
  - elementary.freshness_anomalies:
      severity: '{{ "error" if target.name == "prod" else "warn" }}'
      tags:
      - elementary
  config:
    elementary:
      timestamp_column: event_timestamp
      seasonality: day_of_week
      time_bucket:
        period: day
        count: 1
      anomaly_sensitivity: 2.5
      anomaly_direction: both
      days_back: 14
but I get the error:
Copy code
Compilation Error in test elementary_freshness_anomalies_product_search_latest_ (models/dwh/dynamodb/_dynamodb.yml)\n  Missing mandatory configuration: ['timestamp_column']\n  \n  > in macro validate_mandatory_configuration (macros/edr/tests/test_configuration/get_anomalies_test_configuration.sql)\n  > called by macro get_anomalies_test_configuration (macros/edr/tests/test_configuration/get_anomalies_test_configuration.sql)\n  > called by macro test_table_anomalies (macros/edr/tests/test_table_anomalies.sql)\n  > called by macro test_freshness_anomalies (macros/edr/tests/test_freshness_anomalies.sql)\n  > called by test elementary_freshness_anomalies_product_search_latest_
any idea what I'm doing wrong?
Also my slack alert for this is looking weird as well
mathem-dbt-prod.dbt_test__audit
doesnt exist and has nothing to do with this model