Skip to content

Commit 164157a

Browse files
committed
NRL-1411 attempt to improve effeciency
1 parent b5152c2 commit 164157a

File tree

1 file changed

+3
-3
lines changed
  • terraform/account-wide-infrastructure/modules/glue/src

1 file changed

+3
-3
lines changed

terraform/account-wide-infrastructure/modules/glue/src/pipeline.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -104,9 +104,9 @@ def load(self, data):
104104
self.logger.info(f"Loading data into {self.target_path} as Parquet")
105105
for name, dataframe in data.items():
106106
name = name.replace("--", "_")
107-
dataframe.write.mode("append").partitionBy(*self.partition_cols).parquet(
108-
f"{self.target_path}{name}"
109-
)
107+
dataframe.coalesce(1).write.mode("append").partitionBy(
108+
*self.partition_cols
109+
).parquet(f"{self.target_path}{name}")
110110

111111
def trigger_crawler(self):
112112
self.glue.start_crawler(Name=f"{self.name_prefix}-log-crawler")

0 commit comments

Comments
 (0)