This is an automated email from the ASF dual-hosted git repository.
guoyp pushed a commit to branch griffin-2.0.0-dev
in repository https://gitbox.apache.org/repos/asf/griffin.git
The following commit(s) were added to refs/heads/griffin-2.0.0-dev by this push:
new 4eb8fd97 update recording-checking-alert flow (#674)
4eb8fd97 is described below
commit 4eb8fd97b8d35fd582edb6753daee339810c30cd
Author: john.liu <[email protected]>
AuthorDate: Mon Jan 13 10:09:37 2025 +0800
update recording-checking-alert flow (#674)
* update recording-checking-alert flow
* update typos of dqc.yml::parameters
---------
Co-authored-by: John.Liu <[email protected]>
---
griffin-dqc/src/main/resources/dqc.yml | 56 ++++++++++++++++++++++++++++++++++
1 file changed, 56 insertions(+)
diff --git a/griffin-dqc/src/main/resources/dqc.yml
b/griffin-dqc/src/main/resources/dqc.yml
new file mode 100644
index 00000000..aac18936
--- /dev/null
+++ b/griffin-dqc/src/main/resources/dqc.yml
@@ -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}}