diff --git a/target_bigquery/target.py b/target_bigquery/target.py index 58880a9..aafce5f 100644 --- a/target_bigquery/target.py +++ b/target_bigquery/target.py @@ -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()