mirror of
https://github.com/FlipsideCrypto/external-models.git
synced 2026-02-06 09:41:49 +00:00
fix artemis load (#119)
This commit is contained in:
parent
db3203fd45
commit
985e98535a
@ -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:
|
||||
|
||||
@ -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:
|
||||
|
||||
@ -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,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user