elementary icon indicating copy to clipboard operation
elementary copied to clipboard

Missing max tests in report when defining it together with min tests

Open retrry opened this issue 1 year ago • 4 comments

Describe the bug Missing max tests, when defining tests in schema.yml

To Reproduce

  1. Define tests for model in schema.yml
  - elementary.column_anomalies:
      column_anomalies:
        - max
        - min
      column_name: "value_column"
      timestamp_column: "measured_at"
      training_period:
        period: month
        count: 1
      time_bucket:
        period: hour
        count: 12
      detection_delay:
        period: hour
        count: 12
      ignore_small_changes:
        spike_failure_percent_threshold: 10
        drop_failure_percent_threshold: 10
  1. Run dbt run && dbt test
  2. Run edr report

Expected behavior I expect to find min and max tests in generated report, but I only find min tests in the report.

Screenshots If applicable, add screenshots to help explain your problem.

Environment (please complete the following information):

  • Elementary CLI (edr) version: 0,16
  • Elementary dbt package version: 0.16
  • dbt version you're using: 1.8.4
  • Data warehouse: postgres
  • Infrastructure details: macOS

Additional context I have defined separate tests in schema.yml

  - elementary.column_anomalies:
      column_anomalies:
        - average
        - standard_deviation
        - variance
      column_name: "value_column"
      timestamp_column: "measured_at"
      training_period:
        period: month
        count: 1
      time_bucket:
        period: hour
        count: 12
      detection_delay:
        period: hour
        count: 12
  - elementary.column_anomalies:
      column_anomalies:
        - null_count
        - null_percent
        - zero_count
        - zero_percent
      column_name: "value_column"
      timestamp_column: "measured_at"
      training_period:
        period: month
        count: 1
      time_bucket:
        period: hour
        count: 12
      detection_delay:
        period: hour
        count: 12
      ignore_small_changes:
        spike_failure_percent_threshold: 15
        drop_failure_percent_threshold: 15

Would you be willing to contribute a fix for this issue? Not enough knowledge

retrry avatar Aug 07 '24 07:08 retrry

Hey @retrry, i seem to be unable to reproduce this issue locally, can you share a screenshot of the report? with the relevant test result expanded like so: Screenshot 2024-08-07 at 10 57 25

ofek1weiss avatar Aug 07 '24 07:08 ofek1weiss

Hey, after more testing I see that I misidentified the problem. The tests are run correctly and if I select the model directly - I can see them, but for column anomalies only 1 of the tests is displayed in main results window.

Main results window: image

One model selected: image

retrry avatar Aug 08 '24 07:08 retrry

Hi @retrry ! Sorry for the delay here, I believe this is a bug we actually fixed but never released, we'll do so!

haritamar avatar Aug 22 '24 12:08 haritamar

@haritamar any updates on this?

retrry avatar Sep 10 '24 07:09 retrry