Skip to content
This repository was archived by the owner on Feb 24, 2026. It is now read-only.

Commit fc4a5c0

Browse files
docs: user-provided streamOrTableName for default write streams (#1155)
* samples: correct non-existent url * docs: user-provided streamOrTableName does not end with _default * lint
1 parent 427aa78 commit fc4a5c0

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

google-cloud-bigquerystorage/src/main/java/com/google/cloud/bigquery/storage/v1beta2/JsonStreamWriter.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -183,9 +183,8 @@ private void setStreamWriterSettings(
183183
* StreamWriter by default.
184184
*
185185
* @param streamOrTableName name of the stream that must follow
186-
* "projects/[^/]+/datasets/[^/]+/tables/[^/]+/streams/[^/]+" or if it is default stream
187-
* (createDefaultStream is true on builder), then the name here should be a table name
188-
* ""projects/[^/]+/datasets/[^/]+/tables/[^/]+"
186+
* "projects/[^/]+/datasets/[^/]+/tables/[^/]+/streams/[^/]+" or table name
187+
* "projects/[^/]+/datasets/[^/]+/tables/[^/]+"
189188
* @param tableSchema The schema of the table when the stream was created, which is passed back
190189
* through {@code WriteStream}
191190
* @return Builder
@@ -260,7 +259,7 @@ public static final class Builder {
260259
*
261260
* @param streamOrTableName name of the stream that must follow
262261
* "projects/[^/]+/datasets/[^/]+/tables/[^/]+/streams/[^/]+" or
263-
* "projects/[^/]+/datasets/[^/]+/tables/[^/]+/_default"
262+
* "projects/[^/]+/datasets/[^/]+/tables/[^/]+"
264263
* @param tableSchema schema used to convert Json to proto messages.
265264
* @param client
266265
*/

samples/snippets/src/main/java/com/example/bigquerystorage/WriteToDefaultStream.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ public static void writeToDefaultStream(String projectId, String datasetName, St
5252

5353
// Use the JSON stream writer to send records in JSON format.
5454
// For more information about JsonStreamWriter, see:
55-
// https://googleapis.dev/java/google-cloud-bigquerystorage/latest/com/google/cloud/bigquery/storage/v1beta2/JstreamWriter.html
55+
// https://googleapis.dev/java/google-cloud-bigquerystorage/latest/com/google/cloud/bigquery/storage/v1beta2/JsonStreamWriter.html
5656
try (JsonStreamWriter writer =
5757
JsonStreamWriter.newBuilder(parentTable.toString(), schema).build()) {
5858
// Append 10 JSON objects to the stream.

0 commit comments

Comments
 (0)