This commit is contained in:
drethereum 2024-01-17 09:35:16 -07:00
parent 002de7d735
commit 73018f8233
3 changed files with 22 additions and 10 deletions

View File

@ -46,6 +46,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

@ -65,6 +65,7 @@ vars:
OBSERV_FULL_TEST: False
WAIT: 0
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

@ -33,7 +33,7 @@ WITH across AS (
FROM
{{ ref('silver_bridge__across_fundsdeposited') }}
{% if is_incremental() %}
{% if is_incremental() and 'across' not in var('HEAL_CURATED_MODEL') %}
WHERE
_inserted_timestamp >= (
SELECT
@ -69,7 +69,7 @@ axelar AS (
FROM
{{ ref('silver_bridge__axelar_contractcallwithtoken') }}
{% if is_incremental() %}
{% if is_incremental() and 'axelar' not in var('HEAL_CURATED_MODEL') %}
WHERE
_inserted_timestamp >= (
SELECT
@ -105,7 +105,7 @@ 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
@ -141,7 +141,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
@ -177,7 +177,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
@ -213,7 +213,7 @@ stargate AS (
FROM
{{ ref('silver_bridge__stargate_swap') }}
{% if is_incremental() %}
{% if is_incremental() and 'stargate' not in var('HEAL_CURATED_MODEL') %}
WHERE
_inserted_timestamp >= (
SELECT
@ -249,7 +249,7 @@ symbiosis AS (
FROM
{{ ref('silver_bridge__symbiosis_synthesizerequest') }}
{% if is_incremental() %}
{% if is_incremental() and 'symbiosis' not in var('HEAL_CURATED_MODEL') %}
WHERE
_inserted_timestamp >= (
SELECT
@ -285,7 +285,7 @@ synapse_tb AS (
FROM
{{ ref('silver_bridge__synapse_token_bridge') }}
{% if is_incremental() %}
{% if is_incremental() and 'synapse_tb' not in var('HEAL_CURATED_MODEL') %}
WHERE
_inserted_timestamp >= (
SELECT
@ -321,7 +321,7 @@ synapse_tbs AS (
FROM
{{ ref('silver_bridge__synapse_tokenbridgeandswap') }}
{% if is_incremental() %}
{% if is_incremental() and 'synapse_tbs' not in var('HEAL_CURATED_MODEL') %}
WHERE
_inserted_timestamp >= (
SELECT
@ -357,7 +357,7 @@ wormhole AS (
FROM
{{ ref('silver_bridge__wormhole_transfers') }}
{% if is_incremental() %}
{% if is_incremental() and 'wormhole' not in var('HEAL_CURATED_MODEL') %}
WHERE
_inserted_timestamp >= (
SELECT