This is an automated email from the ASF dual-hosted git repository.
riteshghorse 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 2eb1a756258 [Python] Clean doc related to write data in bigquery.py
(#30887)
2eb1a756258 is described below
commit 2eb1a756258b24b4c3b92c14e0959d64b0008bbf
Author: Kevin ZHOU <[email protected]>
AuthorDate: Thu Apr 18 15:57:47 2024 +0200
[Python] Clean doc related to write data in bigquery.py (#30887)
* add missing closing parenthesis
* add unique names to PTransform operations
---
sdks/python/apache_beam/io/gcp/bigquery.py | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/sdks/python/apache_beam/io/gcp/bigquery.py
b/sdks/python/apache_beam/io/gcp/bigquery.py
index 08698b273b1..43bd1702218 100644
--- a/sdks/python/apache_beam/io/gcp/bigquery.py
+++ b/sdks/python/apache_beam/io/gcp/bigquery.py
@@ -140,15 +140,15 @@ events of different types to different tables, and the
table names are
computed at pipeline runtime, one may do something like the following::
with Pipeline() as p:
- elements = (p | beam.Create([
+ elements = (p | 'Create elements' >> beam.Create([
{'type': 'error', 'timestamp': '12:34:56', 'message': 'bad'},
{'type': 'user_log', 'timestamp': '12:34:59', 'query': 'flu symptom'},
]))
- table_names = (p | beam.Create([
+ table_names = (p | 'Create table_names' >> beam.Create([
('error', 'my_project:dataset1.error_table_for_today'),
('user_log', 'my_project:dataset1.query_table_for_today'),
- ])
+ ]))
table_names_dict = beam.pvalue.AsDict(table_names)