tweak model names and macro defs

This commit is contained in:
Mike Stepanovic 2025-05-07 14:30:38 -06:00
parent 3c8ac0c51b
commit 9a05fd8c71
7 changed files with 13 additions and 13 deletions

View File

@ -1,9 +1,9 @@
{% macro create_udfs() %}
{% if var("UPDATE_UDFS_AND_SPS") %}
{% if var("UPDATE_UDFS_AND_SPS", false) %}
{% set sql %}
CREATE schema if NOT EXISTS silver;
{{ create_udf_bulk_rest_api_v2() }}
{% endset %}
{% do run_query(sql) %}
{{- fsc_utils.create_udfs() -}}
{% endif %}
{% endmacro %}

View File

@ -1,7 +1,7 @@
{# Get variables #}
{% set vars = return_vars() %}
-- depends_on: {{ ref('bronze__streamline_blocks') }}
-- depends_on: {{ ref('bronze__blocks') }}
{{ config (
materialized = "incremental",
incremental_strategy = 'merge',
@ -23,7 +23,7 @@ SELECT
FROM
{% if is_incremental() %}
{{ ref('bronze__streamline_blocks') }}
{{ ref('bronze__blocks') }}
WHERE
inserted_timestamp >= (
SELECT
@ -32,7 +32,7 @@ WHERE
{{ this }}
)
{% else %}
{{ ref('bronze__streamline_blocks_fr') }}
{{ ref('bronze__blocks_fr') }}
{% endif %}
qualify(ROW_NUMBER() over (PARTITION BY block_id

View File

@ -1,7 +1,7 @@
{# Get variables #}
{% set vars = return_vars() %}
-- depends_on: {{ ref('bronze__streamline_transactions') }}
-- depends_on: {{ ref('bronze__transactions') }}
{{ config (
materialized = "incremental",
@ -32,9 +32,9 @@ SELECT
FROM
{% if is_incremental() %}
{{ ref('bronze__streamline_transactions') }}
{{ ref('bronze__transactions') }}
{% else %}
{{ ref('bronze__streamline_transactions_fr') }}
{{ ref('bronze__transactions_fr') }}
{% endif %}
WHERE
DATA <> '[]'

View File

@ -1,7 +1,7 @@
{# Get variables #}
{% set vars = return_vars() %}
-- depends_on: {{ ref('bronze__streamline_tx_counts') }}
-- depends_on: {{ ref('bronze__tx_counts') }}
{{ config (
materialized = "incremental",
@ -25,7 +25,7 @@ SELECT
FROM
{% if is_incremental() %}
{{ ref('bronze__streamline_tx_counts') }}
{{ ref('bronze__tx_counts') }}
WHERE
inserted_timestamp >= (
SELECT
@ -35,7 +35,7 @@ WHERE
)
AND block_id NOT IN (21208991)
{% else %}
{{ ref('bronze__streamline_tx_counts_fr') }}
{{ ref('bronze__tx_counts_fr') }}
{% endif %}
qualify(ROW_NUMBER() over (PARTITION BY block_id

View File

@ -1,7 +1,7 @@
{# Get variables #}
{% set vars = return_vars() %}
-- depends_on: {{ ref('streamline__complete_tx_counts') }}
-- depends_on: {{ ref('streamline__tx_counts_complete') }}
{{ config (
materialized = 'view',

View File

@ -18,5 +18,5 @@ WHERE
0
)
FROM
{{ ref('streamline_chainhead') }}
{{ ref('streamline__chainhead') }}
)