@@ -62,7 +62,7 @@ public com.google.api.services.bigquery.model.ExternalDataConfiguration apply(
6262 private static final long serialVersionUID = -8004288831035566549L ;
6363
6464 private final List <String > sourceUris ;
65- private final TableSchema schema ;
65+ private final Schema schema ;
6666 private final String sourceFormat ;
6767 private final Integer maxBadRecords ;
6868 private final Boolean ignoreUnknownValues ;
@@ -72,7 +72,7 @@ public com.google.api.services.bigquery.model.ExternalDataConfiguration apply(
7272 public static final class Builder {
7373
7474 private List <String > sourceUris ;
75- private TableSchema schema ;
75+ private Schema schema ;
7676 private String sourceFormat ;
7777 private Integer maxBadRecords ;
7878 private Boolean ignoreUnknownValues ;
@@ -97,13 +97,15 @@ public Builder sourceUris(List<String> sourceUris) {
9797 /**
9898 * Sets the schema for the external data.
9999 */
100- public Builder schema (TableSchema schema ) {
100+ public Builder schema (Schema schema ) {
101101 this .schema = checkNotNull (schema );
102102 return this ;
103103 }
104104
105105 /**
106- * Sets the source format of the external data.
106+ * Sets the source format of the external data. Supported values are {@code CSV} for CSV files,
107+ * and {@code NEWLINE_DELIMITED_JSON} for newline-delimited JSON. If not set, files are assumed
108+ * to be in CSV format.
107109 *
108110 * <a href="https://cloud.google.com/bigquery/docs/reference/v2/tables#externalDataConfiguration.sourceFormat">
109111 * Source Format</a>
@@ -212,7 +214,7 @@ public Integer maxBadRecords() {
212214 /**
213215 * Returns the schema for the external data.
214216 */
215- public TableSchema schema () {
217+ public Schema schema () {
216218 return schema ;
217219 }
218220
@@ -327,7 +329,7 @@ com.google.api.services.bigquery.model.ExternalDataConfiguration toPb() {
327329 * @see <a href="https://cloud.google.com/bigquery/docs/reference/v2/tables#externalDataConfiguration.sourceFormat">
328330 * Source Format</a>
329331 */
330- public static Builder builder (List <String > sourceUris , TableSchema schema , String format ) {
332+ public static Builder builder (List <String > sourceUris , Schema schema , String format ) {
331333 return new Builder ().sourceUris (sourceUris ).schema (schema ).sourceFormat (format );
332334 }
333335
@@ -345,7 +347,7 @@ public static Builder builder(List<String> sourceUris, TableSchema schema, Strin
345347 * @see <a href="https://cloud.google.com/bigquery/docs/reference/v2/tables#externalDataConfiguration.sourceFormat">
346348 * Source Format</a>
347349 */
348- public static Builder builder (String sourceUri , TableSchema schema , String format ) {
350+ public static Builder builder (String sourceUri , Schema schema , String format ) {
349351 return new Builder ()
350352 .sourceUris (ImmutableList .of (sourceUri ))
351353 .schema (schema )
@@ -368,7 +370,7 @@ public static Builder builder(String sourceUri, TableSchema schema, String forma
368370 * Source Format</a>
369371 */
370372 public static ExternalDataConfiguration of (
371- List <String > sourceUris , TableSchema schema , String format ) {
373+ List <String > sourceUris , Schema schema , String format ) {
372374 return builder (sourceUris , schema , format ).build ();
373375 }
374376
@@ -386,7 +388,7 @@ public static ExternalDataConfiguration of(
386388 * @see <a href="https://cloud.google.com/bigquery/docs/reference/v2/tables#externalDataConfiguration.sourceFormat">
387389 * Source Format</a>
388390 */
389- public static ExternalDataConfiguration of (String sourceUri , TableSchema schema , String format ) {
391+ public static ExternalDataConfiguration of (String sourceUri , Schema schema , String format ) {
390392 return builder (sourceUri , schema , format ).build ();
391393 }
392394
@@ -397,7 +399,7 @@ static ExternalDataConfiguration fromPb(
397399 builder .sourceUris (externalDataConfiguration .getSourceUris ());
398400 }
399401 if (externalDataConfiguration .getSchema () != null ) {
400- builder .schema (TableSchema .fromPb (externalDataConfiguration .getSchema ()));
402+ builder .schema (Schema .fromPb (externalDataConfiguration .getSchema ()));
401403 }
402404 if (externalDataConfiguration .getSourceFormat () != null ) {
403405 builder .sourceFormat (externalDataConfiguration .getSourceFormat ());
0 commit comments