Skip to content

Commit

Permalink
matf/stop-overwriting-state-on-empty-state (#53)
Browse files Browse the repository at this point in the history
- if the state message is empty (that is, no state message was
  processed) then do not attempt to write the state as this can
  overwrite state in the event a tap produces no records (or no state
  message)
  • Loading branch information
shopmatfournier authored Jun 8, 2023
1 parent ed46a26 commit 831623e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion target_bigquery/target.py
Original file line number Diff line number Diff line change
Expand Up @@ -526,5 +526,6 @@ def drain_all(self, is_endofpipe: bool = False) -> None: # type: ignore
else:
for sink in self._sinks_active.values():
sink.pre_state_hook()
self._write_state_message(state)
if state:
self._write_state_message(state)
self._reset_max_record_age()

0 comments on commit 831623e

Please sign in to comment.