Skip to content

Commit

Permalink
update recording-checking-alert flow (#674)
Browse files Browse the repository at this point in the history
* update recording-checking-alert flow

* update typos of dqc.yml::parameters

---------

Co-authored-by: John.Liu <[email protected]>
  • Loading branch information
john-liu and John.Liu authored Jan 13, 2025
1 parent 46789ff commit 4eb8fd9
Showing 1 changed file with 56 additions and 0 deletions.
56 changes: 56 additions & 0 deletions griffin-dqc/src/main/resources/dqc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
griffin_recording:
count:
parameters:
- table_name: "table_name"
required: true
- filter_expression: "filter_expression"
required: false
metric: |
SELECT
COUNT(1) AS count
FROM {{table_name}}
WHERE {{filter_expression}};
count_distinct:
parameters:
- table_name: "table_name"
required: true
- pk_columns: "pk_columns"
required: true
- filter_expression: "filter_expression"
required: false
metric: |
SELECT
COUNT(DISTINCT {{pk_columns}}) AS count
FROM {{table_name}}
WHERE {{filter_expression}};
group_count:
parameters:
- table_name: "table_name"
required: true
- group_columns: "group_columns"
required: true
- filter_expression: "filter_expression"
required: false
metric: |
SELECT
{{group_columns}},
COUNT(1) AS count
FROM {{table_name}}
WHERE {{filter_expression}}
GROUP BY {{group_columns}};
griffin_check_alerts:
simple:
operator: {{operator}}
threshold: {{threshold}}
alerts:
email: {{email}}
webhook: {{webhook}}
cross:
operator: {{operator}}
threshold: {{target_metric}}
alerts:
email: {{email}}
webhook: {{webhook}}

0 comments on commit 4eb8fd9

Please sign in to comment.