mirror of
https://github.com/FlipsideCrypto/flow-models.git
synced 2026-02-06 15:51:48 +00:00
add excl epoch payout flag
This commit is contained in:
parent
12bf4e2e86
commit
07d1ad8fce
@ -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(
|
||||
|
||||
@ -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(
|
||||
|
||||
@ -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(
|
||||
|
||||
@ -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(
|
||||
|
||||
@ -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(
|
||||
|
||||
@ -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(
|
||||
|
||||
Loading…
Reference in New Issue
Block a user