mirror of
https://github.com/FlipsideCrypto/solana-models.git
synced 2026-02-06 14:26:55 +00:00
Fix table not found error for streamline block txs (#709)
* materialize the test output as a dbt modeled table * reference the model instead of test output table
This commit is contained in:
parent
46ed9e75bf
commit
9d6cd7ec59
8
.github/workflows/dbt_test_hourly.yml
vendored
8
.github/workflows/dbt_test_hourly.yml
vendored
@ -40,6 +40,12 @@ jobs:
|
||||
run: |
|
||||
pip install -r requirements.txt
|
||||
dbt deps
|
||||
|
||||
# Run the streamline__transactions_and_votes_missing_7_days model to update after the tests
|
||||
# This is necessary as the table is referenced in streamline views but DBT drops test output tables when they run
|
||||
# so at time this will cause the streamline views to fail because the table it is trying to reference has been dropped.
|
||||
# This should prevent that from happening by always referencing the model instead of the test output
|
||||
- name: Run DBT Jobs
|
||||
run: |
|
||||
dbt test -s "solana_models,tag:test_hourly"
|
||||
dbt test -s "solana_models,tag:test_hourly"
|
||||
dbt run -s streamline__transactions_and_votes_missing_7_days
|
||||
@ -0,0 +1,10 @@
|
||||
{{
|
||||
config(
|
||||
materialized = 'table',
|
||||
)
|
||||
}}
|
||||
|
||||
SELECT
|
||||
*
|
||||
FROM
|
||||
{{ source('solana_test_silver','transactions_and_votes_missing_7_days') }}
|
||||
@ -88,12 +88,9 @@ solscan_discrepancy_retries AS (
|
||||
SELECT
|
||||
m.block_id
|
||||
FROM
|
||||
{{ source(
|
||||
'solana_test_silver',
|
||||
'transactions_and_votes_missing_7_days'
|
||||
) }}
|
||||
m
|
||||
LEFT JOIN {{ ref('streamline__complete_block_txs') }} C
|
||||
{{ ref('streamline__transactions_and_votes_missing_7_days') }} m
|
||||
LEFT JOIN
|
||||
{{ ref('streamline__complete_block_txs') }} C
|
||||
ON C.block_id = m.block_id
|
||||
WHERE
|
||||
C._partition_id <= m._partition_id
|
||||
|
||||
Loading…
Reference in New Issue
Block a user