Returns an option to specify the schema of the table (only applicable for external tables)
should be autodetected when updating the table from the underlying source.
Returns an option to specify the table's fields to be returned by the RPC call. If this
option is not provided all table's fields are returned. TableOption.fields can be
used to specify only the fields of interest. Table#getTableId() and type (which is
part of Table#getDefinition()) are always returned, even if not specified.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-04 UTC."],[],[],null,["# Class BigQuery.TableOption (2.54.1)\n\nVersion latestkeyboard_arrow_down\n\n- [2.54.1 (latest)](/java/docs/reference/google-cloud-bigquery/latest/com.google.cloud.bigquery.BigQuery.TableOption)\n- [2.54.0](/java/docs/reference/google-cloud-bigquery/2.54.0/com.google.cloud.bigquery.BigQuery.TableOption)\n- [2.53.0](/java/docs/reference/google-cloud-bigquery/2.53.0/com.google.cloud.bigquery.BigQuery.TableOption)\n- [2.52.0](/java/docs/reference/google-cloud-bigquery/2.52.0/com.google.cloud.bigquery.BigQuery.TableOption)\n- [2.51.0](/java/docs/reference/google-cloud-bigquery/2.51.0/com.google.cloud.bigquery.BigQuery.TableOption)\n- [2.50.1](/java/docs/reference/google-cloud-bigquery/2.50.1/com.google.cloud.bigquery.BigQuery.TableOption)\n- [2.49.0](/java/docs/reference/google-cloud-bigquery/2.49.0/com.google.cloud.bigquery.BigQuery.TableOption)\n- [2.48.1](/java/docs/reference/google-cloud-bigquery/2.48.1/com.google.cloud.bigquery.BigQuery.TableOption)\n- [2.47.0](/java/docs/reference/google-cloud-bigquery/2.47.0/com.google.cloud.bigquery.BigQuery.TableOption)\n- [2.46.0](/java/docs/reference/google-cloud-bigquery/2.46.0/com.google.cloud.bigquery.BigQuery.TableOption)\n- [2.45.0](/java/docs/reference/google-cloud-bigquery/2.45.0/com.google.cloud.bigquery.BigQuery.TableOption)\n- [2.44.0](/java/docs/reference/google-cloud-bigquery/2.44.0/com.google.cloud.bigquery.BigQuery.TableOption)\n- [2.43.3](/java/docs/reference/google-cloud-bigquery/2.43.3/com.google.cloud.bigquery.BigQuery.TableOption)\n- [2.42.3](/java/docs/reference/google-cloud-bigquery/2.42.3/com.google.cloud.bigquery.BigQuery.TableOption)\n- [2.41.0](/java/docs/reference/google-cloud-bigquery/2.41.0/com.google.cloud.bigquery.BigQuery.TableOption)\n- [2.40.3](/java/docs/reference/google-cloud-bigquery/2.40.3/com.google.cloud.bigquery.BigQuery.TableOption)\n- [2.39.1](/java/docs/reference/google-cloud-bigquery/2.39.1/com.google.cloud.bigquery.BigQuery.TableOption)\n- [2.38.2](/java/docs/reference/google-cloud-bigquery/2.38.2/com.google.cloud.bigquery.BigQuery.TableOption)\n- [2.37.2](/java/docs/reference/google-cloud-bigquery/2.37.2/com.google.cloud.bigquery.BigQuery.TableOption)\n- [2.36.0](/java/docs/reference/google-cloud-bigquery/2.36.0/com.google.cloud.bigquery.BigQuery.TableOption)\n- [2.35.0](/java/docs/reference/google-cloud-bigquery/2.35.0/com.google.cloud.bigquery.BigQuery.TableOption)\n- [2.34.2](/java/docs/reference/google-cloud-bigquery/2.34.2/com.google.cloud.bigquery.BigQuery.TableOption)\n- [2.33.2](/java/docs/reference/google-cloud-bigquery/2.33.2/com.google.cloud.bigquery.BigQuery.TableOption) \n\n public static class BigQuery.TableOption extends Option\n\nClass for specifying table get, create and update options. \n\nInheritance\n-----------\n\n[Object](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html) \\\u003e com.google.cloud.bigquery.Option \\\u003e BigQuery.TableOption \n\nInherited Members\n-----------------\n\ncom.google.cloud.bigquery.Option.equals(java.lang.Object) \ncom.google.cloud.bigquery.Option.hashCode() \ncom.google.cloud.bigquery.Option.toString() \n[Object.clone()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#clone--) \n[Object.finalize()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#finalize--) \n[Object.getClass()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#getClass--) \n[Object.notify()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#notify--) \n[Object.notifyAll()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#notifyAll--) \n[Object.wait()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait--) \n[Object.wait(long)](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait-long-) \n[Object.wait(long,int)](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait-long-int-)\n\nStatic Methods\n--------------\n\n### autodetectSchema(boolean autodetect)\n\n public static BigQuery.TableOption autodetectSchema(boolean autodetect)\n\nReturns an option to specify the schema of the table (only applicable for external tables)\nshould be autodetected when updating the table from the underlying source.\n\n### fields(BigQuery.TableField\\[\\] fields)\n\n public static BigQuery.TableOption fields(BigQuery.TableField[] fields)\n\nReturns an option to specify the table's fields to be returned by the RPC call. If this\noption is not provided all table's fields are returned. `TableOption.fields` can be\nused to specify only the fields of interest. Table#getTableId() and type (which is\npart of Table#getDefinition()) are always returned, even if not specified.\n\n### tableMetadataView(BigQuery.TableMetadataView tableMetadataView)\n\n public static BigQuery.TableOption tableMetadataView(BigQuery.TableMetadataView tableMetadataView)\n\nReturns an option to specify the metadata of the table."]]