AN-1707 renames, docs (#15)

* docs

* tests, transaction inner inner update

* small fixes
This commit is contained in:
eric-laurello 2022-08-29 12:53:37 -04:00 committed by GitHub
parent b3c9e2f8e0
commit 629a830485
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 22 additions and 10 deletions

View File

@ -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 >= (

View File

@ -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') }}

View File

@ -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 >= (

View File

@ -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