From 7068995e33a6a0714ffd9e40993b6a9bf345bfe5 Mon Sep 17 00:00:00 2001 From: Cui <530051970@qq.com> Date: Tue, 14 May 2024 07:47:15 +0800 Subject: [PATCH] update catalog logic --- source/constructs/api/catalog/service.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/source/constructs/api/catalog/service.py b/source/constructs/api/catalog/service.py index 2c490be8..6c4ba3e9 100644 --- a/source/constructs/api/catalog/service.py +++ b/source/constructs/api/catalog/service.py @@ -841,7 +841,7 @@ def sync_job_detection_result( column_path = __get_athena_column_value(row["Data"][6], "str"), location = __get_athena_column_value(row["Data"][7], "str"), table_size_dict[table_name] = table_size - table_size_dict[location] = table_size + # table_size_dict[location] = table_size if table_name in table_column_dict: table_column_dict[table_name].append(column_name) else: @@ -913,7 +913,8 @@ def sync_job_detection_result( tmp_database_catalog_table_dict = {} for key, value in database_catalog_table_dict.items(): - new_key = key.replace(".", "_") + key_array=key.split(".") + new_key = f"{key_array[0]}_{key_array[1].replace('-', '_')}" tmp_database_catalog_table_dict[new_key] = value if table_name in tmp_database_catalog_table_dict: