forked from duneanalytics/spellbook
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
1inch-U28: optimize main lineage — pre-materialize traces for looped …
…queries (duneanalytics#6234) * push * push * Delete oneinch_project_orders_macro.sql * push * apply easy dates for CI * changes * retrigger ci * Revert "apply easy dates for CI" This reverts commit 5b6db9c. * push * BREAK CI * bring back old versions * Revert "BREAK CI" This reverts commit d0624ee. * try block_time join * Revert "try block_time join" This reverts commit f92ce3f. * all tables * easy dates * ts * Revert "easy dates" This reverts commit 3067d31. * block_date key + join * Reapply "easy dates" This reverts commit 222d858. * Revert "Reapply "easy dates"" This reverts commit fe5fe2f.
- Loading branch information
Showing
24 changed files
with
922 additions
and
0 deletions.
There are no files selected for viewing
24 changes: 24 additions & 0 deletions
24
dex/models/_projects/oneinch/arbitrum/oneinch_arbitrum_ar_raw_traces.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
{% set blockchain = 'arbitrum' %} | ||
|
||
|
||
|
||
{{ | ||
config( | ||
schema = 'oneinch_' + blockchain, | ||
alias = 'ar_raw_traces', | ||
partition_by = ['block_date'], | ||
materialized = 'incremental', | ||
file_format = 'delta', | ||
incremental_strategy = 'merge', | ||
incremental_predicates = [incremental_predicate('DBT_INTERNAL_DEST.block_time')], | ||
unique_key = ['tx_hash', 'trace_address', 'block_date'] | ||
) | ||
}} | ||
|
||
|
||
|
||
{{ | ||
oneinch_ar_raw_traces_macro( | ||
blockchain = blockchain | ||
) | ||
}} |
24 changes: 24 additions & 0 deletions
24
dex/models/_projects/oneinch/arbitrum/oneinch_arbitrum_lop_raw_traces.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
{% set blockchain = 'arbitrum' %} | ||
|
||
|
||
|
||
{{ | ||
config( | ||
schema = 'oneinch_' + blockchain, | ||
alias = 'lop_raw_traces', | ||
partition_by = ['block_date'], | ||
materialized = 'incremental', | ||
file_format = 'delta', | ||
incremental_strategy = 'merge', | ||
incremental_predicates = [incremental_predicate('DBT_INTERNAL_DEST.block_time')], | ||
unique_key = ['tx_hash', 'trace_address', 'block_date'] | ||
) | ||
}} | ||
|
||
|
||
|
||
{{ | ||
oneinch_lop_raw_traces_macro( | ||
blockchain = blockchain | ||
) | ||
}} |
24 changes: 24 additions & 0 deletions
24
dex/models/_projects/oneinch/avalanche_c/oneinch_avalanche_c_ar_raw_traces.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
{% set blockchain = 'avalanche_c' %} | ||
|
||
|
||
|
||
{{ | ||
config( | ||
schema = 'oneinch_' + blockchain, | ||
alias = 'ar_raw_traces', | ||
partition_by = ['block_date'], | ||
materialized = 'incremental', | ||
file_format = 'delta', | ||
incremental_strategy = 'merge', | ||
incremental_predicates = [incremental_predicate('DBT_INTERNAL_DEST.block_time')], | ||
unique_key = ['tx_hash', 'trace_address', 'block_date'] | ||
) | ||
}} | ||
|
||
|
||
|
||
{{ | ||
oneinch_ar_raw_traces_macro( | ||
blockchain = blockchain | ||
) | ||
}} |
24 changes: 24 additions & 0 deletions
24
dex/models/_projects/oneinch/avalanche_c/oneinch_avalanche_c_lop_raw_traces.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
{% set blockchain = 'avalanche_c' %} | ||
|
||
|
||
|
||
{{ | ||
config( | ||
schema = 'oneinch_' + blockchain, | ||
alias = 'lop_raw_traces', | ||
partition_by = ['block_date'], | ||
materialized = 'incremental', | ||
file_format = 'delta', | ||
incremental_strategy = 'merge', | ||
incremental_predicates = [incremental_predicate('DBT_INTERNAL_DEST.block_time')], | ||
unique_key = ['tx_hash', 'trace_address', 'block_date'] | ||
) | ||
}} | ||
|
||
|
||
|
||
{{ | ||
oneinch_lop_raw_traces_macro( | ||
blockchain = blockchain | ||
) | ||
}} |
24 changes: 24 additions & 0 deletions
24
dex/models/_projects/oneinch/base/oneinch_base_ar_raw_traces.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
{% set blockchain = 'base' %} | ||
|
||
|
||
|
||
{{ | ||
config( | ||
schema = 'oneinch_' + blockchain, | ||
alias = 'ar_raw_traces', | ||
partition_by = ['block_date'], | ||
materialized = 'incremental', | ||
file_format = 'delta', | ||
incremental_strategy = 'merge', | ||
incremental_predicates = [incremental_predicate('DBT_INTERNAL_DEST.block_time')], | ||
unique_key = ['tx_hash', 'trace_address', 'block_date'] | ||
) | ||
}} | ||
|
||
|
||
|
||
{{ | ||
oneinch_ar_raw_traces_macro( | ||
blockchain = blockchain | ||
) | ||
}} |
24 changes: 24 additions & 0 deletions
24
dex/models/_projects/oneinch/base/oneinch_base_lop_raw_traces.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
{% set blockchain = 'base' %} | ||
|
||
|
||
|
||
{{ | ||
config( | ||
schema = 'oneinch_' + blockchain, | ||
alias = 'lop_raw_traces', | ||
partition_by = ['block_date'], | ||
materialized = 'incremental', | ||
file_format = 'delta', | ||
incremental_strategy = 'merge', | ||
incremental_predicates = [incremental_predicate('DBT_INTERNAL_DEST.block_time')], | ||
unique_key = ['tx_hash', 'trace_address', 'block_date'] | ||
) | ||
}} | ||
|
||
|
||
|
||
{{ | ||
oneinch_lop_raw_traces_macro( | ||
blockchain = blockchain | ||
) | ||
}} |
24 changes: 24 additions & 0 deletions
24
dex/models/_projects/oneinch/bnb/oneinch_bnb_ar_raw_traces.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
{% set blockchain = 'bnb' %} | ||
|
||
|
||
|
||
{{ | ||
config( | ||
schema = 'oneinch_' + blockchain, | ||
alias = 'ar_raw_traces', | ||
partition_by = ['block_date'], | ||
materialized = 'incremental', | ||
file_format = 'delta', | ||
incremental_strategy = 'merge', | ||
incremental_predicates = [incremental_predicate('DBT_INTERNAL_DEST.block_time')], | ||
unique_key = ['tx_hash', 'trace_address', 'block_date'] | ||
) | ||
}} | ||
|
||
|
||
|
||
{{ | ||
oneinch_ar_raw_traces_macro( | ||
blockchain = blockchain | ||
) | ||
}} |
24 changes: 24 additions & 0 deletions
24
dex/models/_projects/oneinch/bnb/oneinch_bnb_lop_raw_traces.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
{% set blockchain = 'bnb' %} | ||
|
||
|
||
|
||
{{ | ||
config( | ||
schema = 'oneinch_' + blockchain, | ||
alias = 'lop_raw_traces', | ||
partition_by = ['block_date'], | ||
materialized = 'incremental', | ||
file_format = 'delta', | ||
incremental_strategy = 'merge', | ||
incremental_predicates = [incremental_predicate('DBT_INTERNAL_DEST.block_time')], | ||
unique_key = ['tx_hash', 'trace_address', 'block_date'] | ||
) | ||
}} | ||
|
||
|
||
|
||
{{ | ||
oneinch_lop_raw_traces_macro( | ||
blockchain = blockchain | ||
) | ||
}} |
24 changes: 24 additions & 0 deletions
24
dex/models/_projects/oneinch/ethereum/oneinch_ethereum_ar_raw_traces.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
{% set blockchain = 'ethereum' %} | ||
|
||
|
||
|
||
{{ | ||
config( | ||
schema = 'oneinch_' + blockchain, | ||
alias = 'ar_raw_traces', | ||
partition_by = ['block_date'], | ||
materialized = 'incremental', | ||
file_format = 'delta', | ||
incremental_strategy = 'merge', | ||
incremental_predicates = [incremental_predicate('DBT_INTERNAL_DEST.block_time')], | ||
unique_key = ['tx_hash', 'trace_address', 'block_date'] | ||
) | ||
}} | ||
|
||
|
||
|
||
{{ | ||
oneinch_ar_raw_traces_macro( | ||
blockchain = blockchain | ||
) | ||
}} |
24 changes: 24 additions & 0 deletions
24
dex/models/_projects/oneinch/ethereum/oneinch_ethereum_lop_raw_traces.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
{% set blockchain = 'ethereum' %} | ||
|
||
|
||
|
||
{{ | ||
config( | ||
schema = 'oneinch_' + blockchain, | ||
alias = 'lop_raw_traces', | ||
partition_by = ['block_date'], | ||
materialized = 'incremental', | ||
file_format = 'delta', | ||
incremental_strategy = 'merge', | ||
incremental_predicates = [incremental_predicate('DBT_INTERNAL_DEST.block_time')], | ||
unique_key = ['tx_hash', 'trace_address', 'block_date'] | ||
) | ||
}} | ||
|
||
|
||
|
||
{{ | ||
oneinch_lop_raw_traces_macro( | ||
blockchain = blockchain | ||
) | ||
}} |
24 changes: 24 additions & 0 deletions
24
dex/models/_projects/oneinch/fantom/oneinch_fantom_ar_raw_traces.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
{% set blockchain = 'fantom' %} | ||
|
||
|
||
|
||
{{ | ||
config( | ||
schema = 'oneinch_' + blockchain, | ||
alias = 'ar_raw_traces', | ||
partition_by = ['block_date'], | ||
materialized = 'incremental', | ||
file_format = 'delta', | ||
incremental_strategy = 'merge', | ||
incremental_predicates = [incremental_predicate('DBT_INTERNAL_DEST.block_time')], | ||
unique_key = ['tx_hash', 'trace_address', 'block_date'] | ||
) | ||
}} | ||
|
||
|
||
|
||
{{ | ||
oneinch_ar_raw_traces_macro( | ||
blockchain = blockchain | ||
) | ||
}} |
24 changes: 24 additions & 0 deletions
24
dex/models/_projects/oneinch/fantom/oneinch_fantom_lop_raw_traces.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
{% set blockchain = 'fantom' %} | ||
|
||
|
||
|
||
{{ | ||
config( | ||
schema = 'oneinch_' + blockchain, | ||
alias = 'lop_raw_traces', | ||
partition_by = ['block_date'], | ||
materialized = 'incremental', | ||
file_format = 'delta', | ||
incremental_strategy = 'merge', | ||
incremental_predicates = [incremental_predicate('DBT_INTERNAL_DEST.block_time')], | ||
unique_key = ['tx_hash', 'trace_address', 'block_date'] | ||
) | ||
}} | ||
|
||
|
||
|
||
{{ | ||
oneinch_lop_raw_traces_macro( | ||
blockchain = blockchain | ||
) | ||
}} |
24 changes: 24 additions & 0 deletions
24
dex/models/_projects/oneinch/gnosis/oneinch_gnosis_ar_raw_traces.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
{% set blockchain = 'gnosis' %} | ||
|
||
|
||
|
||
{{ | ||
config( | ||
schema = 'oneinch_' + blockchain, | ||
alias = 'ar_raw_traces', | ||
partition_by = ['block_date'], | ||
materialized = 'incremental', | ||
file_format = 'delta', | ||
incremental_strategy = 'merge', | ||
incremental_predicates = [incremental_predicate('DBT_INTERNAL_DEST.block_time')], | ||
unique_key = ['tx_hash', 'trace_address', 'block_date'] | ||
) | ||
}} | ||
|
||
|
||
|
||
{{ | ||
oneinch_ar_raw_traces_macro( | ||
blockchain = blockchain | ||
) | ||
}} |
24 changes: 24 additions & 0 deletions
24
dex/models/_projects/oneinch/gnosis/oneinch_gnosis_lop_raw_traces.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
{% set blockchain = 'gnosis' %} | ||
|
||
|
||
|
||
{{ | ||
config( | ||
schema = 'oneinch_' + blockchain, | ||
alias = 'lop_raw_traces', | ||
partition_by = ['block_date'], | ||
materialized = 'incremental', | ||
file_format = 'delta', | ||
incremental_strategy = 'merge', | ||
incremental_predicates = [incremental_predicate('DBT_INTERNAL_DEST.block_time')], | ||
unique_key = ['tx_hash', 'trace_address', 'block_date'] | ||
) | ||
}} | ||
|
||
|
||
|
||
{{ | ||
oneinch_lop_raw_traces_macro( | ||
blockchain = blockchain | ||
) | ||
}} |
24 changes: 24 additions & 0 deletions
24
dex/models/_projects/oneinch/optimism/oneinch_optimism_ar_raw_traces.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
{% set blockchain = 'optimism' %} | ||
|
||
|
||
|
||
{{ | ||
config( | ||
schema = 'oneinch_' + blockchain, | ||
alias = 'ar_raw_traces', | ||
partition_by = ['block_date'], | ||
materialized = 'incremental', | ||
file_format = 'delta', | ||
incremental_strategy = 'merge', | ||
incremental_predicates = [incremental_predicate('DBT_INTERNAL_DEST.block_time')], | ||
unique_key = ['tx_hash', 'trace_address', 'block_date'] | ||
) | ||
}} | ||
|
||
|
||
|
||
{{ | ||
oneinch_ar_raw_traces_macro( | ||
blockchain = blockchain | ||
) | ||
}} |
24 changes: 24 additions & 0 deletions
24
dex/models/_projects/oneinch/optimism/oneinch_optimism_lop_raw_traces.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
{% set blockchain = 'optimism' %} | ||
|
||
|
||
|
||
{{ | ||
config( | ||
schema = 'oneinch_' + blockchain, | ||
alias = 'lop_raw_traces', | ||
partition_by = ['block_date'], | ||
materialized = 'incremental', | ||
file_format = 'delta', | ||
incremental_strategy = 'merge', | ||
incremental_predicates = [incremental_predicate('DBT_INTERNAL_DEST.block_time')], | ||
unique_key = ['tx_hash', 'trace_address', 'block_date'] | ||
) | ||
}} | ||
|
||
|
||
|
||
{{ | ||
oneinch_lop_raw_traces_macro( | ||
blockchain = blockchain | ||
) | ||
}} |
Oops, something went wrong.