Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -285,14 +285,17 @@ public void validate(@Nullable PipelineOptions maybeOptions) {
PipelineOptions options = Preconditions.checkArgumentNotNull(maybeOptions);
// We will use a BigQuery load job -- validate the temp location.
String tempLocation;
if (customGcsTempLocation == null || customGcsTempLocation.get() == null) {
if (customGcsTempLocation == null) {
tempLocation = options.getTempLocation();
} else {
if (!customGcsTempLocation.isAccessible()) {
// Can't perform verification in this case.
return;
} else if (Strings.isNullOrEmpty(customGcsTempLocation.get())) {
tempLocation = options.getTempLocation();
} else {
tempLocation = customGcsTempLocation.get();
}
tempLocation = customGcsTempLocation.get();
}
checkArgument(
!Strings.isNullOrEmpty(tempLocation),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4444,6 +4444,8 @@ public void testUpsertAndDeleteBeamRows() throws Exception {

@Test
public void testCustomGcsTempLocationNull() throws Exception {
assumeTrue(!useStreaming);
assumeTrue(!useStorageApi);
BigQueryIO.Write<TableRow> write =
BigQueryIO.writeTableRows()
.to("dataset-id.table-id")
Expand Down
Loading