mirror of
https://github.com/FlipsideCrypto/flow-models.git
synced 2026-02-06 13:56:45 +00:00
38 lines
783 B
SQL
38 lines
783 B
SQL
{{ config(
|
|
materialized = 'view',
|
|
tags = ['testnet', 'testnet_gold']
|
|
) }}
|
|
|
|
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
|