# Class Table (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 class Table extends TableInfo

A Google BigQuery Table.

Objects of this class are immutable. Operations that modify the table like [#update](https://docs.cloud.google.com/java/docs/reference/google-cloud-bigquery/latest/com.google.cloud.bigquery.Table#com_google_cloud_bigquery_Table_update_)
return a new object. To get a `Table` object with the most recent information use [#reload](https://docs.cloud.google.com/java/docs/reference/google-cloud-bigquery/latest/com.google.cloud.bigquery.Table#com_google_cloud_bigquery_Table_reload_). `Table` adds a layer of service-related functionality over [TableInfo](https://docs.cloud.google.com/java/docs/reference/google-cloud-bigquery/latest/com.google.cloud.bigquery.TableInfo).

## Inheritance

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

## Inherited Members

[TableInfo.\<T\>getDefinition()](https://docs.cloud.google.com/java/docs/reference/google-cloud-bigquery/latest/com.google.cloud.bigquery.TableInfo#com_google_cloud_bigquery_TableInfo__T_getDefinition__) [TableInfo.equals(Object)](https://docs.cloud.google.com/java/docs/reference/google-cloud-bigquery/latest/com.google.cloud.bigquery.TableInfo#com_google_cloud_bigquery_TableInfo_equals_java_lang_Object_) [TableInfo.getCloneDefinition()](https://docs.cloud.google.com/java/docs/reference/google-cloud-bigquery/latest/com.google.cloud.bigquery.TableInfo#com_google_cloud_bigquery_TableInfo_getCloneDefinition__) [TableInfo.getCreationTime()](https://docs.cloud.google.com/java/docs/reference/google-cloud-bigquery/latest/com.google.cloud.bigquery.TableInfo#com_google_cloud_bigquery_TableInfo_getCreationTime__) [TableInfo.getDefaultCollation()](https://docs.cloud.google.com/java/docs/reference/google-cloud-bigquery/latest/com.google.cloud.bigquery.TableInfo#com_google_cloud_bigquery_TableInfo_getDefaultCollation__) [TableInfo.getDescription()](https://docs.cloud.google.com/java/docs/reference/google-cloud-bigquery/latest/com.google.cloud.bigquery.TableInfo#com_google_cloud_bigquery_TableInfo_getDescription__) [TableInfo.getEncryptionConfiguration()](https://docs.cloud.google.com/java/docs/reference/google-cloud-bigquery/latest/com.google.cloud.bigquery.TableInfo#com_google_cloud_bigquery_TableInfo_getEncryptionConfiguration__) [TableInfo.getEtag()](https://docs.cloud.google.com/java/docs/reference/google-cloud-bigquery/latest/com.google.cloud.bigquery.TableInfo#com_google_cloud_bigquery_TableInfo_getEtag__) [TableInfo.getExpirationTime()](https://docs.cloud.google.com/java/docs/reference/google-cloud-bigquery/latest/com.google.cloud.bigquery.TableInfo#com_google_cloud_bigquery_TableInfo_getExpirationTime__) [TableInfo.getFriendlyName()](https://docs.cloud.google.com/java/docs/reference/google-cloud-bigquery/latest/com.google.cloud.bigquery.TableInfo#com_google_cloud_bigquery_TableInfo_getFriendlyName__) [TableInfo.getGeneratedId()](https://docs.cloud.google.com/java/docs/reference/google-cloud-bigquery/latest/com.google.cloud.bigquery.TableInfo#com_google_cloud_bigquery_TableInfo_getGeneratedId__) [TableInfo.getLabels()](https://docs.cloud.google.com/java/docs/reference/google-cloud-bigquery/latest/com.google.cloud.bigquery.TableInfo#com_google_cloud_bigquery_TableInfo_getLabels__) [TableInfo.getLastModifiedTime()](https://docs.cloud.google.com/java/docs/reference/google-cloud-bigquery/latest/com.google.cloud.bigquery.TableInfo#com_google_cloud_bigquery_TableInfo_getLastModifiedTime__) [TableInfo.getNumActiveLogicalBytes()](https://docs.cloud.google.com/java/docs/reference/google-cloud-bigquery/latest/com.google.cloud.bigquery.TableInfo#com_google_cloud_bigquery_TableInfo_getNumActiveLogicalBytes__) [TableInfo.getNumActivePhysicalBytes()](https://docs.cloud.google.com/java/docs/reference/google-cloud-bigquery/latest/com.google.cloud.bigquery.TableInfo#com_google_cloud_bigquery_TableInfo_getNumActivePhysicalBytes__) [TableInfo.getNumBytes()](https://docs.cloud.google.com/java/docs/reference/google-cloud-bigquery/latest/com.google.cloud.bigquery.TableInfo#com_google_cloud_bigquery_TableInfo_getNumBytes__) [TableInfo.getNumLongTermBytes()](https://docs.cloud.google.com/java/docs/reference/google-cloud-bigquery/latest/com.google.cloud.bigquery.TableInfo#com_google_cloud_bigquery_TableInfo_getNumLongTermBytes__) [TableInfo.getNumLongTermLogicalBytes()](https://docs.cloud.google.com/java/docs/reference/google-cloud-bigquery/latest/com.google.cloud.bigquery.TableInfo#com_google_cloud_bigquery_TableInfo_getNumLongTermLogicalBytes__) [TableInfo.getNumLongTermPhysicalBytes()](https://docs.cloud.google.com/java/docs/reference/google-cloud-bigquery/latest/com.google.cloud.bigquery.TableInfo#com_google_cloud_bigquery_TableInfo_getNumLongTermPhysicalBytes__) [TableInfo.getNumRows()](https://docs.cloud.google.com/java/docs/reference/google-cloud-bigquery/latest/com.google.cloud.bigquery.TableInfo#com_google_cloud_bigquery_TableInfo_getNumRows__) [TableInfo.getNumTimeTravelPhysicalBytes()](https://docs.cloud.google.com/java/docs/reference/google-cloud-bigquery/latest/com.google.cloud.bigquery.TableInfo#com_google_cloud_bigquery_TableInfo_getNumTimeTravelPhysicalBytes__) [TableInfo.getNumTotalLogicalBytes()](https://docs.cloud.google.com/java/docs/reference/google-cloud-bigquery/latest/com.google.cloud.bigquery.TableInfo#com_google_cloud_bigquery_TableInfo_getNumTotalLogicalBytes__) [TableInfo.getNumTotalPhysicalBytes()](https://docs.cloud.google.com/java/docs/reference/google-cloud-bigquery/latest/com.google.cloud.bigquery.TableInfo#com_google_cloud_bigquery_TableInfo_getNumTotalPhysicalBytes__) [TableInfo.getOtelAttributes()](https://docs.cloud.google.com/java/docs/reference/google-cloud-bigquery/latest/com.google.cloud.bigquery.TableInfo#com_google_cloud_bigquery_TableInfo_getOtelAttributes__) [TableInfo.getRequirePartitionFilter()](https://docs.cloud.google.com/java/docs/reference/google-cloud-bigquery/latest/com.google.cloud.bigquery.TableInfo#com_google_cloud_bigquery_TableInfo_getRequirePartitionFilter__) [TableInfo.getResourceTags()](https://docs.cloud.google.com/java/docs/reference/google-cloud-bigquery/latest/com.google.cloud.bigquery.TableInfo#com_google_cloud_bigquery_TableInfo_getResourceTags__) [TableInfo.getSelfLink()](https://docs.cloud.google.com/java/docs/reference/google-cloud-bigquery/latest/com.google.cloud.bigquery.TableInfo#com_google_cloud_bigquery_TableInfo_getSelfLink__) [TableInfo.getTableConstraints()](https://docs.cloud.google.com/java/docs/reference/google-cloud-bigquery/latest/com.google.cloud.bigquery.TableInfo#com_google_cloud_bigquery_TableInfo_getTableConstraints__) [TableInfo.getTableId()](https://docs.cloud.google.com/java/docs/reference/google-cloud-bigquery/latest/com.google.cloud.bigquery.TableInfo#com_google_cloud_bigquery_TableInfo_getTableId__) [TableInfo.hashCode()](https://docs.cloud.google.com/java/docs/reference/google-cloud-bigquery/latest/com.google.cloud.bigquery.TableInfo#com_google_cloud_bigquery_TableInfo_hashCode__) [TableInfo.newBuilder(TableId,TableDefinition)](https://docs.cloud.google.com/java/docs/reference/google-cloud-bigquery/latest/com.google.cloud.bigquery.TableInfo#com_google_cloud_bigquery_TableInfo_newBuilder_com_google_cloud_bigquery_TableId_com_google_cloud_bigquery_TableDefinition_) [TableInfo.of(TableId,TableDefinition)](https://docs.cloud.google.com/java/docs/reference/google-cloud-bigquery/latest/com.google.cloud.bigquery.TableInfo#com_google_cloud_bigquery_TableInfo_of_com_google_cloud_bigquery_TableId_com_google_cloud_bigquery_TableDefinition_) [TableInfo.toBuilder()](https://docs.cloud.google.com/java/docs/reference/google-cloud-bigquery/latest/com.google.cloud.bigquery.TableInfo#com_google_cloud_bigquery_TableInfo_toBuilder__) [TableInfo.toString()](https://docs.cloud.google.com/java/docs/reference/google-cloud-bigquery/latest/com.google.cloud.bigquery.TableInfo#com_google_cloud_bigquery_TableInfo_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-)

## Methods

### copy(TableId destinationTable, BigQuery.JobOption\[\] options)

    public Job copy(TableId destinationTable, BigQuery.JobOption[] options)

Starts a BigQuery Job to copy the current table to the provided destination table. Returns the
started [Job](https://docs.cloud.google.com/java/docs/reference/google-cloud-bigquery/latest/com.google.cloud.bigquery.Job) object.

Example copying the table to a destination table.


     String dataset = "my_dataset";
     String tableName = "my_destination_table";
     TableId destinationId = TableId.of(dataset, tableName);
     JobOption options = JobOption.fields(JobField.STATUS, JobField.USER_EMAIL);
     Job job = table.copy(destinationId, options);
     // Wait for the job to complete.
     try {
       Job completedJob = job.waitFor(RetryOption.initialRetryDelay(Duration.ofSeconds(1)),
           RetryOption.totalTimeout(Duration.ofMinutes(3)));
       if (completedJob != null && completedJob.getStatus().getError() == null) {
         // Job completed successfully.
       } else {
         // Handle error case.
       }
     } catch (InterruptedException e) {
       // Handle interrupted wait
     }
     
| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `destinationTable` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-bigquery/latest/com.google.cloud.bigquery.TableId` the destination table of the copy job |
| `options` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-bigquery/latest/com.google.cloud.bigquery.BigQuery.JobOption[]` job options |

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

| **Exceptions** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-bigquery/latest/com.google.cloud.bigquery.BigQueryException` | upon failure |

### copy(String destinationDataset, String destinationTable, BigQuery.JobOption\[\] options)

    public Job copy(String destinationDataset, String destinationTable, BigQuery.JobOption[] options)

Starts a BigQuery Job to copy the current table to the provided destination table. Returns the
started [Job](https://docs.cloud.google.com/java/docs/reference/google-cloud-bigquery/latest/com.google.cloud.bigquery.Job) object.

Example of copying the table to a destination table.


     String datasetName = "my_dataset";
     String tableName = "my_destination_table";
     Job job = table.copy(datasetName, tableName);
     // Wait for the job to complete.
     try {
       Job completedJob = job.waitFor(RetryOption.initialRetryDelay(Duration.ofSeconds(1)),
           RetryOption.totalTimeout(Duration.ofMinutes(3)));
       if (completedJob != null && completedJob.getStatus().getError() == null) {
         // Job completed successfully
       } else {
         // Handle error case
       }
     } catch (InterruptedException e) {
       // Handle interrupted wait
     }
     
| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `destinationDataset` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` the user-defined id of the destination dataset |
| `destinationTable` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` the user-defined id of the destination table |
| `options` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-bigquery/latest/com.google.cloud.bigquery.BigQuery.JobOption[]` job options |

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

| **Exceptions** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-bigquery/latest/com.google.cloud.bigquery.BigQueryException` | upon failure |

### delete()

    public boolean delete()

Deletes this table.

Example of deleting the table.


     boolean deleted = table.delete();
     if (deleted) {
       // the table was deleted
     } else {
       // the table was not found
     }
     
| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | `true` if table was deleted, `false` if it was not found |

### equals(Object obj)

    public final 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** [TableInfo.equals(Object obj)](https://docs.cloud.google.com/java/docs/reference/google-cloud-bigquery/latest/com.google.cloud.bigquery.TableInfo#com_google_cloud_bigquery_TableInfo_equals_java_lang_Object_)

### exists()

    public boolean exists()

Checks if this table exists.

Example of checking if the table exists.


     boolean exists = table.exists();
     if (exists) {
       // the table exists
     } else {
       // the table was not found
     }
     
| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | `true` if this table exists, `false` otherwise |

### extract(String format, String destinationUri, BigQuery.JobOption\[\] options)

    public Job extract(String format, String destinationUri, BigQuery.JobOption[] options)

Starts a BigQuery Job to extract the current table to the provided destination URI. Returns the
started [Job](https://docs.cloud.google.com/java/docs/reference/google-cloud-bigquery/latest/com.google.cloud.bigquery.Job) object.

Example extracting data to single Google Cloud Storage file.


     String format = "CSV";
     String gcsUrl = "gs://my_bucket/filename.csv";
     Job job = table.extract(format, gcsUrl);
     // Wait for the job to complete
     try {
       Job completedJob = job.waitFor(RetryOption.initialRetryDelay(Duration.ofSeconds(1)),
           RetryOption.totalTimeout(Duration.ofMinutes(3)));
       if (completedJob != null && completedJob.getStatus().getError() == null) {
         // Job completed successfully
       } else {
         // Handle error case
       }
     } catch (InterruptedException e) {
       // Handle interrupted wait
     }
     
| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `format` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` the format of the extracted data |
| `destinationUri` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` the fully-qualified Google Cloud Storage URI (e.g. gs://bucket/path) where the extracted table should be written |
| `options` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-bigquery/latest/com.google.cloud.bigquery.BigQuery.JobOption[]` job options |

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

| **Exceptions** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-bigquery/latest/com.google.cloud.bigquery.BigQueryException` | upon failure |

### extract(String format, List\<String\> destinationUris, BigQuery.JobOption\[\] options)

    public Job extract(String format, List<String> destinationUris, BigQuery.JobOption[] options)

Starts a BigQuery Job to extract the current table to the provided destination URIs. Returns
the started [Job](https://docs.cloud.google.com/java/docs/reference/google-cloud-bigquery/latest/com.google.cloud.bigquery.Job) object.

Example of partitioning data to a list of Google Cloud Storage files.


     String format = "CSV";
     String gcsUrl1 = "gs://my_bucket/PartitionA_*.csv";
     String gcsUrl2 = "gs://my_bucket/PartitionB_*.csv";
     List<String> destinationUris = new ArrayList<>();
     destinationUris.add(gcsUrl1);
     destinationUris.add(gcsUrl2);
     Job job = table.extract(format, destinationUris);
     // Wait for the job to complete
     try {
       Job completedJob = job.waitFor(RetryOption.initialRetryDelay(Duration.ofSeconds(1)),
           RetryOption.totalTimeout(Duration.ofMinutes(3)));
       if (completedJob != null && completedJob.getStatus().getError() == null) {
         // Job completed successfully
       } else {
         // Handle error case
       }
     } catch (InterruptedException e) {
       // Handle interrupted wait
     }
     
| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `format` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` the format of the exported data |
| `destinationUris` | `https://docs.oracle.com/javase/8/docs/api/java/util/List.html<https://docs.oracle.com/javase/8/docs/api/java/lang/String.html>` the fully-qualified Google Cloud Storage URIs (e.g. gs://bucket/path) where the extracted table should be written |
| `options` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-bigquery/latest/com.google.cloud.bigquery.BigQuery.JobOption[]` job options |

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

| **Exceptions** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-bigquery/latest/com.google.cloud.bigquery.BigQueryException` | upon failure |

### getBigQuery()

    public BigQuery getBigQuery()

Returns the table's `BigQuery` object used to issue requests.

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

### hashCode()

    public final int hashCode()

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

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

### insert(Iterable\<InsertAllRequest.RowToInsert\> rows)

    public InsertAllResponse insert(Iterable<InsertAllRequest.RowToInsert> rows)

Insert rows into the table.

Streaming inserts reside temporarily in the streaming buffer, which has different
availability characteristics than managed storage. Certain operations do not interact with the
streaming buffer, such as [#list(TableDataListOption...)](https://docs.cloud.google.com/java/docs/reference/google-cloud-bigquery/latest/com.google.cloud.bigquery.Table#com_google_cloud_bigquery_Table_list_) and #copy(TableId, JobOption...). As such, recent streaming data will not be present in the destination table or
output.

Example of inserting rows into the table.


     String rowId1 = "rowId1";
     String rowId2 = "rowId2";
     List<RowToInsert> rows = new ArrayList<>();
     Map<String, Object> row1 = new HashMap<>();
     row1.put("stringField", "value1");
     row1.put("booleanField", true);
     Map<String, Object> row2 = new HashMap<>();
     row2.put("stringField", "value2");
     row2.put("booleanField", false);
     rows.add(RowToInsert.of(rowId1, row1));
     rows.add(RowToInsert.of(rowId2, row2));
     InsertAllResponse response = table.insert(rows);
     // do something with response
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `rows` | `https://docs.oracle.com/javase/8/docs/api/java/lang/Iterable.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-bigquery/latest/com.google.cloud.bigquery.InsertAllRequest.RowToInsert>` rows to be inserted |

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

| **Exceptions** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-bigquery/latest/com.google.cloud.bigquery.BigQueryException` | upon failure |

### insert(Iterable\<InsertAllRequest.RowToInsert\> rows, boolean skipInvalidRows, boolean ignoreUnknownValues)

    public InsertAllResponse insert(Iterable<InsertAllRequest.RowToInsert> rows, boolean skipInvalidRows, boolean ignoreUnknownValues)

Insert rows into the table.

Streaming inserts reside temporarily in the streaming buffer, which has different
availability characteristics than managed storage. Certain operations do not interact with the
streaming buffer, such as [#list(TableDataListOption...)](https://docs.cloud.google.com/java/docs/reference/google-cloud-bigquery/latest/com.google.cloud.bigquery.Table#com_google_cloud_bigquery_Table_list_) and #copy(TableId, JobOption...). As such, recent streaming data will not be present in the destination table or
output.

Example of inserting rows into the table, ignoring invalid rows.


     String rowId1 = "rowId1";
     String rowId2 = "rowId2";
     List<RowToInsert> rows = new ArrayList<>();
     Map<String, Object> row1 = new HashMap<>();
     row1.put("stringField", 1);
     row1.put("booleanField", true);
     Map<String, Object> row2 = new HashMap<>();
     row2.put("stringField", "value2");
     row2.put("booleanField", false);
     rows.add(RowToInsert.of(rowId1, row1));
     rows.add(RowToInsert.of(rowId2, row2));
     InsertAllResponse response = table.insert(rows, true, true);
     // do something with response
     
| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `rows` | `https://docs.oracle.com/javase/8/docs/api/java/lang/Iterable.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-bigquery/latest/com.google.cloud.bigquery.InsertAllRequest.RowToInsert>` rows to be inserted |
| `skipInvalidRows` | `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` whether to insert all valid rows, even if invalid rows exist. If not set the entire insert operation will fail if rows to be inserted contain an invalid row |
| `ignoreUnknownValues` | `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` whether to accept rows that contain values that do not match the schema. The unknown values are ignored. If not set, rows with unknown values are considered to be invalid |

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

| **Exceptions** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-bigquery/latest/com.google.cloud.bigquery.BigQueryException` | upon failure |

### list(BigQuery.TableDataListOption\[\] options)

    public TableResult list(BigQuery.TableDataListOption[] options)

Returns the paginated list rows in this table.

Example of listing rows in the table.


     // This example reads the result 100 rows per RPC call. If there's no need to limit the number,
     // simply omit the option.
     Page<FieldValueList> page = table.list(TableDataListOption.pageSize(100));
     for (FieldValueList row : page.iterateAll()) {
       // do something with the row
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `options` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-bigquery/latest/com.google.cloud.bigquery.BigQuery.TableDataListOption[]` table data list options |

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

| **Exceptions** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-bigquery/latest/com.google.cloud.bigquery.BigQueryException` | upon failure |

### list(Schema schema, BigQuery.TableDataListOption\[\] options)

    public TableResult list(Schema schema, BigQuery.TableDataListOption[] options)

Returns the paginated list rows in this table.

Example of listing rows in the table given a schema.


     Schema schema = ...;
     String field = "my_field";
     Page<FieldValueList> page = table.list(schema);
     for (FieldValueList row : page.iterateAll()) {
       row.get(field);
     }
     
| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `schema` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-bigquery/latest/com.google.cloud.bigquery.Schema` |
| `options` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-bigquery/latest/com.google.cloud.bigquery.BigQuery.TableDataListOption[]` table data list options |

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

| **Exceptions** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-bigquery/latest/com.google.cloud.bigquery.BigQueryException` | upon failure |

### load(FormatOptions format, String sourceUri, BigQuery.JobOption\[\] options)

    public Job load(FormatOptions format, String sourceUri, BigQuery.JobOption[] options)

Starts a BigQuery Job to load data into the current table from the provided source URI. Returns
the started [Job](https://docs.cloud.google.com/java/docs/reference/google-cloud-bigquery/latest/com.google.cloud.bigquery.Job) object.

Example loading data from a single Google Cloud Storage file.


     String sourceUri = "gs://my_bucket/filename.csv";
     Job job = table.load(FormatOptions.csv(), sourceUri);
     // Wait for the job to complete
     try {
       Job completedJob = job.waitFor(RetryOption.initialRetryDelay(Duration.ofSeconds(1)),
                 RetryOption.totalTimeout(Duration.ofMinutes(3)));
       if (completedJob != null && completedJob.getStatus().getError() == null) {
         // Job completed successfully
       } else {
         // Handle error case
       }
     } catch (InterruptedException e) {
       // Handle interrupted wait
     }
     
| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `format` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-bigquery/latest/com.google.cloud.bigquery.FormatOptions` the format of the data to load |
| `sourceUri` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` the fully-qualified Google Cloud Storage URI (e.g. gs://bucket/path) from which to load the data |
| `options` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-bigquery/latest/com.google.cloud.bigquery.BigQuery.JobOption[]` job options |

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

| **Exceptions** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-bigquery/latest/com.google.cloud.bigquery.BigQueryException` | upon failure |

### load(FormatOptions format, List\<String\> sourceUris, BigQuery.JobOption\[\] options)

    public Job load(FormatOptions format, List<String> sourceUris, BigQuery.JobOption[] options)

Starts a BigQuery Job to load data into the current table from the provided source URIs.
Returns the started [Job](https://docs.cloud.google.com/java/docs/reference/google-cloud-bigquery/latest/com.google.cloud.bigquery.Job) object.

Example loading data from a list of Google Cloud Storage files.


     String gcsUrl1 = "gs://my_bucket/filename1.csv";
     String gcsUrl2 = "gs://my_bucket/filename2.csv";
     List<String> sourceUris = new ArrayList<>();
     sourceUris.add(gcsUrl1);
     sourceUris.add(gcsUrl2);
     Job job = table.load(FormatOptions.csv(), sourceUris);
     // Wait for the job to complete
     try {
       Job completedJob = job.waitFor(RetryOption.initialRetryDelay(Duration.ofSeconds(1)),
           RetryOption.totalTimeout(Duration.ofMinutes(3)));
       if (completedJob != null && completedJob.getStatus().getError() == null) {
         // Job completed successfully
       } else {
         // Handle error case
       }
     } catch (InterruptedException e) {
       // Handle interrupted wait
     }
     
| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `format` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-bigquery/latest/com.google.cloud.bigquery.FormatOptions` the format of the exported data |
| `sourceUris` | `https://docs.oracle.com/javase/8/docs/api/java/util/List.html<https://docs.oracle.com/javase/8/docs/api/java/lang/String.html>` the fully-qualified Google Cloud Storage URIs (e.g. gs://bucket/path) from which to load the data |
| `options` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-bigquery/latest/com.google.cloud.bigquery.BigQuery.JobOption[]` job options |

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

| **Exceptions** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-bigquery/latest/com.google.cloud.bigquery.BigQueryException` | upon failure |

### reload(BigQuery.TableOption\[\] options)

    public Table reload(BigQuery.TableOption[] options)

Fetches current table's latest information. Returns `null` if the table does not exist.

Example of fetching the table's latest information, specifying particular table fields to
get.


     TableField field1 = TableField.LAST_MODIFIED_TIME;
     TableField field2 = TableField.NUM_ROWS;
     Table latestTable = table.reload(TableOption.fields(field1, field2));
     if (latestTable == null) {
       // the table was not found
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `options` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-bigquery/latest/com.google.cloud.bigquery.BigQuery.TableOption[]` table options |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-bigquery/latest/com.google.cloud.bigquery.Table` | a `Table` object with latest information or `null` if not found |

### toBuilder()

    public Table.Builder toBuilder()

Returns a builder for the table object.

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

**Overrides** [TableInfo.toBuilder()](https://docs.cloud.google.com/java/docs/reference/google-cloud-bigquery/latest/com.google.cloud.bigquery.TableInfo#com_google_cloud_bigquery_TableInfo_toBuilder__)

### update(BigQuery.TableOption\[\] options)

    public Table update(BigQuery.TableOption[] options)

Updates the table's information with this table's information. Dataset's and table's
user-defined ids cannot be changed. A new `Table` object is returned.

Example of updating the table's information.


     Table updatedTable = table.toBuilder().setDescription("new description").build().update();
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `options` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-bigquery/latest/com.google.cloud.bigquery.BigQuery.TableOption[]` dataset options |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-bigquery/latest/com.google.cloud.bigquery.Table` | a `Table` object with updated information |