public static final class CsvOptions.Builder extends Object
Modifier and Type | Method and Description |
---|---|
CsvOptions |
build()
Creates a
CsvOptions object. |
CsvOptions.Builder |
setAllowJaggedRows(boolean allowJaggedRows)
Set whether BigQuery should accept rows that are missing trailing optional columns.
|
CsvOptions.Builder |
setAllowQuotedNewLines(boolean allowQuotedNewLines)
Sets whether BigQuery should allow quoted data sections that contain newline characters in a
CSV file.
|
CsvOptions.Builder |
setEncoding(Charset encoding)
Sets the character encoding of the data.
|
CsvOptions.Builder |
setEncoding(String encoding)
Sets the character encoding of the data.
|
CsvOptions.Builder |
setFieldDelimiter(String fieldDelimiter)
Sets the separator for fields in a CSV file.
|
CsvOptions.Builder |
setPreserveAsciiControlCharacters(boolean preserveAsciiControlCharacters)
Sets whether BigQuery should allow ASCII control characters in a CSV file.
|
CsvOptions.Builder |
setQuote(String quote)
Sets the value that is used to quote data sections in a CSV file.
|
CsvOptions.Builder |
setSkipLeadingRows(long skipLeadingRows)
Sets the number of rows at the top of a CSV file that BigQuery will skip when reading the
data.
|
public CsvOptions.Builder setAllowJaggedRows(boolean allowJaggedRows)
true
, BigQuery treats missing trailing columns as null values. If false
, records
with missing trailing columns are treated as bad records, and if there are too many bad
records, an invalid error is returned in the job result. By default, rows with missing
trailing columns are considered bad records.public CsvOptions.Builder setAllowQuotedNewLines(boolean allowQuotedNewLines)
public CsvOptions.Builder setEncoding(String encoding)
setQuote(String)
and setFieldDelimiter(String)
.public CsvOptions.Builder setEncoding(Charset encoding)
setQuote(String)
and setFieldDelimiter(String)
.public CsvOptions.Builder setFieldDelimiter(String fieldDelimiter)
public CsvOptions.Builder setQuote(String quote)
setAllowQuotedNewLines(boolean)
property to true
.public CsvOptions.Builder setSkipLeadingRows(long skipLeadingRows)
public CsvOptions.Builder setPreserveAsciiControlCharacters(boolean preserveAsciiControlCharacters)
public CsvOptions build()
CsvOptions
object.Copyright © 2023 Google LLC. All rights reserved.