From f3bf42496909f217003d83b25da5f1be15f0e49e Mon Sep 17 00:00:00 2001 From: Amisha Singla Date: Mon, 22 Jul 2024 12:05:06 -0500 Subject: [PATCH] Use asset type enum string for trustline tables (#64) * Use asset type enum string for trustline tables * Fix the values for asset type * Revert accepted values change for ledger_entry_change * Add accepted values for asset type * quote unquote * update accepted values of asset type * lint lint again --- models/marts/ledger_current_state/trust_lines_current.yml | 7 +++---- models/sources/src_trust_lines.yml | 8 ++++---- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/models/marts/ledger_current_state/trust_lines_current.yml b/models/marts/ledger_current_state/trust_lines_current.yml index 047eb43..b70f227 100644 --- a/models/marts/ledger_current_state/trust_lines_current.yml +++ b/models/marts/ledger_current_state/trust_lines_current.yml @@ -39,7 +39,7 @@ models: tests: - not_null: config: - where: asset_type != 3 + where: asset_type != 'pool_share' and closed_at > current_timestamp - interval 2 day - name: asset_issuer @@ -47,7 +47,7 @@ models: tests: - not_null: config: - where: asset_type != 3 + where: asset_type != 'pool_share' and closed_at > current_timestamp - interval 2 day - name: asset_type @@ -57,8 +57,7 @@ models: config: where: closed_at > current_timestamp - interval 2 day - accepted_values: - values: [1, 2, 3] - quote: false + values: ["credit_alphanum4", "credit_alphanum12", "pool_share"] - name: liquidity_pool_id description: '{{ doc("liquidity_pool_id") }}' diff --git a/models/sources/src_trust_lines.yml b/models/sources/src_trust_lines.yml index 96bb480..8e51a46 100644 --- a/models/sources/src_trust_lines.yml +++ b/models/sources/src_trust_lines.yml @@ -47,15 +47,15 @@ sources: config: where: batch_run_date > current_datetime - interval 2 day - accepted_values: - values: [1, 2, 3] - quote: false + values: + ["credit_alphanum4", "credit_alphanum12", "pool_share"] - name: asset_issuer description: '{{ doc("asset_issuer") }}' tests: - not_null: config: - where: asset_type != 3 + where: asset_type != 'pool_share' and batch_run_date > current_datetime - interval 2 day - name: asset_code @@ -63,7 +63,7 @@ sources: tests: - not_null: config: - where: asset_type != 3 + where: asset_type != 'pool_share' and batch_run_date > current_datetime - interval 2 day - name: liquidity_pool_id