Skip to content

Commit ef669df

Browse files
docs(samples): fix sample issue (#1086)
Fixes b/177938551
1 parent 40e016b commit ef669df

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

samples/snippets/src/main/java/com/example/bigquery/ExtractTableToJson.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ public static void main(String[] args) {
4343

4444
// Note that FormatOptions.json().toString() is not "JSON" but "NEWLINE_DELIMITED_JSON"
4545
// Using FormatOptions Enum for this will prevent problems with unexpected format names.
46-
String dataFormat = FormatOptions.json().toString();
46+
String dataFormat = FormatOptions.json().getType();
4747

4848
extractTableToJson(projectId, datasetName, tableName, destinationUri, dataFormat);
4949
}

samples/snippets/src/test/java/com/example/bigquery/ExtractTableToJsonIT.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ public void testExtractTableToJson() {
7272
String tableName = "shakespeare";
7373
String destinationUri = "gs://" + GCS_BUCKET + "/extractTest.json";
7474
// FormatOptions.json() is not "JSON" but "NEWLINE_DELIMITED_JSON"
75-
String dataFormat = FormatOptions.json().toString();
75+
String dataFormat = FormatOptions.json().getType();
7676

7777
// Extract table content to GCS in JSON format
7878
ExtractTableToJson.extractTableToJson(

0 commit comments

Comments
 (0)