This is an automated email from the ASF dual-hosted git repository. pabloem pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/beam.git
The following commit(s) were added to refs/heads/master by this push: new 7962018 [BEAM-11705] Fixing ignore_insert_id implementation new 9e18310 Merge pull request #13827 from [BEAM-11705] Fixing ignore_insert_id implementation 7962018 is described below commit 7962018bfffb07d51f324c666bd4169347f02dfa Author: Pablo Estrada <pabl...@apache.org> AuthorDate: Thu Jan 28 11:39:37 2021 -0800 [BEAM-11705] Fixing ignore_insert_id implementation --- sdks/python/apache_beam/io/gcp/bigquery.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/sdks/python/apache_beam/io/gcp/bigquery.py b/sdks/python/apache_beam/io/gcp/bigquery.py index 3875c79..a1ce2b1 100644 --- a/sdks/python/apache_beam/io/gcp/bigquery.py +++ b/sdks/python/apache_beam/io/gcp/bigquery.py @@ -1297,7 +1297,7 @@ class BigQueryWriteFn(DoFn): rows = [r[0] for r in rows_and_insert_ids] if self.ignore_insert_ids: - insert_ids = None + insert_ids = [None for r in rows_and_insert_ids] else: insert_ids = [r[1] for r in rows_and_insert_ids] @@ -1419,8 +1419,7 @@ class _StreamToBigQuery(PTransform): | 'AddInsertIdsWithRandomKeys' >> beam.ParDo( _StreamToBigQuery.InsertIdPrefixFn())) - if not self.ignore_insert_ids: - sharded_data = (sharded_data | 'CommitInsertIds' >> ReshufflePerKey()) + sharded_data = (sharded_data | 'CommitInsertIds' >> ReshufflePerKey()) return ( sharded_data