upd slack msg (#139)

* upd slack msg

* Update dbt_test_alert.py

* !

* alter tests
This commit is contained in:
Jack Forgash 2023-08-01 10:29:14 -06:00 committed by GitHub
parent 4a1596b0d0
commit 12e951471d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 7 deletions

View File

@ -110,8 +110,6 @@ models:
- name: MOMENT_DATE
description: "{{ doc('moment_date') }}"
tests:
- not_null:
where: set_name not in ('Fit Check', 'The Champion\'s Path') AND NOT (set_name = '2023 NBA Playoffs' and SET_SERIES_NUMBER = 5)
- dbt_expectations.expect_column_values_to_be_in_type_list:
column_type_list:
- TIMESTAMP_NTZ

View File

@ -7,6 +7,7 @@ models:
- sequence_gaps:
column_name: block_height
where: BLOCK_TIMESTAMP::DATE < CURRENT_DATE
severity: warn
columns:
- name: BLOCK_HEIGHT

View File

@ -50,7 +50,7 @@ def log_test_result():
def create_message(**kwargs):
messageBody = {
"text": f"Hey{' <@U037AH6DS8P>' if len(kwargs['messages']['fail']) > 0 else ''}, new DBT test results for :{os.environ.get('DATABASE').split('_DEV')[0]}: {os.environ.get('DATABASE')}",
"text": f"Hey{' <!here>' if len(kwargs['messages']['fail']) > 0 else ''}, new DBT test results for :{os.environ.get('DATABASE').split('_DEV')[0]}: {os.environ.get('DATABASE')}",
"attachments": [
{
"color": kwargs["color"],
@ -80,13 +80,13 @@ def create_message(**kwargs):
{
"type": "button",
"text": "View the full run results",
"text": "View Warnings",
"style": "primary",
"url": "https://github.com/FlipsideCrypto/flow-models/actions/workflows/dbt_test.yml",
"confirm": {
"title": "I haven't figured this part out yet",
"text": "I'm not sure how to get the run id from the workflow run, see all tests by clicking Ok",
"ok_text": "Ok",
"title": f"{kwargs['warn_count']} Warnings",
"text": "\n".join(kwargs["messages"]["warn"]) if len(kwargs["messages"]["warn"]) > 0 else "None :)",
"ok_text": "Continue to GHA",
"dismiss_text": "Dismiss"
}
}