This is an automated email from the ASF dual-hosted git repository.

cvandermerwe 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 9eb3a18ae70 fix conflict (#37594)
9eb3a18ae70 is described below

commit 9eb3a18ae70a4dc08a50f23e31b472fc0238fecc
Author: Derrick Williams <[email protected]>
AuthorDate: Thu Feb 26 09:53:00 2026 -0500

    fix conflict (#37594)
---
 .../yaml/examples/testing/examples_test.py         |  3 +-
 .../examples/transforms/io/bigquery_write.yaml     | 59 ++++++++++++++++++++++
 2 files changed, 61 insertions(+), 1 deletion(-)

diff --git a/sdks/python/apache_beam/yaml/examples/testing/examples_test.py 
b/sdks/python/apache_beam/yaml/examples/testing/examples_test.py
index 15cf46218e8..ef900090c39 100644
--- a/sdks/python/apache_beam/yaml/examples/testing/examples_test.py
+++ b/sdks/python/apache_beam/yaml/examples/testing/examples_test.py
@@ -683,7 +683,8 @@ def _kafka_test_preprocessor(
     'test_wordCountInclude_yaml',
     'test_wordCountImport_yaml',
     'test_wordCountInheritance_yaml',
-    'test_iceberg_to_alloydb_yaml'
+    'test_iceberg_to_alloydb_yaml',
+    'test_bigquery_write_yaml'
 ])
 def _io_write_test_preprocessor(
     test_spec: dict, expected: List[str], env: TestEnvironment):
diff --git 
a/sdks/python/apache_beam/yaml/examples/transforms/io/bigquery_write.yaml 
b/sdks/python/apache_beam/yaml/examples/transforms/io/bigquery_write.yaml
new file mode 100644
index 00000000000..bc3fd50f202
--- /dev/null
+++ b/sdks/python/apache_beam/yaml/examples/transforms/io/bigquery_write.yaml
@@ -0,0 +1,59 @@
+# coding=utf-8
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#    http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+# This pipeline demonstrates a simple write to BigQuery using Dynamic 
Destinations 
+# (see 
https://cloud.google.com/dataflow/docs/guides/managed-io#dynamic-destinations).
+#
+# Prerequisites:
+# - A GCP project
+# - A BigQuery dataset
+# - Google Cloud credentials set up
+#
+# Usage:
+# python -m apache_beam.yaml.main 
--yaml_pipeline_file=<path_to_bigquery_write.yaml> \
+#   --project=<project_id> \
+#   --temp_location=gs://<bucket_name>/temp
+
+pipeline:
+  type: chain
+  transforms:
+    - type: Create
+      name: CreateSampleData
+      config:
+        elements:
+          - {id: 1, name: "Alice", country: "CN"}
+          - {id: 2, name: "Bob", country: "UK"}
+          - {id: 3, name: "Charlie", country: "US"}
+    - type: WriteToBigQuery
+      name: WriteToTable
+      config:
+        table: "<project_id>:<dataset_id>.users_{country}"
+        create_disposition: CREATE_IF_NEEDED
+        write_disposition: WRITE_APPEND
+        num_streams: 1
+
+options:
+  temp_location: "gs://<bucket_name>/temp"
+
+# Expected:
+#  Row(id=1, name='Alice', country='CN')
+#  Row(id=2, name='Bob', country='UK')
+#  Row(id=3, name='Charlie', country='US')
+
+
+

Reply via email to