mirror of
https://github.com/FlipsideCrypto/external-models.git
synced 2026-02-06 10:46:48 +00:00
PR fixes
This commit is contained in:
parent
038f6506de
commit
c8df4f60e8
@ -79,4 +79,4 @@ vars:
|
||||
ROLES:
|
||||
- AWS_LAMBDA_EXTERNAL_API
|
||||
- INTERNAL_DEV
|
||||
- DBT_CLOUD_TON
|
||||
- DBT_CLOUD_EXTERNAL
|
||||
@ -61,7 +61,7 @@ SELECT
|
||||
_inserted_timestamp,
|
||||
{{ dbt_utils.generate_surrogate_key(
|
||||
['blockchain','metric','as_of_date']
|
||||
) }} AS accounts_id,
|
||||
) }} AS active_users_id,
|
||||
SYSDATE() AS inserted_timestamp,
|
||||
SYSDATE() AS modified_timestamp,
|
||||
'{{ invocation_id }}' AS _invocation_id
|
||||
|
||||
@ -1,6 +1,8 @@
|
||||
version: 2
|
||||
models:
|
||||
- name: bitquery__active_users
|
||||
description: >
|
||||
This model returns the number of active users for each blockchain and as of date. The distinct number of users is from the 30 days prior to the as of date.
|
||||
tests:
|
||||
- dbt_utils.unique_combination_of_columns:
|
||||
combination_of_columns:
|
||||
@ -10,24 +12,26 @@ models:
|
||||
|
||||
columns:
|
||||
- name: BLOCKCHAIN
|
||||
description: >
|
||||
The blockchain where the active users are from.
|
||||
tests:
|
||||
- not_null
|
||||
- name: METRIC
|
||||
description: >
|
||||
The metric name - always 'active_users'.
|
||||
tests:
|
||||
- not_null
|
||||
- name: AS_OF_DATE
|
||||
description: >
|
||||
The date when the active users are counted.
|
||||
tests:
|
||||
- not_null
|
||||
- dbt_expectations.expect_row_values_to_have_recent_data:
|
||||
datepart: day
|
||||
interval: 2
|
||||
- name: ACTIVE_USERS
|
||||
description: >
|
||||
The number of active users. The distinct number of users is from the 30 days prior to the as of date.
|
||||
tests:
|
||||
- not_null
|
||||
- name: _INSERTED_TIMESTAMP
|
||||
tests:
|
||||
- not_null
|
||||
- dbt_expectations.expect_column_values_to_be_in_type_list:
|
||||
column_type_list:
|
||||
- TIMESTAMP_NTZ
|
||||
|
||||
|
||||
@ -1,6 +1,8 @@
|
||||
version: 2
|
||||
models:
|
||||
- name: bitquery__tx_count
|
||||
description: >
|
||||
This model returns the number of transactions for each blockchain and block date.
|
||||
tests:
|
||||
- dbt_utils.unique_combination_of_columns:
|
||||
combination_of_columns:
|
||||
@ -10,24 +12,25 @@ models:
|
||||
|
||||
columns:
|
||||
- name: BLOCKCHAIN
|
||||
description: >
|
||||
The blockchain where the transactions are from.
|
||||
tests:
|
||||
- not_null
|
||||
- name: METRIC
|
||||
description: >
|
||||
The metric name - always 'tx_count'.
|
||||
tests:
|
||||
- not_null
|
||||
- name: BLOCK_DATE
|
||||
description: >
|
||||
The date when the transactions are counted.
|
||||
tests:
|
||||
- not_null
|
||||
- dbt_expectations.expect_row_values_to_have_recent_data:
|
||||
datepart: day
|
||||
interval: 2
|
||||
- name: TX_COUNT
|
||||
description: >
|
||||
The number of transactions for this date.
|
||||
tests:
|
||||
- not_null
|
||||
- name: _INSERTED_TIMESTAMP
|
||||
tests:
|
||||
- not_null
|
||||
- dbt_expectations.expect_column_values_to_be_in_type_list:
|
||||
column_type_list:
|
||||
- TIMESTAMP_NTZ
|
||||
|
||||
- not_null
|
||||
@ -24,7 +24,7 @@ WITH metrics AS (
|
||||
variables
|
||||
FROM
|
||||
{{ ref("streamline__bitquery_metrics") }} A
|
||||
LEFT JOIN {{ ref("streamline__bitquery_metrics") }}
|
||||
LEFT JOIN {{ ref("streamline__bitquery_complete") }}
|
||||
b USING (
|
||||
blockchain,
|
||||
metric,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user