diff --git a/models/marts/enriched_history/enriched_history_operations.sql b/models/marts/enriched_history/enriched_history_operations.sql index bae5ef5..806f57c 100644 --- a/models/marts/enriched_history/enriched_history_operations.sql +++ b/models/marts/enriched_history/enriched_history_operations.sql @@ -207,6 +207,7 @@ with , contract_code_hash , operation_result_code , operation_trace_code + , details_json from {{ ref('stg_history_operations') }} where cast(batch_run_date as date) < date_add(date('{{ dbt_airflow_macros.ds() }}'), interval 2 day) @@ -384,6 +385,8 @@ with , hist_ledg.protocol_version , hist_ledg.successful_transaction_count , hist_ledg.failed_transaction_count + -- json blob for operation details + , hist_ops.details_json -- general fields , hist_ops.batch_id , hist_ops.batch_run_date diff --git a/models/marts/enriched_history/enriched_history_operations.yml b/models/marts/enriched_history/enriched_history_operations.yml index 7612cc3..ad31b9e 100644 --- a/models/marts/enriched_history/enriched_history_operations.yml +++ b/models/marts/enriched_history/enriched_history_operations.yml @@ -649,3 +649,6 @@ models: - name: operation_trace_code description: '{{ doc("operation_trace_code") }}' + + - name: details_json + description: '{{ doc("details") }}' diff --git a/models/marts/enriched_history/enriched_history_operations_soroban.sql b/models/marts/enriched_history/enriched_history_operations_soroban.sql index a3e3845..009d89b 100644 --- a/models/marts/enriched_history/enriched_history_operations_soroban.sql +++ b/models/marts/enriched_history/enriched_history_operations_soroban.sql @@ -78,6 +78,8 @@ with , enriched.protocol_version , enriched.successful_transaction_count , enriched.failed_transaction_count + -- json blob for operation details + , enriched.details_json -- general fields , enriched.batch_id , enriched.batch_run_date diff --git a/models/marts/enriched_history/enriched_history_operations_soroban.yml b/models/marts/enriched_history/enriched_history_operations_soroban.yml index adbb8c7..61a6964 100644 --- a/models/marts/enriched_history/enriched_history_operations_soroban.yml +++ b/models/marts/enriched_history/enriched_history_operations_soroban.yml @@ -283,3 +283,6 @@ models: - name: operation_trace_code description: '{{ doc("operation_trace_code") }}' + + - name: details_json + description: '{{ doc("details") }}' diff --git a/models/sources/src_history_operations.yml b/models/sources/src_history_operations.yml index 48b8f2c..f869fb9 100644 --- a/models/sources/src_history_operations.yml +++ b/models/sources/src_history_operations.yml @@ -415,3 +415,6 @@ sources: - not_null: config: where: batch_run_date > current_datetime - interval 2 day + + - name: details_json + description: '{{ doc("details") }}' diff --git a/models/staging/stg_history_operations.sql b/models/staging/stg_history_operations.sql index 5749ff0..db55865 100644 --- a/models/staging/stg_history_operations.sql +++ b/models/staging/stg_history_operations.sql @@ -126,6 +126,7 @@ with , details.extend_to , details.contract_id , details.contract_code_hash + , details_json , operation_result_code , operation_trace_code , closed_at