You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@beam.apache.org by pa...@apache.org on 2020/04/23 20:41:26 UTC
[beam] branch master 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.
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 9867aab [BEAM-9812] Fixing bug causing pipelines requiring temp tables to not work
new decccbe Merge pull request #11509 from [BEAM-9812] Fixing bug causing pipelines requiring temp tables to not work
9867aab is described below
commit 9867aab4dd406111dde22d84d07b6f856a439975
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):