Skip to content
Permalink
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
  • Loading branch information
anguillanneuf committed Jun 29, 2021
1 parent 427aa78 commit fc4a5c061f51d83e41109ebf04f4202276410e30
@@ -183,9 +183,8 @@ private void setStreamWriterSettings(
* StreamWriter by default.
*
* @param streamOrTableName name of the stream that must follow
* "projects/[^/]+/datasets/[^/]+/tables/[^/]+/streams/[^/]+" or if it is default stream
* (createDefaultStream is true on builder), then the name here should be a table name
* ""projects/[^/]+/datasets/[^/]+/tables/[^/]+"
* "projects/[^/]+/datasets/[^/]+/tables/[^/]+/streams/[^/]+" or table name
* "projects/[^/]+/datasets/[^/]+/tables/[^/]+"
* @param tableSchema The schema of the table when the stream was created, which is passed back
* through {@code WriteStream}
* @return Builder
@@ -260,7 +259,7 @@ public static final class Builder {
*
* @param streamOrTableName name of the stream that must follow
* "projects/[^/]+/datasets/[^/]+/tables/[^/]+/streams/[^/]+" or
* "projects/[^/]+/datasets/[^/]+/tables/[^/]+/_default"
* "projects/[^/]+/datasets/[^/]+/tables/[^/]+"
* @param tableSchema schema used to convert Json to proto messages.
* @param client
*/
@@ -52,7 +52,7 @@ public static void writeToDefaultStream(String projectId, String datasetName, St

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

0 comments on commit fc4a5c0

Please sign in to comment.