# Class CsvOptions (2.65.0)

2.65.0 (latest) 2.62.0 2.61.0 2.60.0 2.59.0 2.58.0 2.57.2 2.56.0 2.55.3 2.54.2 2.53.0 2.52.0 2.51.0 2.50.1 2.49.0 2.48.1 2.47.0 2.46.0 2.45.0 2.44.0 2.43.3 2.42.3 2.41.0 2.40.3 2.39.1 2.38.2 2.37.2 2.36.0 2.35.0 2.34.2 2.33.2

    public final class CsvOptions extends FormatOptions

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

## Inheritance

[Object](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html) \> [FormatOptions](https://docs.cloud.google.com/java/docs/reference/google-cloud-bigquery/latest/com.google.cloud.bigquery.FormatOptions) \> CsvOptions

## Inherited Members

[FormatOptions.avro()](https://docs.cloud.google.com/java/docs/reference/google-cloud-bigquery/latest/com.google.cloud.bigquery.FormatOptions#com_google_cloud_bigquery_FormatOptions_avro__) [FormatOptions.bigtable()](https://docs.cloud.google.com/java/docs/reference/google-cloud-bigquery/latest/com.google.cloud.bigquery.FormatOptions#com_google_cloud_bigquery_FormatOptions_bigtable__) [FormatOptions.csv()](https://docs.cloud.google.com/java/docs/reference/google-cloud-bigquery/latest/com.google.cloud.bigquery.FormatOptions#com_google_cloud_bigquery_FormatOptions_csv__) [FormatOptions.datastoreBackup()](https://docs.cloud.google.com/java/docs/reference/google-cloud-bigquery/latest/com.google.cloud.bigquery.FormatOptions#com_google_cloud_bigquery_FormatOptions_datastoreBackup__) [FormatOptions.equals(Object)](https://docs.cloud.google.com/java/docs/reference/google-cloud-bigquery/latest/com.google.cloud.bigquery.FormatOptions#com_google_cloud_bigquery_FormatOptions_equals_java_lang_Object_) [FormatOptions.getType()](https://docs.cloud.google.com/java/docs/reference/google-cloud-bigquery/latest/com.google.cloud.bigquery.FormatOptions#com_google_cloud_bigquery_FormatOptions_getType__) [FormatOptions.googleSheets()](https://docs.cloud.google.com/java/docs/reference/google-cloud-bigquery/latest/com.google.cloud.bigquery.FormatOptions#com_google_cloud_bigquery_FormatOptions_googleSheets__) [FormatOptions.hashCode()](https://docs.cloud.google.com/java/docs/reference/google-cloud-bigquery/latest/com.google.cloud.bigquery.FormatOptions#com_google_cloud_bigquery_FormatOptions_hashCode__) [FormatOptions.iceberg()](https://docs.cloud.google.com/java/docs/reference/google-cloud-bigquery/latest/com.google.cloud.bigquery.FormatOptions#com_google_cloud_bigquery_FormatOptions_iceberg__) [FormatOptions.json()](https://docs.cloud.google.com/java/docs/reference/google-cloud-bigquery/latest/com.google.cloud.bigquery.FormatOptions#com_google_cloud_bigquery_FormatOptions_json__) [FormatOptions.of(String)](https://docs.cloud.google.com/java/docs/reference/google-cloud-bigquery/latest/com.google.cloud.bigquery.FormatOptions#com_google_cloud_bigquery_FormatOptions_of_java_lang_String_) [FormatOptions.orc()](https://docs.cloud.google.com/java/docs/reference/google-cloud-bigquery/latest/com.google.cloud.bigquery.FormatOptions#com_google_cloud_bigquery_FormatOptions_orc__) [FormatOptions.parquet()](https://docs.cloud.google.com/java/docs/reference/google-cloud-bigquery/latest/com.google.cloud.bigquery.FormatOptions#com_google_cloud_bigquery_FormatOptions_parquet__) [FormatOptions.toString()](https://docs.cloud.google.com/java/docs/reference/google-cloud-bigquery/latest/com.google.cloud.bigquery.FormatOptions#com_google_cloud_bigquery_FormatOptions_toString__) [Object.clone()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#clone--) [Object.finalize()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#finalize--) [Object.getClass()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#getClass--) [Object.notify()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#notify--) [Object.notifyAll()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#notifyAll--) [Object.wait()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait--) [Object.wait(long)](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait-long-) [Object.wait(long,int)](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait-long-int-)

## Static Methods

### newBuilder()

    public static CsvOptions.Builder newBuilder()

Returns a builder for a CsvOptions object.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-bigquery/latest/com.google.cloud.bigquery.CsvOptions.Builder` |   |

## Methods

### allowJaggedRows()

    public Boolean allowJaggedRows()

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()](https://docs.cloud.google.com/java/docs/reference/google-cloud-bigquery/latest/com.google.cloud.bigquery.ExternalTableDefinition#com_google_cloud_bigquery_ExternalTableDefinition_getMaxBadRecords__), an invalid error is
returned in the job result.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/lang/Boolean.html` |   |

### allowQuotedNewLines()

    public Boolean allowQuotedNewLines()

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

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/lang/Boolean.html` |   |

### equals(Object obj)

    public boolean equals(Object obj)

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `obj` | `https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` |   |

**Overrides** [FormatOptions.equals(Object obj)](https://docs.cloud.google.com/java/docs/reference/google-cloud-bigquery/latest/com.google.cloud.bigquery.FormatOptions#com_google_cloud_bigquery_FormatOptions_equals_java_lang_Object_)

### getEncoding()

    public String getEncoding()

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()](https://docs.cloud.google.com/java/docs/reference/google-cloud-bigquery/latest/com.google.cloud.bigquery.CsvOptions#com_google_cloud_bigquery_CsvOptions_getQuote__) and [#getFieldDelimiter()](https://docs.cloud.google.com/java/docs/reference/google-cloud-bigquery/latest/com.google.cloud.bigquery.CsvOptions#com_google_cloud_bigquery_CsvOptions_getFieldDelimiter__).

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` |   |

### getFieldDelimiter()

    public String getFieldDelimiter()

Returns the separator for fields in a CSV file.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` |   |

### getNullMarker()

    public String getNullMarker()

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

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` |   |

### getPreserveAsciiControlCharacters()

    public Boolean getPreserveAsciiControlCharacters()

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

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/lang/Boolean.html` |   |

### getQuote()

    public String getQuote()

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

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` |   |

### getSkipLeadingRows()

    public Long getSkipLeadingRows()

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

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/lang/Long.html` |   |

### hashCode()

    public int hashCode()

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` |   |

**Overrides** [FormatOptions.hashCode()](https://docs.cloud.google.com/java/docs/reference/google-cloud-bigquery/latest/com.google.cloud.bigquery.FormatOptions#com_google_cloud_bigquery_FormatOptions_hashCode__)

### toBuilder()

    public CsvOptions.Builder toBuilder()

Returns a builder for the `CsvOptions` object.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-bigquery/latest/com.google.cloud.bigquery.CsvOptions.Builder` |   |

### toString()

    public String toString()

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` |   |

**Overrides** [FormatOptions.toString()](https://docs.cloud.google.com/java/docs/reference/google-cloud-bigquery/latest/com.google.cloud.bigquery.FormatOptions#com_google_cloud_bigquery_FormatOptions_toString__)