mirror of
https://github.com/FlipsideCrypto/movement-models.git
synced 2026-02-06 13:51:46 +00:00
forgot to fix incremental jinja
This commit is contained in:
parent
462c4a0d8f
commit
94382d96c6
@ -19,3 +19,15 @@ SELECT
|
||||
complete_provider_asset_metadata_id AS dim_asset_metadata_id
|
||||
FROM
|
||||
{{ ref('silver__complete_provider_asset_metadata') }}
|
||||
|
||||
{% if is_incremental() %}
|
||||
WHERE
|
||||
modified_timestamp >= (
|
||||
SELECT
|
||||
MAX(
|
||||
modified_timestamp
|
||||
)
|
||||
FROM
|
||||
{{ this }}
|
||||
)
|
||||
{% endif %}
|
||||
@ -21,6 +21,18 @@ SELECT
|
||||
complete_token_asset_metadata_id AS ez_asset_metadata_id
|
||||
FROM
|
||||
{{ ref('silver__complete_token_asset_metadata') }}
|
||||
{% if is_incremental() %}
|
||||
WHERE
|
||||
modified_timestamp >= (
|
||||
SELECT
|
||||
MAX(
|
||||
modified_timestamp
|
||||
)
|
||||
FROM
|
||||
{{ this }}
|
||||
)
|
||||
{% endif %}
|
||||
|
||||
UNION ALL
|
||||
SELECT
|
||||
NULL AS token_address,
|
||||
@ -36,3 +48,14 @@ SELECT
|
||||
complete_native_asset_metadata_id AS ez_asset_metadata_id
|
||||
FROM
|
||||
{{ ref('silver__complete_native_asset_metadata') }}
|
||||
{% if is_incremental() %}
|
||||
WHERE
|
||||
modified_timestamp >= (
|
||||
SELECT
|
||||
MAX(
|
||||
modified_timestamp
|
||||
)
|
||||
FROM
|
||||
{{ this }}
|
||||
)
|
||||
{% endif %}
|
||||
|
||||
@ -23,6 +23,17 @@ SELECT
|
||||
complete_token_prices_id AS ez_prices_hourly_id
|
||||
FROM
|
||||
{{ ref('silver__complete_token_prices') }}
|
||||
{% if is_incremental() %}
|
||||
WHERE
|
||||
modified_timestamp >= (
|
||||
SELECT
|
||||
MAX(
|
||||
modified_timestamp
|
||||
)
|
||||
FROM
|
||||
{{ this }}
|
||||
)
|
||||
{% endif %}
|
||||
UNION ALL
|
||||
SELECT
|
||||
HOUR,
|
||||
@ -40,3 +51,14 @@ SELECT
|
||||
complete_native_prices_id AS ez_prices_hourly_id
|
||||
FROM
|
||||
{{ ref('silver__complete_native_prices') }}
|
||||
{% if is_incremental() %}
|
||||
WHERE
|
||||
modified_timestamp >= (
|
||||
SELECT
|
||||
MAX(
|
||||
modified_timestamp
|
||||
)
|
||||
FROM
|
||||
{{ this }}
|
||||
)
|
||||
{% endif %}
|
||||
@ -20,3 +20,14 @@ SELECT
|
||||
complete_provider_prices_id AS fact_prices_ohlc_hourly_id
|
||||
FROM
|
||||
{{ ref('silver__complete_provider_prices') }}
|
||||
{% if is_incremental() %}
|
||||
WHERE
|
||||
modified_timestamp >= (
|
||||
SELECT
|
||||
MAX(
|
||||
modified_timestamp
|
||||
)
|
||||
FROM
|
||||
{{ this }}
|
||||
)
|
||||
{% endif %}
|
||||
@ -21,16 +21,4 @@ SELECT
|
||||
FROM
|
||||
{{ ref(
|
||||
'bronze__complete_native_asset_metadata'
|
||||
) }}
|
||||
|
||||
{% if is_incremental() %}
|
||||
WHERE
|
||||
modified_timestamp >= (
|
||||
SELECT
|
||||
MAX(
|
||||
modified_timestamp
|
||||
)
|
||||
FROM
|
||||
{{ this }}
|
||||
)
|
||||
{% endif %}
|
||||
) }}
|
||||
@ -25,15 +25,3 @@ FROM
|
||||
{{ ref(
|
||||
'bronze__complete_native_prices'
|
||||
) }}
|
||||
|
||||
{% if is_incremental() %}
|
||||
WHERE
|
||||
modified_timestamp >= (
|
||||
SELECT
|
||||
MAX(
|
||||
modified_timestamp
|
||||
)
|
||||
FROM
|
||||
{{ this }}
|
||||
)
|
||||
{% endif %}
|
||||
|
||||
@ -22,15 +22,3 @@ FROM
|
||||
{{ ref(
|
||||
'bronze__complete_provider_asset_metadata'
|
||||
) }}
|
||||
|
||||
{% if is_incremental() %}
|
||||
WHERE
|
||||
modified_timestamp >= (
|
||||
SELECT
|
||||
MAX(
|
||||
modified_timestamp
|
||||
)
|
||||
FROM
|
||||
{{ this }}
|
||||
)
|
||||
{% endif %}
|
||||
|
||||
@ -27,18 +27,6 @@ FROM
|
||||
m
|
||||
ON p.asset_id = m.asset_id
|
||||
|
||||
{% if is_incremental() %}
|
||||
WHERE
|
||||
p.modified_timestamp >= (
|
||||
SELECT
|
||||
MAX(
|
||||
modified_timestamp
|
||||
)
|
||||
FROM
|
||||
{{ this }}
|
||||
)
|
||||
{% endif %}
|
||||
|
||||
qualify(ROW_NUMBER() over (PARTITION BY p.asset_id, recorded_hour, p.provider
|
||||
ORDER BY
|
||||
p.modified_timestamp DESC)) = 1
|
||||
|
||||
@ -27,15 +27,3 @@ FROM
|
||||
{{ ref(
|
||||
'bronze__complete_token_asset_metadata'
|
||||
) }} A
|
||||
|
||||
{% if is_incremental() %}
|
||||
WHERE
|
||||
modified_timestamp >= (
|
||||
SELECT
|
||||
MAX(
|
||||
modified_timestamp
|
||||
)
|
||||
FROM
|
||||
{{ this }}
|
||||
)
|
||||
{% endif %}
|
||||
|
||||
@ -7,7 +7,7 @@
|
||||
SELECT
|
||||
HOUR,
|
||||
LOWER(
|
||||
p.token_address
|
||||
token_address
|
||||
) AS token_address,
|
||||
asset_id,
|
||||
symbol,
|
||||
@ -30,16 +30,3 @@ FROM
|
||||
{{ ref(
|
||||
'bronze__complete_token_prices'
|
||||
) }}
|
||||
p
|
||||
|
||||
{% if is_incremental() %}
|
||||
WHERE
|
||||
modified_timestamp >= (
|
||||
SELECT
|
||||
MAX(
|
||||
modified_timestamp
|
||||
)
|
||||
FROM
|
||||
{{ this }}
|
||||
)
|
||||
{% endif %}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user