Skip to content

Commit

Permalink
1inch: project orders materialize (#6064)
Browse files Browse the repository at this point in the history
* Update oneinch_project_orders.sql

* inc predicate

* inc pred to config
  • Loading branch information
grkhr authored Jun 11, 2024
1 parent 8d4db5e commit e8d6c5f
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion models/oneinch/oneinch_project_orders.sql
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,11 @@
config(
schema = 'oneinch',
alias = 'project_orders',
materialized = 'view',
materialized = 'incremental',
file_format = 'delta',
incremental_strategy = 'merge',
partition_by = ['block_month'],
incremental_predicates = [incremental_predicate('DBT_INTERNAL_DEST.block_time')],
unique_key = ['blockchain', 'block_number', 'tx_hash', 'call_trace_address']
)
}}
Expand Down Expand Up @@ -73,6 +77,9 @@ orders as (
from {{ ref('oneinch_lop') }}
where call_success
)
{% if is_incremental() %}
where {{ incremental_predicate('block_time') }}
{% endif %}
)

, prices as (
Expand Down

0 comments on commit e8d6c5f

Please sign in to comment.