Skip to content

Commit 71d42df

Browse files
committed
segregate gold/bronze overrides
1 parent 8b57c94 commit 71d42df

6 files changed

+19
-0
lines changed

macros/livetable/near.yaml.sql

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,20 @@
8787
sql: |
8888
{{ near_livetable_fact_transactions(schema, blockchain, network) | indent(4) -}}
8989

90+
- name: {{ schema -}}.tf_bronze_transactions
91+
signature:
92+
- [_block_height, INTEGER, The start block height to get the transactions from]
93+
- [row_count, INTEGER, The number of rows to fetch]
94+
return_type:
95+
- "TABLE(tx_hash STRING, block_id NUMBER, block_timestamp TIMESTAMP_NTZ, nonce INT, signature STRING, tx_receiver STRING, tx_signer STRING, tx VARIANT, gas_used NUMBER, transaction_fee NUMBER, attached_gas NUMBER, tx_succeeded BOOLEAN, fact_transactions_id STRING, inserted_timestamp TIMESTAMP_NTZ, modified_timestamp TIMESTAMP_NTZ, data VARIANT, value OBJECT, partition_key NUMBER)"
96+
options: |
97+
NOT NULL
98+
RETURNS NULL ON NULL INPUT
99+
VOLATILE
100+
COMMENT = $$Returns transaction details for blocks starting from a given height.Fetches txs for the specified number of blocks.$$
101+
sql: |
102+
{{ near_livetable_bronze_transactions(schema, blockchain, network) | indent(4) -}}
103+
90104
- name: {{ schema -}}.tf_fact_receipts
91105
signature:
92106
- [_block_height, INTEGER, The start block height to get the receipts from]

macros/livetable/near_live_table_abstractions.sql

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,11 @@ FROM {{raw_blocks}}
156156
{{ near_livetable_fact_transactions }}
157157
{% endmacro %}
158158

159+
{% macro near_livetable_bronze_transactions(schema, blockchain, network) %}
160+
{%- set near_livetable_bronze_transactions = livequery_models.get_rendered_model('near_models', 'livetable_bronze_transactions', schema, blockchain, network) -%}
161+
{{ near_livetable_fact_transactions }}
162+
{% endmacro %}
163+
159164
{% macro near_livetable_fact_receipts(schema, blockchain, network) %}
160165
{%- set near_livetable_fact_receipts = livequery_models.get_rendered_model('near_models', 'livetable_fact_receipts', schema, blockchain, network) -%}
161166
{{ near_livetable_fact_receipts }}

0 commit comments

Comments
 (0)