diff --git a/sdks/python/apache_beam/io/gcp/bigquery.py b/sdks/python/apache_beam/io/gcp/bigquery.py index 71c38fe6c5af..327431f4c508 100644 --- a/sdks/python/apache_beam/io/gcp/bigquery.py +++ b/sdks/python/apache_beam/io/gcp/bigquery.py @@ -1317,7 +1317,7 @@ def __next__(self): self.read_rows_response.avro_rows.serialized_binary_rows) return fastavro.schemaless_reader(self.bytes_reader, self.avro_schema) else: - raise EOFError + raise StopIteration @deprecated(since='2.11.0', current="WriteToBigQuery")