You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@beam.apache.org by ib...@apache.org on 2020/04/24 17:20:02 UTC
[beam] branch release-2.21.0 updated: [BEAM-9812] Fixing bug
causing pipelines requiring temp tables to not work
This is an automated email from the ASF dual-hosted git repository.
ibzib pushed a commit to branch release-2.21.0
in repository https://gitbox.apache.org/repos/asf/beam.git
The following commit(s) were added to refs/heads/release-2.21.0 by this push:
new d3ae131 [BEAM-9812] Fixing bug causing pipelines requiring temp tables to not work
new 7bdf9fb Merge pull request #11510 from pabloem/cp-BEAM-9812
d3ae131 is described below
commit d3ae1310251deb4f8feb9855967c47b9173918ae
Author: Pablo Estrada <pa...@apache.org>
AuthorDate: Thu Apr 23 12:37:13 2020 -0700
[BEAM-9812] Fixing bug causing pipelines requiring temp tables to not work
---
sdks/python/apache_beam/io/gcp/bigquery_tools.py | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/sdks/python/apache_beam/io/gcp/bigquery_tools.py b/sdks/python/apache_beam/io/gcp/bigquery_tools.py
index 1ae4f7c..6eaa454 100644
--- a/sdks/python/apache_beam/io/gcp/bigquery_tools.py
+++ b/sdks/python/apache_beam/io/gcp/bigquery_tools.py
@@ -175,6 +175,7 @@ def parse_table_reference(table, dataset=None, project=None):
Returns:
A TableReference object from the bigquery API. The object has the following
attributes: projectId, datasetId, and tableId.
+ If the input is a TableReference object, a new object will be returned.
Raises:
ValueError: if the table reference as a string does not match the expected
@@ -182,7 +183,10 @@ def parse_table_reference(table, dataset=None, project=None):
"""
if isinstance(table, bigquery.TableReference):
- return table
+ return bigquery.TableReference(
+ projectId=table.projectId,
+ datasetId=table.datasetId,
+ tableId=table.tableId)
elif callable(table):
return table
elif isinstance(table, value_provider.ValueProvider):