curated-heal-var (#121)

heal var
This commit is contained in:
drethereum 2024-01-17 15:45:08 -05:00 committed by GitHub
parent 9062eed4c9
commit 605c7bc9c1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 15 additions and 3 deletions

View File

@ -47,6 +47,17 @@ Default values are False
* Usage:
dbt run --var '{"UPDATE_UDFS_AND_SPS":True}' -m ...
To reload records in a curated complete table without a full-refresh, such as `silver_bridge.complete_bridge_activity`:
* HEAL_CURATED_MODEL
Default is an empty array []
When item is included in var array [], incremental logic will be skipped for that CTE / code block
When item is not included in var array [] or does not match specified item in model, incremental logic will apply
Example set up: `{% if is_incremental() and 'axelar' not in var('HEAL_CURATED_MODEL') %}`
* Usage:
Single CTE: dbt run --var '{"HEAL_CURATED_MODEL":"axelar"}' -m ...
Multiple CTEs: dbt run --var '{"HEAL_CURATED_MODEL":["axelar","across","celer_cbridge"]}' -m ...
### Resources:
- Learn more about dbt [in the docs](https://docs.getdbt.com/docs/introduction)
- Check out [Discourse](https://discourse.getdbt.com/) for commonly asked questions and answers

View File

@ -66,6 +66,7 @@ vars:
WAIT: 0
OBSERV_FULL_TEST: False
HEAL_MODEL: False
HEAL_CURATED_MODEL: []
START_GHA_TASKS: False
API_INTEGRATION: '{{ var("config")[target.name]["API_INTEGRATION"] if var("config")[target.name] else var("config")["dev"]["API_INTEGRATION"] }}'
EXTERNAL_FUNCTION_URI: '{{ var("config")[target.name]["EXTERNAL_FUNCTION_URI"] if var("config")[target.name] else var("config")["dev"]["EXTERNAL_FUNCTION_URI"] }}'

View File

@ -31,7 +31,7 @@ WITH celer_cbridge AS (
FROM
{{ ref('silver_bridge__celer_cbridge_send') }}
{% if is_incremental() %}
{% if is_incremental() and 'celer_cbridge' not in var('HEAL_CURATED_MODEL') %}
WHERE
_inserted_timestamp >= (
SELECT
@ -66,7 +66,7 @@ hop AS (
FROM
{{ ref('silver_bridge__hop_transfersent') }}
{% if is_incremental() %}
{% if is_incremental() and 'hop' not in var('HEAL_CURATED_MODEL') %}
WHERE
_inserted_timestamp >= (
SELECT
@ -101,7 +101,7 @@ meson AS (
FROM
{{ ref('silver_bridge__meson_transfers') }}
{% if is_incremental() %}
{% if is_incremental() and 'meson' not in var('HEAL_CURATED_MODEL') %}
WHERE
_inserted_timestamp >= (
SELECT