From 3f432de77a92589d3affb2a2c65e0473f4d42222 Mon Sep 17 00:00:00 2001 From: Madhu Kadiri Date: Fri, 22 Nov 2024 12:23:15 +0000 Subject: [PATCH] Glue Job added - 2211 - 2 --- ...rds_tbl_hash_rows_to_s3_prq_partitionby_yyyy_mm.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/terraform/environments/electronic-monitoring-data/glue-job/etl_rds_tbl_hash_rows_to_s3_prq_partitionby_yyyy_mm.py b/terraform/environments/electronic-monitoring-data/glue-job/etl_rds_tbl_hash_rows_to_s3_prq_partitionby_yyyy_mm.py index 0f8219e9da9..2e0d27ae292 100644 --- a/terraform/environments/electronic-monitoring-data/glue-job/etl_rds_tbl_hash_rows_to_s3_prq_partitionby_yyyy_mm.py +++ b/terraform/environments/electronic-monitoring-data/glue-job/etl_rds_tbl_hash_rows_to_s3_prq_partitionby_yyyy_mm.py @@ -266,10 +266,13 @@ def write_rds_df_to_s3_parquet(df_rds_write: DataFrame, # --------------------------------------- all_columns_except_pkey = list() - conversion_col_list = list( - TBL_COLS_CONVERT_FMT_DICT[ - f"{rds_sqlserver_db_table}"].keys() - ) + conversion_col_list = list() + if TBL_COLS_CONVERT_FMT_DICT.get( + f"{rds_sqlserver_db_table}", None) is not None: + conversion_col_list = list( + TBL_COLS_CONVERT_FMT_DICT[ + f"{rds_sqlserver_db_table}"].keys() + ) for e in rds_db_table_empty_df.schema.fields: if e.name == rds_db_tbl_pkey_column: continue