mirror of
https://github.com/FlipsideCrypto/thorchain-models.git
synced 2026-02-06 11:41:50 +00:00
fix and update issues causing alerts
This commit is contained in:
parent
9ab6eadaaf
commit
a6fce458b9
@ -8,7 +8,7 @@
|
|||||||
WITH block_prices AS (
|
WITH block_prices AS (
|
||||||
|
|
||||||
SELECT
|
SELECT
|
||||||
AVG(rune_usd) AS rune_usd,
|
COALESCE(AVG(rune_usd), 0) AS rune_usd,
|
||||||
block_id
|
block_id
|
||||||
FROM
|
FROM
|
||||||
{{ ref('silver__prices') }}
|
{{ ref('silver__prices') }}
|
||||||
@ -21,7 +21,7 @@ fin AS (
|
|||||||
b.height AS block_id,
|
b.height AS block_id,
|
||||||
ree.pool_name AS reward_entity,
|
ree.pool_name AS reward_entity,
|
||||||
COALESCE(rune_e8 / pow(10, 8), 0) AS rune_amount,
|
COALESCE(rune_e8 / pow(10, 8), 0) AS rune_amount,
|
||||||
COALESCE(rune_e8 / pow(10, 8) * rune_usd, 0) AS rune_amount_usd,
|
COALESCE(rune_e8 / pow(10, 8) * COALESCE(rune_usd, 0), 0) AS rune_amount_usd,
|
||||||
concat_ws(
|
concat_ws(
|
||||||
'-',
|
'-',
|
||||||
b.height,
|
b.height,
|
||||||
@ -76,7 +76,7 @@ SELECT
|
|||||||
bond_e8 / pow(
|
bond_e8 / pow(
|
||||||
10,
|
10,
|
||||||
8
|
8
|
||||||
) * rune_usd AS rune_amount_usd,
|
) * COALESCE(rune_usd, 0) AS rune_amount_usd,
|
||||||
concat_ws(
|
concat_ws(
|
||||||
'-',
|
'-',
|
||||||
b.height,
|
b.height,
|
||||||
|
|||||||
@ -20,8 +20,6 @@ models:
|
|||||||
- not_null
|
- not_null
|
||||||
- name: SENDER
|
- name: SENDER
|
||||||
- name: ATTRIBUTES
|
- name: ATTRIBUTES
|
||||||
tests:
|
|
||||||
- not_null
|
|
||||||
- name: EVENT_ID
|
- name: EVENT_ID
|
||||||
tests:
|
tests:
|
||||||
- not_null
|
- not_null
|
||||||
|
|||||||
@ -1 +1,5 @@
|
|||||||
|
{{ config(
|
||||||
|
warn_if = "> 10",
|
||||||
|
severity = "warn"
|
||||||
|
) }}
|
||||||
{{ sequence_distinct_gaps_dim_block_id(ref("price__fact_prices"), "block_id") }}
|
{{ sequence_distinct_gaps_dim_block_id(ref("price__fact_prices"), "block_id") }}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user