From 5bbb3de850e537b3a57f47967109e30446ea68ce Mon Sep 17 00:00:00 2001 From: stanz Date: Fri, 5 Dec 2025 01:18:01 +0700 Subject: [PATCH] upd yml --- models/gold/core/core__ez_balances.yml | 20 ++++++++ models/gold/core/core__fact_balances.yml | 22 ++++++++ .../silver/core/balances/silver__balances.yml | 51 ++++++++----------- 3 files changed, 64 insertions(+), 29 deletions(-) diff --git a/models/gold/core/core__ez_balances.yml b/models/gold/core/core__ez_balances.yml index 396b74c..3a66805 100644 --- a/models/gold/core/core__ez_balances.yml +++ b/models/gold/core/core__ez_balances.yml @@ -4,14 +4,26 @@ models: columns: - name: BLOCK_DATE + tests: + - not_null: + where: block_date > current_date - 3 - name: ADDRESS description: '{{ doc("address") }}' + tests: + - not_null: + where: block_date > current_date - 3 - name: TOKEN_ADDRESS description: '{{ doc("token_address") }}' + tests: + - not_null: + where: block_date > current_date - 3 - name: BALANCE_UNADJ + tests: + - not_null: + where: block_date > current_date - 3 - name: BALANCE @@ -27,14 +39,22 @@ models: description: '{{ doc("decimals") }}' - name: TOKEN_IS_VERIFIED + tests: + - not_null: + where: block_date > current_date - 3 - name: FROZEN + tests: + - not_null: + where: block_date > current_date - 3 - name: EZ_BALANCES_ID description: '{{ doc("pk") }}' tests: - unique: where: block_date > current_date - 3 + - not_null: + where: block_date > current_date - 3 - name: INSERTED_TIMESTAMP description: '{{ doc("inserted_timestamp") }}' diff --git a/models/gold/core/core__fact_balances.yml b/models/gold/core/core__fact_balances.yml index 3a24a8f..cc3d3a5 100644 --- a/models/gold/core/core__fact_balances.yml +++ b/models/gold/core/core__fact_balances.yml @@ -4,14 +4,26 @@ models: columns: - name: BLOCK_DATE + tests: + - not_null: + where: block_date > current_date - 3 - name: ADDRESS description: '{{ doc("address") }}' + tests: + - not_null: + where: block_date > current_date - 3 - name: TOKEN_ADDRESS description: '{{ doc("token_address") }}' + tests: + - not_null: + where: block_date > current_date - 3 - name: BALANCE_UNADJ + tests: + - not_null: + where: block_date > current_date - 3 - name: BALANCE @@ -24,13 +36,23 @@ models: - name: DECIMALS description: '{{ doc("decimals") }}' + - name: TOKEN_IS_VERIFIED + tests: + - not_null: + where: block_date > current_date - 3 + - name: FROZEN + tests: + - not_null: + where: block_date > current_date - 3 - name: FACT_BALANCES_ID description: '{{ doc("pk") }}' tests: - unique: where: block_date > current_date - 3 + - not_null: + where: block_date > current_date - 3 - name: INSERTED_TIMESTAMP description: '{{ doc("inserted_timestamp") }}' diff --git a/models/silver/core/balances/silver__balances.yml b/models/silver/core/balances/silver__balances.yml index 54927ac..3d8b7cb 100644 --- a/models/silver/core/balances/silver__balances.yml +++ b/models/silver/core/balances/silver__balances.yml @@ -11,47 +11,40 @@ models: columns: - name: BLOCK_DATE - tests: - - not_null + - name: ADDRESS - tests: - - not_null + description: '{{ doc("address") }}' + - name: TOKEN_ADDRESS - tests: - - not_null - - name: SYMBOL - tests: - - not_null - - name: DECIMALS - tests: - - not_null - - name: NAME + description: '{{ doc("token_address") }}' + - name: POST_BALANCE - tests: - - not_null - - name: BALANCE - tests: - - not_null + - name: FROZEN description: | Account freeze status (FungibleAsset-specific field). - TRUE: Account/store is frozen (cannot transfer) - FALSE: Account is active - For Coin standard balances: Always FALSE (Coin doesn't support freezing) + + - name: IS_VERIFIED + description: | + Whether the token has verified price data. + - TRUE: Token exists in price__ez_prices_hourly with is_verified = TRUE + - FALSE: Token has no verified price data + - name: BALANCES_ID + description: '{{ doc("pk") }}' tests: - - not_null + - unique: + where: block_date > current_date - 3 + - name: INSERTED_TIMESTAMP - tests: - - not_null + description: '{{ doc("inserted_timestamp") }}' + - name: MODIFIED_TIMESTAMP - tests: - - not_null + description: '{{ doc("modified_timestamp") }}' + - name: _INSERTED_TIMESTAMP - tests: - - name: not_null_silver__balances_INSERTED_TIMESTAMP_ - test_name: not_null + - name: _INVOCATION_ID - tests: - - name: not_null_silver__balances_INVOCATION_ID - test_name: not_null