mirror of
https://github.com/FlipsideCrypto/maya-models.git
synced 2026-02-06 11:47:05 +00:00
33 lines
1.2 KiB
YAML
33 lines
1.2 KiB
YAML
version: 2
|
|
models:
|
|
- name: defi__fact_rewards_events
|
|
description: "Fact table that shows the entries for the rewards"
|
|
columns:
|
|
- name: FACT_REWARDS_EVENTS_ID
|
|
description: "{{ doc('sk') }}"
|
|
tests:
|
|
- dbt_expectations.expect_column_to_exist
|
|
- unique
|
|
- name: BLOCK_TIMESTAMP
|
|
description: "{{ doc('block_timestamp') }}"
|
|
tests:
|
|
- not_null:
|
|
where: DIM_BLOCK_ID not in ('-1','-2')
|
|
- name: DIM_BLOCK_ID
|
|
description: "FK to DIM_BLOCK table"
|
|
tests:
|
|
- negative_one:
|
|
where: _inserted_timestamp < (CURRENT_TIMESTAMP - INTERVAL '8 HOURS')
|
|
- name: BOND_E8
|
|
description: "The cacao amount of the bond for this pool at this block"
|
|
- name: INSERTED_TIMESTAMP
|
|
description: '{{ doc("inserted_timestamp") }}'
|
|
- name: MODIFIED_TIMESTAMP
|
|
description: '{{ doc("modified_timestamp") }}'
|
|
tests:
|
|
- dbt_constraints.primary_key:
|
|
column_name: FACT_REWARDS_EVENTS_ID
|
|
- dbt_constraints.foreign_key:
|
|
fk_column_name: DIM_BLOCK_ID
|
|
pk_table_name: ref('core__dim_block')
|
|
pk_column_name: DIM_BLOCK_ID |