DAT2-17/gno-external-tables (#247)

* bronze updates

* decoded logs enabled

* sources
This commit is contained in:
drethereum 2025-11-17 09:24:14 -07:00 committed by GitHub
parent 6c6da4dbcf
commit eb4dcc379e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
29 changed files with 3 additions and 465 deletions

View File

@ -73,8 +73,6 @@ models:
+enabled: true
core:
+enabled: true # enable subpackages, as needed
bronze:
+enabled: false
github_actions:
+enabled: true
labels:
@ -92,13 +90,7 @@ models:
abis:
+enabled: true
decoded_logs:
+enabled: false
gold:
+enabled: true
silver:
+enabled: true
streamline:
+enabled: true
+enabled: true
curated_package:
+enabled: false
stats:

View File

@ -9,15 +9,9 @@ sources:
- name: receipts
- name: blocks
- name: transactions
- name: debug_traceblockbynumber
- name: traces
- name: decoded_logs
- name: confirm_blocks
- name: blocks_v2
- name: transactions_v2
- name: receipts_v2
- name: traces_v2
- name: confirm_blocks_v2
- name: decoded_logs_v2
- name: contract_abis
- name: token_reads
- name: balances_erc20

View File

@ -1,15 +0,0 @@
{# Log configuration details #}
{{ fsc_evm.log_model_details() }}
{# Set up dbt configuration #}
{{ config (
materialized = 'view',
tags = ['bronze','core','phase_1']
) }}
{# Main query starts here #}
{{ fsc_evm.streamline_external_table_query(
source_name = 'blocks',
source_version = 'v2',
error_code = true
) }}

View File

@ -1,29 +0,0 @@
{# Log configuration details #}
{{ fsc_evm.log_model_details() }}
{{ config (
materialized = 'view',
tags = ['bronze','core','phase_1']
) }}
SELECT
partition_key,
block_number,
VALUE,
DATA,
metadata,
file_name,
_inserted_timestamp
FROM
{{ ref('bronze__blocks_fr_v2') }}
UNION ALL
SELECT
_partition_by_block_id AS partition_key,
block_number,
VALUE,
DATA,
metadata,
file_name,
_inserted_timestamp
FROM
{{ ref('bronze__blocks_fr_v1') }}

View File

@ -1,17 +0,0 @@
{# Log configuration details #}
{{ fsc_evm.log_model_details() }}
{# Set up dbt configuration #}
{{ config (
materialized = 'view',
tags = ['bronze','core','streamline_v1','phase_1']
) }}
{# Main query starts here #}
{{ fsc_evm.streamline_external_table_query_fr(
source_name = 'blocks',
partition_function = "CAST(SPLIT_PART(SPLIT_PART(file_name, '/', 3), '_', 1) AS INTEGER)",
partition_join_key = "_partition_by_block_id",
block_number = false,
error_code = true
) }}

View File

@ -1,15 +0,0 @@
{# Log configuration details #}
{{ fsc_evm.log_model_details() }}
{# Set up dbt configuration #}
{{ config (
materialized = 'view',
tags = ['bronze','core','phase_1']
) }}
{# Main query starts here #}
{{ fsc_evm.streamline_external_table_query_fr(
source_name = 'blocks',
source_version = 'v2',
error_code = true
) }}

View File

@ -1,15 +0,0 @@
{# Log configuration details #}
{{ fsc_evm.log_model_details() }}
{# Set up dbt configuration #}
{{ config (
materialized = 'view',
tags = ['bronze','core','confirm_blocks','phase_1']
) }}
{# Main query starts here #}
{{ fsc_evm.streamline_external_table_query(
source_name = 'confirm_blocks',
source_version = 'v2',
error_code = true
) }}

View File

@ -1,29 +0,0 @@
{# Log configuration details #}
{{ fsc_evm.log_model_details() }}
{{ config (
materialized = 'view',
tags = ['bronze','core','confirm_blocks','phase_1']
) }}
SELECT
partition_key,
block_number,
VALUE,
DATA,
metadata,
file_name,
_inserted_timestamp
FROM
{{ ref('bronze__confirm_blocks_fr_v2') }}
UNION ALL
SELECT
_partition_by_block_id AS partition_key,
block_number,
VALUE,
DATA,
metadata,
file_name,
_inserted_timestamp
FROM
{{ ref('bronze__confirm_blocks_fr_v1') }}

View File

@ -1,18 +0,0 @@
{# Log configuration details #}
{{ fsc_evm.log_model_details() }}
{# Set up dbt configuration #}
{{ config (
materialized = 'view',
tags = ['bronze','core','streamline_v1','confirm_blocks','phase_1']
) }}
{# Main query starts here #}
{{ fsc_evm.streamline_external_table_query_fr(
source_name = 'confirm_blocks',
source_version = '',
partition_function = "CAST(SPLIT_PART(SPLIT_PART(file_name, '/', 3), '_', 1) AS INTEGER)",
partition_join_key = "_partition_by_block_id",
block_number = false,
error_code = true
) }}

View File

@ -1,15 +0,0 @@
{# Log configuration details #}
{{ fsc_evm.log_model_details() }}
{# Set up dbt configuration #}
{{ config (
materialized = 'view',
tags = ['bronze','core','confirm_blocks','phase_1']
) }}
{# Main query starts here #}
{{ fsc_evm.streamline_external_table_query_fr(
source_name = 'confirm_blocks',
source_version = 'v2',
error_code = true
) }}

View File

@ -1,15 +0,0 @@
{# Log configuration details #}
{{ fsc_evm.log_model_details() }}
{# Set up dbt configuration #}
{{ config (
materialized = 'view',
tags = ['bronze','core','receipts','phase_1']
) }}
{# Main query starts here #}
{{ fsc_evm.streamline_external_table_query(
source_name = 'receipts',
source_version = 'v2',
error_code = true
) }}

View File

@ -1,34 +0,0 @@
{# Log configuration details #}
{{ fsc_evm.log_model_details() }}
{{ config (
materialized = 'view',
tags = ['bronze','core','receipts','phase_1']
) }}
SELECT
partition_key,
block_number,
array_index,
VALUE,
DATA,
metadata,
file_name,
_inserted_timestamp
FROM
{{ ref('bronze__receipts_fr_v2') }}
UNION ALL
SELECT
_partition_by_block_id AS partition_key,
block_number,
COALESCE(
VALUE :array_index :: INT,
TRY_TO_NUMBER(utils.udf_hex_to_int(VALUE :data :"transactionIndex" :: STRING))
) AS array_index,
VALUE,
DATA,
metadata,
file_name,
_inserted_timestamp
FROM
{{ ref('bronze__receipts_fr_v1') }}

View File

@ -1,18 +0,0 @@
{# Log configuration details #}
{{ fsc_evm.log_model_details() }}
{# Set up dbt configuration #}
{{ config (
materialized = 'view',
tags = ['bronze','core','streamline_v1','receipts','phase_1']
) }}
{# Main query starts here #}
{{ fsc_evm.streamline_external_table_query_fr(
source_name = 'receipts',
source_version = '',
partition_function = "CAST(SPLIT_PART(SPLIT_PART(file_name, '/', 3), '_', 1) AS INTEGER)",
partition_join_key = "_partition_by_block_id",
block_number = false,
error_code = true
) }}

View File

@ -1,15 +0,0 @@
{# Log configuration details #}
{{ fsc_evm.log_model_details() }}
{# Set up dbt configuration #}
{{ config (
materialized = 'view',
tags = ['bronze','core','receipts','phase_1']
) }}
{# Main query starts here #}
{{ fsc_evm.streamline_external_table_query_fr(
source_name = 'receipts',
source_version = 'v2',
error_code = true
) }}

View File

@ -1,15 +0,0 @@
{# Log configuration details #}
{{ fsc_evm.log_model_details() }}
{# Set up dbt configuration #}
{{ config (
materialized = 'view',
tags = ['bronze','core','phase_1']
) }}
{# Main query starts here #}
{{ fsc_evm.streamline_external_table_query(
source_name = 'traces',
source_version = 'v2',
error_code = true
) }}

View File

@ -1,31 +0,0 @@
{# Log configuration details #}
{{ fsc_evm.log_model_details() }}
{{ config (
materialized = 'view',
tags = ['bronze','core','phase_1']
) }}
SELECT
partition_key,
block_number,
array_index,
VALUE,
DATA,
metadata,
file_name,
_inserted_timestamp
FROM
{{ ref('bronze__traces_fr_v2') }}
UNION ALL
SELECT
_partition_by_block_id AS partition_key,
block_number,
VALUE :"array_index" :: INT AS array_index,
VALUE,
DATA,
metadata,
file_name,
_inserted_timestamp
FROM
{{ ref('bronze__traces_fr_v1') }}

View File

@ -1,17 +0,0 @@
{# Log configuration details #}
{{ fsc_evm.log_model_details() }}
{# Set up dbt configuration #}
{{ config (
materialized = 'view',
tags = ['bronze','core','streamline_v1','phase_1']
) }}
{# Main query starts here #}
{{ fsc_evm.streamline_external_table_query_fr(
source_name = 'debug_traceblockbynumber',
partition_function = "CAST(SPLIT_PART(SPLIT_PART(file_name, '/', 3), '_', 1) AS INTEGER)",
partition_join_key = "_partition_by_block_id",
block_number = false,
error_code = true
) }}

View File

@ -1,15 +0,0 @@
{# Log configuration details #}
{{ fsc_evm.log_model_details() }}
{# Set up dbt configuration #}
{{ config (
materialized = 'view',
tags = ['bronze','core','phase_1']
) }}
{# Main query starts here #}
{{ fsc_evm.streamline_external_table_query_fr(
source_name = 'traces',
source_version = 'v2',
error_code = true
) }}

View File

@ -1,15 +0,0 @@
{# Log configuration details #}
{{ fsc_evm.log_model_details() }}
{# Set up dbt configuration #}
{{ config (
materialized = 'view',
tags = ['bronze','core','phase_1']
) }}
{# Main query starts here #}
{{ fsc_evm.streamline_external_table_query(
source_name = 'transactions',
source_version = 'v2',
error_code = true
) }}

View File

@ -1,29 +0,0 @@
{# Log configuration details #}
{{ fsc_evm.log_model_details() }}
{{ config (
materialized = 'view',
tags = ['bronze','core','phase_1']
) }}
SELECT
partition_key,
block_number,
VALUE,
DATA,
metadata,
file_name,
_inserted_timestamp
FROM
{{ ref('bronze__transactions_fr_v2') }}
UNION ALL
SELECT
_partition_by_block_id AS partition_key,
block_number,
VALUE,
DATA,
metadata,
file_name,
_inserted_timestamp
FROM
{{ ref('bronze__transactions_fr_v1') }}

View File

@ -1,17 +0,0 @@
{# Log configuration details #}
{{ fsc_evm.log_model_details() }}
{# Set up dbt configuration #}
{{ config (
materialized = 'view',
tags = ['bronze','core','streamline_v1','phase_1']
) }}
{# Main query starts here #}
{{ fsc_evm.streamline_external_table_query_fr(
source_name = 'transactions',
partition_function = "CAST(SPLIT_PART(SPLIT_PART(file_name, '/', 3), '_', 1) AS INTEGER)",
partition_join_key = "_partition_by_block_id",
block_number = false,
error_code = true
) }}

View File

@ -1,15 +0,0 @@
{# Log configuration details #}
{{ fsc_evm.log_model_details() }}
{# Set up dbt configuration #}
{{ config (
materialized = 'view',
tags = ['bronze','core','phase_1']
) }}
{# Main query starts here #}
{{ fsc_evm.streamline_external_table_query_fr(
source_name = 'transactions',
source_version = 'v2',
error_code = true
) }}

View File

@ -1,14 +0,0 @@
{# Log configuration details #}
{{ fsc_evm.log_model_details() }}
{# Set up dbt configuration #}
{{ config (
materialized = 'view',
tags = ['bronze','decoded_logs','phase_2']
) }}
{# Main query starts here #}
{{ fsc_evm.streamline_external_table_query_decoder(
source_name = 'decoded_logs',
source_version = 'v2'
) }}

View File

@ -1,18 +0,0 @@
{# Log configuration details #}
{{ fsc_evm.log_model_details() }}
{# Set up dbt configuration #}
{{ config (
materialized = 'view',
tags = ['bronze','decoded_logs','phase_2']
) }}
SELECT
*
FROM
{{ ref('bronze__decoded_logs_fr_v2') }}
UNION ALL
SELECT
*
FROM
{{ ref('bronze__decoded_logs_fr_v1') }}

View File

@ -1,13 +0,0 @@
{# Log configuration details #}
{{ fsc_evm.log_model_details() }}
{# Set up dbt configuration #}
{{ config (
materialized = 'view',
tags = ['bronze','decoded_logs','streamline_v1','phase_2']
) }}
{# Main query starts here #}
{{ fsc_evm.streamline_external_table_query_decoder_fr(
source_name = 'decoded_logs'
) }}

View File

@ -1,14 +0,0 @@
{# Log configuration details #}
{{ fsc_evm.log_model_details() }}
{# Set up dbt configuration #}
{{ config (
materialized = 'view',
tags = ['bronze','decoded_logs','phase_2']
) }}
{# Main query starts here #}
{{ fsc_evm.streamline_external_table_query_decoder_fr(
source_name = 'decoded_logs',
source_version = 'v2'
) }}

View File

@ -1,3 +1,3 @@
packages:
- git: https://github.com/FlipsideCrypto/fsc-evm.git
revision: v4.33.0
revision: v4.36.0