diff --git a/models/artemis/gold/artemis__active_users.yml b/models/artemis/gold/artemis__active_users.yml index 0697093..f45f529 100644 --- a/models/artemis/gold/artemis__active_users.yml +++ b/models/artemis/gold/artemis__active_users.yml @@ -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: diff --git a/models/artemis/gold/artemis__tx_count.yml b/models/artemis/gold/artemis__tx_count.yml index 56cc677..7cce9c3 100644 --- a/models/artemis/gold/artemis__tx_count.yml +++ b/models/artemis/gold/artemis__tx_count.yml @@ -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: diff --git a/models/artemis/silver/silver__artemis.sql b/models/artemis/silver/silver__artemis.sql index 67be6d5..e995fe0 100644 --- a/models/artemis/silver/silver__artemis.sql +++ b/models/artemis/silver/silver__artemis.sql @@ -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,