Class CsvOptions (2.43.3)

publicfinalclass CsvOptionsextendsFormatOptions

Google BigQuery options for CSV format. This class wraps some properties of CSV files used by BigQuery to parse external data.

Inheritance

Object > FormatOptions > CsvOptions

Static Methods

newBuilder()

publicstaticCsvOptions.BuildernewBuilder()

Returns a builder for a CsvOptions object.

Returns
Type Description
CsvOptions.Builder

Methods

allowJaggedRows()

publicBooleanallowJaggedRows()

Returns whether BigQuery should accept rows that are missing trailing optional columns. If true, BigQuery treats missing trailing columns as null values. If false, records with missing trailing columns are treated as bad records, and if the number of bad records exceeds ExternalTableDefinition#getMaxBadRecords(), an invalid error is returned in the job result.

Returns
Type Description
Boolean

allowQuotedNewLines()

publicBooleanallowQuotedNewLines()

Returns whether BigQuery should allow quoted data sections that contain newline characters in a CSV file.

Returns
Type Description
Boolean

equals(Object obj)

publicbooleanequals(Objectobj)
Parameter
Name Description
obj Object
Returns
Type Description
boolean
Overrides

getEncoding()

publicStringgetEncoding()

Returns the character encoding of the data. The supported values are UTF-8 or ISO-8859-1. If not set, UTF-8 is used. BigQuery decodes the data after the raw, binary data has been split using the values set in #getQuote() and #getFieldDelimiter().

Returns
Type Description
String

getFieldDelimiter()

publicStringgetFieldDelimiter()

Returns the separator for fields in a CSV file.

Returns
Type Description
String

getNullMarker()

publicStringgetNullMarker()

Returns the string that represents a null value in a CSV file.

Returns
Type Description
String

getPreserveAsciiControlCharacters()

publicBooleangetPreserveAsciiControlCharacters()

Returns whether BigQuery should allow ascii control characters in a CSV file. By default ascii control characters are not allowed.

Returns
Type Description
Boolean

getQuote()

publicStringgetQuote()

Returns the value that is used to quote data sections in a CSV file.

Returns
Type Description
String

getSkipLeadingRows()

publicLonggetSkipLeadingRows()

Returns the number of rows at the top of a CSV file that BigQuery will skip when reading the data.

Returns
Type Description
Long

hashCode()

publicinthashCode()
Returns
Type Description
int
Overrides

toBuilder()

publicCsvOptions.BuildertoBuilder()

Returns a builder for the CsvOptions object.

Returns
Type Description
CsvOptions.Builder

toString()

publicStringtoString()
Returns
Type Description
String
Overrides

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025年10月30日 UTC.