Skip to content

Commit

Permalink
Use asset type enum string for trustline tables (#64)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
amishas157 authored Jul 22, 2024
1 parent ff56fbc commit f3bf424
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
7 changes: 3 additions & 4 deletions models/marts/ledger_current_state/trust_lines_current.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,15 +39,15 @@ 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
description: '{{ doc("asset_issuer") }}'
tests:
- not_null:
config:
where: asset_type != 3
where: asset_type != 'pool_share'
and closed_at > current_timestamp - interval 2 day

- name: asset_type
Expand All @@ -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") }}'
Expand Down
8 changes: 4 additions & 4 deletions models/sources/src_trust_lines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,23 +47,23 @@ 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
description: '{{ doc("asset_code") }}'
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
Expand Down

0 comments on commit f3bf424

Please sign in to comment.