From f2848792baff7c9dc667dd082ec3aa714abe766b Mon Sep 17 00:00:00 2001 From: Huang Geyang Date: Wed, 8 Jan 2025 02:41:03 +0800 Subject: [PATCH] fix(test): cast address fields to varbinary in dex_ci_trades_test - Explicitly list all fields instead of using SELECT * - Cast address fields to varbinary to match expected types --- .../models/trades/test/dex_ci_trades_test.sql | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/dbt_subprojects/dex/models/trades/test/dex_ci_trades_test.sql b/dbt_subprojects/dex/models/trades/test/dex_ci_trades_test.sql index bde7f932f45..31a1441042b 100644 --- a/dbt_subprojects/dex/models/trades/test/dex_ci_trades_test.sql +++ b/dbt_subprojects/dex/models/trades/test/dex_ci_trades_test.sql @@ -16,7 +16,22 @@ WITH base_trades AS ( {% for file in modified_models %} {% set model_name = file.split('/')[-1].replace('.sql', '') %} SELECT - *, + blockchain, + project, + version, + block_month, + block_date, + block_time, + block_number, + token_bought_amount_raw, + token_sold_amount_raw, + CAST(token_bought_address AS varbinary) as token_bought_address, + CAST(token_sold_address AS varbinary) as token_sold_address, + CAST(taker AS varbinary) as taker, + CAST(maker AS varbinary) as maker, + CAST(project_contract_address AS varbinary) as project_contract_address, + tx_hash, + evt_index, cast(null as varbinary) as tx_from, -- For testing only, not used in production cast(null as varbinary) as tx_to -- For testing only, not used in production FROM delta_prod.test_schema.{{ git_schema }}_{{ model_name }}