From b353709a869b3749a8061ad5b05acafa8ae48b5f Mon Sep 17 00:00:00 2001 From: Alex Corvin Date: Tue, 5 Dec 2023 15:04:57 -0500 Subject: [PATCH] Fix table list file path --- .../base/get-all-partitioned-tables-task.yaml | 4 ++-- .../base/update-partition-metadata-task.yaml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/trino-partition-updater/base/get-all-partitioned-tables-task.yaml b/trino-partition-updater/base/get-all-partitioned-tables-task.yaml index c04683ca..417d48bb 100644 --- a/trino-partition-updater/base/get-all-partitioned-tables-task.yaml +++ b/trino-partition-updater/base/get-all-partitioned-tables-task.yaml @@ -83,11 +83,11 @@ spec: print("Error adding {}.{} to list of partitioned tables. Caused by:".format(row[0], row[1])) print(e) - with open('$(workspaces.tables-list.path)','w') as f: + with open('$(workspaces.tables-list.path)/tables-list.txt','w') as f: print("Dumping table list as json data...") json.dump(schemas, f) - with open('$(workspaces.tables-list.path)') as f: + with open('$(workspaces.tables-list.path)/tables-list.txt') as f: print(f.read()) if failures_detected: diff --git a/trino-partition-updater/base/update-partition-metadata-task.yaml b/trino-partition-updater/base/update-partition-metadata-task.yaml index b4d1935f..e28ccfd9 100644 --- a/trino-partition-updater/base/update-partition-metadata-task.yaml +++ b/trino-partition-updater/base/update-partition-metadata-task.yaml @@ -35,7 +35,7 @@ spec: # Disable warnings from urllib3 urllib3.disable_warnings() - with open('$(workspaces.tables-list.path)') as f: + with open('$(workspaces.tables-list.path)/tables-list.txt') as f: TABLE_DEFS = f.read() UPDATE_PARTITION = "call hive.system.sync_partition_metadata('{}','{}','FULL')"