soda-core
soda-core copied to clipboard
For each group
Example SodaCL
for each country in CUSTOMER [daily]:
- avg(points) > 20000
- min(sales) between 0 and 200
or multi-column group by
for each (country, zip, category) in CUSTOMER [daily]:
- avg(points) > 20000
- min(sales) between 0 and 200
Which would lead to Soda Cloud json:
checks:
- identity: count-60cd147f
definition: "..."
location:
file_path: sodacl_string.yml
line: 3
col: 11
data_source: postgres
table: '"CUSTOMER"'
partition: daily
outcome: pass
diagnostics:
check_values:
- group_value:
country: BE
zip: 2300
category: 'HIGH'
metric: avg(points)
value: 16
- group_value:
country: NL
zip: AX 99873
category: 'LOW'
metric: avg(points)
value: 1600
threshold:
fail:
gt: 0.0
lt: 0.0