select plus run times

This commit is contained in:
Eric Laurello 2023-09-07 13:26:33 -04:00
parent 137241fb73
commit 10986504e0
4 changed files with 16 additions and 14 deletions

View File

@ -4,7 +4,7 @@ run-name: dbt_run_scheduled
on:
workflow_dispatch:
schedule:
- cron: '0 0,12,23 * * *'
- cron: '20,50 * * * *'
env:
DBT_PROFILES_DIR: ./

View File

@ -52,4 +52,15 @@ vars:
tests:
+store_failures: true # all tests
+store_failures: true # all tests
dispatch:
- macro_namespace: dbt
search_order:
- thorchain-models
- dbt_snowflake_query_tags
- dbt
query-comment:
comment: '{{ dbt_snowflake_query_tags.get_query_comment(node) }}'
append: true # Snowflake removes prefixed comments.

View File

@ -1,11 +0,0 @@
{% macro set_query_tag() -%}
{% set new_json = {"repo":project_name, "object":this.table, "profile":target.profile_name, "env":target.name, "existing_tag":get_current_query_tag() } %}
{% set new_query_tag = tojson(new_json) | as_text %}
{% if new_query_tag %}
{% set original_query_tag = get_current_query_tag() %}
{{ log("Setting query_tag to '" ~ new_query_tag ~ "'. Will reset to '" ~ original_query_tag ~ "' after materialization.") }}
{% do run_query("alter session set query_tag = '{}'".format(new_query_tag)) %}
{{ return(original_query_tag)}}
{% endif %}
{{ return(none)}}
{% endmacro %}

View File

@ -6,4 +6,6 @@ packages:
- package: Snowflake-Labs/dbt_constraints
version: [">=0.4.0"]
- git: https://github.com/FlipsideCrypto/fsc-utils.git
revision: "v1.3.0"
revision: "v1.3.0"
- package: get-select/dbt_snowflake_query_tags
version: [">=2.0.0", "<3.0.0"]