mirror of
https://github.com/FlipsideCrypto/flow-models.git
synced 2026-02-06 17:21:58 +00:00
AN-1707 renames, docs (#15)
* docs * tests, transaction inner inner update * small fixes
This commit is contained in:
parent
b3c9e2f8e0
commit
629a830485
@ -6,15 +6,15 @@
|
||||
|
||||
SELECT
|
||||
{{ dbt_utils.surrogate_key(
|
||||
['keytype']
|
||||
['account_data']
|
||||
) }} AS dim_wallet_type_id,
|
||||
keytype AS wallet_type,
|
||||
account_data AS wallet_type,
|
||||
MAX(_inserted_timestamp) _inserted_timestamp,
|
||||
'{{ env_var("DBT_CLOUD_RUN_ID", "manual") }}' AS _audit_run_id
|
||||
FROM
|
||||
{{ ref('silver__account') }}
|
||||
WHERE
|
||||
keytype IS NOT NULL
|
||||
account_data IS NOT NULL
|
||||
|
||||
{% if is_incremental() %}
|
||||
AND _inserted_timestamp >= (
|
||||
|
||||
@ -70,3 +70,20 @@ SELECT
|
||||
_inserted_timestamp
|
||||
FROM
|
||||
{{ ref('silver__swaps_wagmiswap_dex') }}
|
||||
UNION ALL
|
||||
SELECT
|
||||
'humbleswap' AS swap_program,
|
||||
block_id,
|
||||
intra,
|
||||
tx_group_id,
|
||||
app_id,
|
||||
swapper,
|
||||
swap_from_asset_id,
|
||||
swap_from_amount,
|
||||
pool_address,
|
||||
swap_to_asset_id,
|
||||
swap_to_amount,
|
||||
_unique_key,
|
||||
_inserted_timestamp
|
||||
FROM
|
||||
{{ ref('silver__swaps_humble_swap_dex') }}
|
||||
|
||||
@ -27,6 +27,8 @@ WITH appcall AS (
|
||||
A.tx_message :txn :apaa [1] :: STRING
|
||||
)
|
||||
) [0] = '03'
|
||||
AND amount > 0
|
||||
|
||||
|
||||
{% if is_incremental() %}
|
||||
AND A._INSERTED_TIMESTAMP >= (
|
||||
|
||||
@ -7,13 +7,6 @@ models:
|
||||
- block_id
|
||||
- intra
|
||||
columns:
|
||||
- name: BLOCK_TIMESTAMP
|
||||
tests:
|
||||
- not_null:
|
||||
where: _INSERTED_TIMESTAMP < (CURRENT_TIMESTAMP - INTERVAL '8 HOURS')
|
||||
- dbt_expectations.expect_row_values_to_have_recent_data:
|
||||
datepart: day
|
||||
interval: 1
|
||||
- name: BLOCK_ID
|
||||
tests:
|
||||
- not_null
|
||||
|
||||
Loading…
Reference in New Issue
Block a user