fix artemis load (#119)

This commit is contained in:
eric-laurello 2025-05-16 00:51:52 -04:00 committed by GitHub
parent db3203fd45
commit 985e98535a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 10 additions and 4 deletions

View File

@ -19,7 +19,7 @@ models:
- not_null
- dbt_expectations.expect_row_values_to_have_recent_data:
datepart: day
interval: 5
interval: 3
- name: ACTIVE_USERS
description: "The number of active users for the given blockchain and as of date."
tests:

View File

@ -19,7 +19,7 @@ models:
- not_null
- dbt_expectations.expect_row_values_to_have_recent_data:
datepart: day
interval: 5
interval: 3
- name: TX_COUNT
description: "The number of tx count for the given blockchain and as of date."
tests:

View File

@ -43,7 +43,10 @@ parsed_data AS (
FROM
source_data s,
LATERAL FLATTEN(
input => raw_data :data :artemis_ids
input => COALESCE(
raw_data :data :artemis_ids,
raw_data :data :symbols
)
) AS blockchain_flat,
LATERAL FLATTEN(
input => blockchain_flat.value
@ -52,7 +55,10 @@ parsed_data AS (
input => metric_flat.value
) AS metrics
WHERE
raw_data :data :artemis_ids IS NOT NULL
COALESCE(
raw_data :data :artemis_ids,
raw_data :data :symbols
) IS NOT NULL
)
SELECT
TO_DATE(metric_date) AS metric_date,