Skip to content

Commit

Permalink
fix(data-warehouse): Clear the delta lake table cache after a pipelin…
Browse files Browse the repository at this point in the history
…e has run (#27215)
  • Loading branch information
Gilbert09 authored Jan 2, 2025
1 parent ea86a3c commit b32b014
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions posthog/temporal/data_imports/pipelines/pipeline/pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,14 @@ def run(self):
self._post_run_operations(row_count=row_count)
finally:
# Help reduce the memory footprint of each job
delta_table = self._delta_table_helper.get_delta_table()
self._delta_table_helper.get_delta_table.cache_clear()
if delta_table:
del delta_table

del self._resource
del self._delta_table_helper

if "buffer" in locals() and buffer is not None:
del buffer
if "py_table" in locals() and py_table is not None:
Expand Down

0 comments on commit b32b014

Please sign in to comment.