add excl epoch payout flag

This commit is contained in:
forgash_ 2024-06-13 10:46:14 -06:00
parent 12bf4e2e86
commit 07d1ad8fce
6 changed files with 84 additions and 0 deletions

View File

@ -21,6 +21,17 @@ WITH collection_transactions AS (
block_height BETWEEN 27341470
AND 31735954
),
epoch_payments AS (
SELECT
block_number AS block_height,
id AS transaction_id
FROM
{{ ref ('streamline__complete_get_transactions_history') }} t
WHERE
(block_number BETWEEN 27341470 AND 31735954)
AND
data:script::string like '%import FlowEpoch%' and array_size(data:arguments::array) = 6
),
-- CTE to identify transactions that haven't been ingested yet
transactions_to_ingest AS (
SELECT
@ -31,8 +42,11 @@ transactions_to_ingest AS (
LEFT JOIN {{ ref("streamline__complete_get_transaction_results_history") }}
t
ON ct.transaction_id = t.id
LEFT JOIN epoch_payments ep
ON ct.transaction_id = ep.transaction_id
WHERE
t.id IS NULL
AND ep.transaction_id IS NULL
) -- Generate the requests based on the missing transactions
SELECT
OBJECT_CONSTRUCT(

View File

@ -20,6 +20,17 @@ WITH collection_transactions AS (
block_height BETWEEN 31735955
AND 35858810
),
epoch_payments AS (
SELECT
block_number AS block_height,
id AS transaction_id
FROM
{{ ref ('streamline__complete_get_transactions_history') }} t
WHERE
(block_number BETWEEN 31735955 AND 35858810)
AND
data:script::string like '%import FlowEpoch%' and array_size(data:arguments::array) = 6
),
-- CTE to identify transactions that haven't been ingested yet
transactions_to_ingest AS (
SELECT
@ -30,8 +41,11 @@ transactions_to_ingest AS (
LEFT JOIN {{ ref("streamline__complete_get_transaction_results_history") }}
t
ON ct.transaction_id = t.id
LEFT JOIN epoch_payments ep
ON ct.transaction_id = ep.transaction_id
WHERE
t.id IS NULL
AND ep.transaction_id IS NULL
) -- Generate the requests based on the missing transactions
SELECT
OBJECT_CONSTRUCT(

View File

@ -21,6 +21,17 @@ WITH collection_transactions AS (
block_height BETWEEN 35858811
AND 40171633
),
epoch_payments AS (
SELECT
block_number AS block_height,
id AS transaction_id
FROM
{{ ref ('streamline__complete_get_transactions_history') }} t
WHERE
(block_number BETWEEN 35858811 AND 40171633)
AND
data:script::string like '%import FlowEpoch%' and array_size(data:arguments::array) = 6
),
-- CTE to identify transactions that haven't been ingested yet
transactions_to_ingest AS (
SELECT
@ -31,8 +42,11 @@ transactions_to_ingest AS (
LEFT JOIN {{ ref("streamline__complete_get_transaction_results_history") }}
t
ON ct.transaction_id = t.id
LEFT JOIN epoch_payments ep
ON ct.transaction_id = ep.transaction_id
WHERE
t.id IS NULL
AND ep.transaction_id IS NULL
) -- Generate the requests based on the missing transactions
SELECT
OBJECT_CONSTRUCT(

View File

@ -21,6 +21,17 @@ WITH collection_transactions AS (
block_height BETWEEN 40171634
AND 44950206
),
epoch_payments AS (
SELECT
block_number AS block_height,
id AS transaction_id
FROM
{{ ref ('streamline__complete_get_transactions_history') }} t
WHERE
(block_number BETWEEN 40171634 AND 44950206)
AND
data:script::string like '%import FlowEpoch%' and array_size(data:arguments::array) = 6
),
-- CTE to identify transactions that haven't been ingested yet
transactions_to_ingest AS (
SELECT
@ -31,8 +42,11 @@ transactions_to_ingest AS (
LEFT JOIN {{ ref("streamline__complete_get_transaction_results_history") }}
t
ON ct.transaction_id = t.id
LEFT JOIN epoch_payments ep
ON ct.transaction_id = ep.transaction_id
WHERE
t.id IS NULL
AND ep.transaction_id IS NULL
) -- Generate the requests based on the missing transactions
SELECT
OBJECT_CONSTRUCT(

View File

@ -21,6 +21,17 @@ WITH collection_transactions AS (
block_height BETWEEN 44950207
AND 47169686
),
epoch_payments AS (
SELECT
block_number AS block_height,
id AS transaction_id
FROM
{{ ref ('streamline__complete_get_transactions_history') }} t
WHERE
(block_number BETWEEN 44950207 AND 47169686)
AND
data:script::string like '%import FlowEpoch%' and array_size(data:arguments::array) = 6
),
-- CTE to identify transactions that haven't been ingested yet
transactions_to_ingest AS (
SELECT
@ -31,8 +42,11 @@ transactions_to_ingest AS (
LEFT JOIN {{ ref("streamline__complete_get_transaction_results_history") }}
t
ON ct.transaction_id = t.id
LEFT JOIN epoch_payments ep
ON ct.transaction_id = ep.transaction_id
WHERE
t.id IS NULL
AND ep.transaction_id IS NULL
) -- Generate the requests based on the missing transactions
SELECT
OBJECT_CONSTRUCT(

View File

@ -21,6 +21,17 @@ WITH collection_transactions AS (
block_height BETWEEN 47169687
AND 55114466
),
epoch_payments AS (
SELECT
block_number AS block_height,
id AS transaction_id
FROM
{{ ref ('streamline__complete_get_transactions_history') }} t
WHERE
(block_number BETWEEN 47169687 AND 55114466)
AND
data:script::string like '%import FlowEpoch%' and array_size(data:arguments::array) = 6
),
-- CTE to identify transactions that haven't been ingested yet
transactions_to_ingest AS (
SELECT
@ -31,8 +42,11 @@ transactions_to_ingest AS (
LEFT JOIN {{ ref("streamline__complete_get_transaction_results_history") }}
t
ON ct.transaction_id = t.id
LEFT JOIN epoch_payments ep
ON ct.transaction_id = ep.transaction_id
WHERE
t.id IS NULL
AND ep.transaction_id IS NULL
) -- Generate the requests based on the missing transactions
SELECT
OBJECT_CONSTRUCT(