From 5dffab25abcc695bdbdbf8cb430463773e9060e6 Mon Sep 17 00:00:00 2001 From: SAI <47441021+leningradtank@users.noreply.github.com> Date: Wed, 23 Apr 2025 17:15:15 -0500 Subject: [PATCH] =?UTF-8?q?Refactor=20streamline=20transaction=20results?= =?UTF-8?q?=20SQL=20to=20remove=20data=20size=20const=E2=80=A6=20(#437)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Refactor streamline transaction results SQL to remove data size constraint * Removed the OCTET_LENGTH(DATA) < 16777216 condition from the query. * Cleaned up unnecessary comments and code related to data size checks. * update * update * from --- .../core/silver__streamline_transaction_results.sql | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/models/silver/core/silver__streamline_transaction_results.sql b/models/silver/core/silver__streamline_transaction_results.sql index e6158dd..2c17f89 100644 --- a/models/silver/core/silver__streamline_transaction_results.sql +++ b/models/silver/core/silver__streamline_transaction_results.sql @@ -25,7 +25,6 @@ SELECT SYSDATE() AS modified_timestamp, '{{ invocation_id }}' AS _invocation_id FROM - {% if var('LOAD_BACKFILL', False) %} {{ ref('bronze__streamline_transaction_results_history') }} -- TODO need incremental logic of some sort probably (for those 5800 missing txs) @@ -34,8 +33,6 @@ FROM {{ ref('bronze__streamline_fr_transaction_results') }} WHERE _partition_by_block_id BETWEEN {{ var('RANGE_START', 0) }} AND {{ var('RANGE_END', 0) }} - and - OCTET_LENGTH(DATA) < 16777216 {% else %} {% if is_incremental() %} @@ -47,19 +44,15 @@ WHERE FROM {{ this }} ) - AND - OCTET_LENGTH(DATA) < 16777216 -- AND _partition_by_block_id > 107700000 -- march 27th 2025 -- AND _partition_by_block_id > 108000000 -- march 28th 2025 -- AND _partition_by_block_id > 108800000 -- april 5th 2025 {% else %} {{ ref('bronze__streamline_fr_transaction_results') }} - WHERE - OCTET_LENGTH(DATA) < 16777216 {% endif %} {% endif %} qualify(ROW_NUMBER() over (PARTITION BY tx_id ORDER BY - _inserted_timestamp DESC)) = 1 + _inserted_timestamp DESC)) = 1 \ No newline at end of file