flow-models/models/gold/testnet/testnet__fact_transactions.sql
Jack Forgash 05da02b5fe
AN-6550/flow testnet v2 (#483)
* flow testnet v2

* set batch sizes

* add QN node_url to sl testnet model

* upd node_url in testnet rt models

* add gha workflows for testnet

* testnet gold models

* upd tag on gold

* upd tests

* upd tests and set min to 280mm

* upd test - rm null

---------

Co-authored-by: shah <info@shahnewazkhan.ca>
2025-09-16 20:32:27 -06:00

38 lines
767 B
SQL

{{ config(
materialized = 'view',
tags = ['testnet']
) }}
SELECT
tx_id,
block_timestamp,
block_height :: INT AS block_height,
'flow' AS chain_id,
proposer,
payer,
authorizers,
count_authorizers,
gas_limit,
script,
arguments,
OBJECT_CONSTRUCT(
'error',
error_message,
'events',
events,
'status',
status
) AS transaction_result,
tx_succeeded,
error_message AS error_msg,
COALESCE (
streamline_transaction_id,
{{ dbt_utils.generate_surrogate_key(['tx_id']) }}
) AS fact_transactions_id,
inserted_timestamp,
modified_timestamp
FROM
{{ ref('silver__testnet_transactions_final') }}
WHERE
NOT pending_result_response