Skip to content

Commit

Permalink
bronze fr
Browse files Browse the repository at this point in the history
  • Loading branch information
drethereum committed Nov 8, 2024
1 parent 31eef06 commit f2b7884
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions models/decoder_package/abis/bronze/bronze_api__contract_abis.sql
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
{% set block_explorer_abi_url = var('BLOCK_EXPLORER_ABI_URL', '') %}
{% set block_explorer_vault_path = var('BLOCK_EXPLORER_ABI_API_KEY_PATH', '') %}
{% set block_explorer_abi_interaction_limit = var('BLOCK_EXPLORER_ABI_INTERACTION_LIMIT', 250) %}
{% set bronze_full_refresh = var('BRONZE_FULL_REFRESH', false) %}

{%- if flags.WHICH == 'compile' and execute -%}

Expand All @@ -13,6 +14,8 @@

{%- endif -%}

{% if not bronze_full_refresh %}

{{ config(
materialized = 'incremental',
unique_key = "contract_address",
Expand All @@ -21,6 +24,17 @@
tags = ['bronze_abis']
) }}

{% else %}

{{ config(
materialized = 'incremental',
unique_key = "contract_address",
post_hook = "ALTER TABLE {{ this }} ADD SEARCH OPTIMIZATION on equality(contract_address)",
tags = ['bronze_abis']
) }}

{% endif %}

WITH base AS (

SELECT
Expand Down

0 comments on commit f2b7884

Please sign in to comment.