From 46caa1a569c383a0a826af00afccf70873d34e8e Mon Sep 17 00:00:00 2001 From: Simon Chow Date: Fri, 11 Oct 2024 09:45:29 -0400 Subject: [PATCH 1/2] Remove null char from contract data asset_code in avro files --- dags/queries/generate_avro/contract_data.sql | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dags/queries/generate_avro/contract_data.sql b/dags/queries/generate_avro/contract_data.sql index 9fb7e60d..ea8f3358 100644 --- a/dags/queries/generate_avro/contract_data.sql +++ b/dags/queries/generate_avro/contract_data.sql @@ -7,7 +7,8 @@ options ( as ( select * - except (batch_id, batch_insert_ts, batch_run_date) + except (batch_id, batch_insert_ts, batch_run_date, asset_code) + , REPLACE(asset_code, '\u0000', '') as asset_code from {project_id}.{dataset_id}.contract_data where true From 27b1a6f1ead98ce51abc7b3aaf48d024d2d2b5f1 Mon Sep 17 00:00:00 2001 From: Simon Chow Date: Fri, 11 Oct 2024 10:04:16 -0400 Subject: [PATCH 2/2] lint --- dags/queries/generate_avro/contract_data.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dags/queries/generate_avro/contract_data.sql b/dags/queries/generate_avro/contract_data.sql index ea8f3358..4c334e6b 100644 --- a/dags/queries/generate_avro/contract_data.sql +++ b/dags/queries/generate_avro/contract_data.sql @@ -8,7 +8,7 @@ as ( select * except (batch_id, batch_insert_ts, batch_run_date, asset_code) - , REPLACE(asset_code, '\u0000', '') as asset_code + , replace(asset_code, '\u0000', '') as asset_code from {project_id}.{dataset_id}.contract_data where true