mirror of
https://github.com/FlipsideCrypto/flow-models.git
synced 2026-02-06 09:37:27 +00:00
Some checks failed
docs_update / run_dbt_jobs (push) Has been cancelled
docs_update / notify-failure (push) Has been cancelled
dbt_run_streamline_decoded_logs_history / run_dbt_jobs (push) Has been cancelled
dbt_run_streamline_decoded_logs_history / notify-failure (push) Has been cancelled
* rm topshot * upd yml * deploy udf * upd blocks_realtime * sl func * bronze upd * v1 namespace * bronze v2 * prod endpoint * define api integrations for v2 --------- Co-authored-by: Jack Forgash <58153492+forgxyz@users.noreply.github.com>
111 lines
3.3 KiB
YAML
111 lines
3.3 KiB
YAML
version: 2
|
|
|
|
models:
|
|
- name: silver__increment_swaps
|
|
description: |-
|
|
This table records asset swaps on the Flow blockchain parsed from Swap events emitted by Increment SwapPair contracts (via the SwapFactory contract).
|
|
tests:
|
|
- dbt_utils.unique_combination_of_columns:
|
|
combination_of_columns:
|
|
- tx_id
|
|
- swap_index
|
|
|
|
columns:
|
|
- name: block_height
|
|
description: "{{ doc('block_height') }}"
|
|
tests:
|
|
- not_null
|
|
- dbt_expectations.expect_column_values_to_be_in_type_list:
|
|
column_type_list:
|
|
- NUMBER
|
|
- FLOAT
|
|
|
|
- name: block_timestamp
|
|
description: "{{ doc('block_timestamp') }}"
|
|
tests:
|
|
- not_null
|
|
- dbt_expectations.expect_row_values_to_have_recent_data:
|
|
datepart: day
|
|
interval: 1
|
|
- dbt_expectations.expect_column_values_to_be_in_type_list:
|
|
column_type_list:
|
|
- TIMESTAMP_NTZ
|
|
|
|
- name: tx_id
|
|
description: "{{ doc('tx_id') }}"
|
|
tests:
|
|
- not_null
|
|
|
|
- name: swap_index
|
|
description: "{{ doc('swap_index') }}"
|
|
|
|
- name: swap_contract
|
|
description: "{{ doc('swap_contract') }}"
|
|
tests:
|
|
- not_null
|
|
- dbt_expectations.expect_column_values_to_be_in_type_list:
|
|
column_type_list:
|
|
- STRING
|
|
- VARCHAR
|
|
|
|
- name: platform
|
|
description: "The platform or protocol for the swap. (Always NULL for Increment pairs)"
|
|
|
|
- name: trader
|
|
description: "{{ doc('trader') }}"
|
|
tests:
|
|
- dbt_expectations.expect_column_values_to_be_in_type_list:
|
|
column_type_list:
|
|
- STRING
|
|
- VARCHAR
|
|
|
|
- name: token_in_amount
|
|
description: "{{ doc('token_in_amount') }}"
|
|
tests:
|
|
- dbt_expectations.expect_column_values_to_be_in_type_list:
|
|
column_type_list:
|
|
- NUMBER
|
|
- FLOAT
|
|
|
|
- name: token_in_contract
|
|
description: "{{ doc('token_in_contract') }}"
|
|
tests:
|
|
- dbt_expectations.expect_column_values_to_be_in_type_list:
|
|
column_type_list:
|
|
- STRING
|
|
- VARCHAR
|
|
|
|
- name: token_out_amount
|
|
description: "{{ doc('token_out_amount') }}"
|
|
tests:
|
|
- dbt_expectations.expect_column_values_to_be_in_type_list:
|
|
column_type_list:
|
|
- NUMBER
|
|
- FLOAT
|
|
|
|
- name: token_out_contract
|
|
description: "{{ doc('token_out_contract') }}"
|
|
tests:
|
|
- dbt_expectations.expect_column_values_to_be_in_type_list:
|
|
column_type_list:
|
|
- STRING
|
|
- VARCHAR
|
|
|
|
- name: increment_swaps_id
|
|
description: "A surrogate key for the row, generated from tx_id and event_index."
|
|
tests:
|
|
- not_null
|
|
- unique
|
|
|
|
- name: inserted_timestamp
|
|
description: "The timestamp when the row was inserted."
|
|
tests:
|
|
- not_null
|
|
|
|
- name: modified_timestamp
|
|
description: "The timestamp when the row was last modified."
|
|
tests:
|
|
- not_null
|
|
|
|
- name: _invocation_id
|
|
description: "The dbt invocation ID for the run that produced this row." |