Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
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
  • Loading branch information
yirutang committed Sep 3, 2021
1 parent 8132e52 commit c2dcf6f
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -65,7 +65,7 @@ public static void writePendingStream(String projectId, String datasetName, Stri
// For more information about JsonStreamWriter, see:
// https://googleapis.dev/java/google-cloud-bigquerystorage/latest/com/google/cloud/bigquery/storage/v1beta2/JsonStreamWriter.html
try (JsonStreamWriter writer =
JsonStreamWriter.newBuilder(writeStream.getName(), writeStream.getTableSchema(), client)
JsonStreamWriter.newBuilder(writeStream.getName(), writeStream.getTableSchema())
.build()) {
// Append 10 JSON objects to the stream.
for (int i = 0; i < 10; i++) {
Expand Down

0 comments on commit c2dcf6f

Please sign in to comment.