Skip to content

Commit c2dcf6f

Browse files
authored
fix: Cannot share client between appendRows and other function becaus… (#1290)
…e appendRows needs to recreate the client to manually inject headers need for regionalization
1 parent 8132e52 commit c2dcf6f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ public static void writePendingStream(String projectId, String datasetName, Stri
6565
// For more information about JsonStreamWriter, see:
6666
// https://googleapis.dev/java/google-cloud-bigquerystorage/latest/com/google/cloud/bigquery/storage/v1beta2/JsonStreamWriter.html
6767
try (JsonStreamWriter writer =
68-
JsonStreamWriter.newBuilder(writeStream.getName(), writeStream.getTableSchema(), client)
68+
JsonStreamWriter.newBuilder(writeStream.getName(), writeStream.getTableSchema())
6969
.build()) {
7070
// Append 10 JSON objects to the stream.
7171
for (int i = 0; i < 10; i++) {

0 commit comments

Comments
 (0)