You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@beam.apache.org by jo...@apache.org on 2023/07/05 15:29:03 UTC

[beam] branch master updated: Update Storage Write API Autosharding documentation (#27316)

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

johncasey 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 4a7a2579c70 Update Storage Write API Autosharding documentation (#27316)
4a7a2579c70 is described below

commit 4a7a2579c70ac93cc3a2cc657ad602d07a164100
Author: Ahmed Abualsaud <65...@users.noreply.github.com>
AuthorDate: Wed Jul 5 15:28:56 2023 +0000

    Update Storage Write API Autosharding documentation (#27316)
    
    * update documentation
    
    * Add some styling
---
 .../java/org/apache/beam/sdk/io/gcp/bigquery/BigQueryIO.java  |  2 +-
 .../content/en/documentation/io/built-in/google-bigquery.md   | 11 ++++++++---
 2 files changed, 9 insertions(+), 4 deletions(-)

diff --git a/sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/bigquery/BigQueryIO.java b/sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/bigquery/BigQueryIO.java
index 8ef39ca9cf9..4dba52a9e7c 100644
--- a/sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/bigquery/BigQueryIO.java
+++ b/sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/bigquery/BigQueryIO.java
@@ -2918,7 +2918,7 @@ public class BigQueryIO {
 
     /**
      * If true, enables using a dynamically determined number of shards to write to BigQuery. This
-     * can be used for both {@link Method#FILE_LOADS}, {@link Method#STREAMING_INSERTS} and {@link
+     * can be used for {@link Method#FILE_LOADS}, {@link Method#STREAMING_INSERTS} and {@link
      * Method#STORAGE_WRITE_API}. Only applicable to unbounded data. If using {@link
      * Method#FILE_LOADS}, numFileShards set via {@link #withNumFileShards} will be ignored.
      */
diff --git a/website/www/site/content/en/documentation/io/built-in/google-bigquery.md b/website/www/site/content/en/documentation/io/built-in/google-bigquery.md
index 61ff8c74e6d..c0530370a47 100644
--- a/website/www/site/content/en/documentation/io/built-in/google-bigquery.md
+++ b/website/www/site/content/en/documentation/io/built-in/google-bigquery.md
@@ -859,9 +859,14 @@ the BigQuery service, so you should use only as many streams as needed for your
 use case. Triggering frequency in single-digit seconds is a good choice for most
 pipelines.
 
-Currently, `STORAGE_WRITE_API` doesn’t support
-[`withAutoSharding`](https://beam.apache.org/releases/javadoc/current/org/apache/beam/sdk/io/gcp/bigquery/BigQueryIO.Write.html#withAutoSharding--).
-The method will be supported in a future release.
+{{< paragraph class="language-java" wrap="span">}}
+Similar to streaming inserts, `STORAGE_WRITE_API` supports dynamically determining
+the number of parallel streams to write to BigQuery (starting 2.42.0). You can
+explicitly enable this using [`withAutoSharding`](https://beam.apache.org/releases/javadoc/current/org/apache/beam/sdk/io/gcp/bigquery/BigQueryIO.Write.html#withAutoSharding--).
+
+***Note:*** `STORAGE_WRITE_API` will default to dynamic sharding when
+`numStorageWriteApiStreams` is set to 0 or is unspecified.
+{{< /paragraph >}}
 
 When using `STORAGE_WRITE_API`, the PCollection returned by
 [`WriteResult.getFailedInserts`](https://beam.apache.org/releases/javadoc/current/org/apache/beam/sdk/io/gcp/bigquery/WriteResult.html#getFailedInserts--)