---
title: "PUT /projects/{+projectId}/datasets/{+datasetId}/tables/{+tableId}"
method: PUT
path: "/projects/{+projectId}/datasets/{+datasetId}/tables/{+tableId}"
tags: ["tables"]
---

# PUT /projects/{+projectId}/datasets/{+datasetId}/tables/{+tableId}

`PUT /projects/{+projectId}/datasets/{+datasetId}/tables/{+tableId}`

Updates information in an existing table. The update method replaces the entire Table resource, whereas the patch method only replaces fields that are provided in the submitted Table resource. # IAM Permissions Requires the `bigquery.tables.update` permission on the table.

## Path parameters

- `projectId` string, required
- `datasetId` string, required
- `tableId` string, required

## Query parameters

- `autodetect_schema` boolean

## Request body

- Table
  - `replicas` TableReference[] — Optional. Output only. Table references of all replicas currently active on the table.
    - `datasetId` string — Required. The ID of the dataset containing this table.
    - `projectId` string — Required. The ID of the project containing this table.
    - `tableId` string — Required. The ID of the table. The ID can contain Unicode characters in category L (letter), M (mark), N (number), Pc (connector, including underscore), Pd (dash), and Zs (space). For more information, see [General Category](https://wikipedia.org/wiki/Unicode_character_property#General_Category). The maximum length is 1,024 characters. Certain operations allow suffixing of the table ID with a partition decorator, such as `sample_table$20190123`.
  - `numPhysicalBytes` string, int64 — Output only. The physical size of this table in bytes. This includes storage used for time travel.
  - `numBytes` string, int64 — Output only. The size of this table in logical bytes, excluding any data in the streaming buffer.
  - `etag` string — Output only. A hash of this resource.
  - `materializedViewStatus` MaterializedViewStatus — Status of a materialized view. The last refresh timestamp status is omitted here, but is present in the MaterializedViewDefinition message.
    - `lastRefreshStatus` ErrorProto — Error details.
      - `debugInfo` string — Debugging information. This property is internal to Google and should not be used.
      - `reason` string — A short error code that summarizes the error.
      - `message` string — A human-readable description of the error.
      - `location` string — Specifies where the error occurred, if present.
    - `refreshWatermark` string, google-datetime — Output only. Refresh watermark of materialized view. The base tables' data were collected into the materialized view cache until this time.
  - `location` string — Output only. The geographic location where the table resides. This value is inherited from the dataset.
  - `biglakeConfiguration` BigLakeConfiguration — Configuration for BigQuery tables for Apache Iceberg (formerly BigLake managed tables.)
    - `tableFormat` 'TABLE_FORMAT_UNSPECIFIED' | 'ICEBERG' — Optional. The table format the metadata only snapshots are stored in.
    - `storageUri` string — Optional. The fully qualified location prefix of the external folder where table data is stored. The '*' wildcard character is not allowed. The URI should be in the format `gs://bucket/path_to_table/`
    - `connectionId` string — Optional. The connection specifying the credentials to be used to read and write to external storage, such as Cloud Storage. The connection_id can have the form `{project}.{location}.{connection_id}` or `projects/{project}/locations/{location}/connections/{connection_id}".
    - `fileFormat` 'FILE_FORMAT_UNSPECIFIED' | 'PARQUET' — Optional. The file format the table data is stored in.
  - `labels` object — The labels associated with this table. You can use these to organize and group your tables. Label keys and values can be no longer than 63 characters, can only contain lowercase letters, numeric characters, underscores and dashes. International characters are allowed. Label values are optional. Label keys must start with a letter and each label in the list must have a different key.
  - `restrictions` RestrictionConfig
    - `type` 'RESTRICTION_TYPE_UNSPECIFIED' | 'RESTRICTED_DATA_EGRESS' — Output only. Specifies the type of dataset/table restriction.
  - `tableReplicationInfo` TableReplicationInfo — Replication info of a table created using `AS REPLICA` DDL like: `CREATE MATERIALIZED VIEW mv1 AS REPLICA OF src_mv`
    - `replicatedSourceLastRefreshTime` string, int64 — Optional. Output only. If source is a materialized view, this field signifies the last refresh time of the source.
    - `replicationStatus` 'REPLICATION_STATUS_UNSPECIFIED' | 'ACTIVE' | 'SOURCE_DELETED' | 'PERMISSION_DENIED' | 'UNSUPPORTED_CONFIGURATION' — Optional. Output only. Replication status of configured replication.
    - `replicationIntervalMs` string, int64 — Optional. Specifies the interval at which the source table is polled for updates. It's Optional. If not specified, default replication interval would be applied.
    - `replicationError` ErrorProto — Error details.
      - `debugInfo` string — Debugging information. This property is internal to Google and should not be used.
      - `reason` string — A short error code that summarizes the error.
      - `message` string — A human-readable description of the error.
      - `location` string — Specifies where the error occurred, if present.
    - `sourceTable` TableReference
      - `datasetId` string — Required. The ID of the dataset containing this table.
      - `projectId` string — Required. The ID of the project containing this table.
      - `tableId` string — Required. The ID of the table. The ID can contain Unicode characters in category L (letter), M (mark), N (number), Pc (connector, including underscore), Pd (dash), and Zs (space). For more information, see [General Category](https://wikipedia.org/wiki/Unicode_character_property#General_Category). The maximum length is 1,024 characters. Certain operations allow suffixing of the table ID with a partition decorator, such as `sample_table$20190123`.
  - `encryptionConfiguration` EncryptionConfiguration — Configuration for Cloud KMS encryption settings.
    - `kmsKeyName` string — Optional. Describes the Cloud KMS encryption key that will be used to protect destination BigQuery table. The BigQuery Service Account associated with your project requires access to this encryption key.
  - `snapshotDefinition` SnapshotDefinition — Information about base table and snapshot time of the snapshot.
    - `snapshotTime` string, date-time — Required. The time at which the base table was snapshot. This value is reported in the JSON response using RFC3339 format.
    - `baseTableReference` TableReference
      - `datasetId` string — Required. The ID of the dataset containing this table.
      - `projectId` string — Required. The ID of the project containing this table.
      - `tableId` string — Required. The ID of the table. The ID can contain Unicode characters in category L (letter), M (mark), N (number), Pc (connector, including underscore), Pd (dash), and Zs (space). For more information, see [General Category](https://wikipedia.org/wiki/Unicode_character_property#General_Category). The maximum length is 1,024 characters. Certain operations allow suffixing of the table ID with a partition decorator, such as `sample_table$20190123`.
  - `timePartitioning` TimePartitioning
    - `expirationMs` string, int64 — Optional. Number of milliseconds for which to keep the storage for a partition. A wrapper is used here because 0 is an invalid value.
    - `field` string — Optional. If not set, the table is partitioned by pseudo column '_PARTITIONTIME'; if set, the table is partitioned by this field. The field must be a top-level TIMESTAMP or DATE field. Its mode must be NULLABLE or REQUIRED. A wrapper is used here because an empty string is an invalid value.
    - `type` string — Required. The supported types are DAY, HOUR, MONTH, and YEAR, which will generate one partition per day, hour, month, and year, respectively.
    - `requirePartitionFilter` boolean — If set to true, queries over this table require a partition filter that can be used for partition elimination to be specified. This field is deprecated; please set the field with the same name on the table itself instead. This field needs a wrapper because we want to output the default value, false, if the user explicitly set it.
  - `friendlyName` string — Optional. A descriptive name for this table.
  - `managedTableType` 'MANAGED_TABLE_TYPE_UNSPECIFIED' | 'NATIVE' | 'BIGLAKE' — Optional. If set, overrides the default managed table type configured in the dataset.
  - `defaultRoundingMode` 'ROUNDING_MODE_UNSPECIFIED' | 'ROUND_HALF_AWAY_FROM_ZERO' | 'ROUND_HALF_EVEN' — Optional. Defines the default rounding mode specification of new decimal fields (NUMERIC OR BIGNUMERIC) in the table. During table creation or update, if a decimal field is added to this table without an explicit rounding mode specified, then the field inherits the table default rounding mode. Changing this field doesn't affect existing fields.
  - `numActiveLogicalBytes` string, int64 — Output only. Number of logical bytes that are less than 90 days old.
  - `numRows` string, uint64 — Output only. The number of rows of data in this table, excluding any data in the streaming buffer.
  - `maxStaleness` string — Optional. The maximum staleness of data that could be returned when the table (or stale MV) is queried. Staleness encoded as a string encoding of sql IntervalValue type.
  - `numLongTermBytes` string, int64 — Output only. The number of logical bytes in the table that are considered "long-term storage".
  - `selfLink` string — Output only. A URL that can be used to access this resource again.
  - `creationTime` string, int64 — Output only. The time when this table was created, in milliseconds since the epoch.
  - `numTimeTravelPhysicalBytes` string, int64 — Output only. Number of physical bytes used by time travel storage (deleted or changed data). This data is not kept in real time, and might be delayed by a few seconds to a few minutes.
  - `materializedView` MaterializedViewDefinition — Definition and configuration of a materialized view.
    - `enableRefresh` boolean — Optional. Enable automatic refresh of the materialized view when the base table is updated. The default value is "true".
    - `lastRefreshTime` string, int64 — Output only. The time when this materialized view was last refreshed, in milliseconds since the epoch.
    - `query` string — Required. A query whose results are persisted.
    - `allowNonIncrementalDefinition` boolean — Optional. This option declares the intention to construct a materialized view that isn't refreshed incrementally. Non-incremental materialized views support an expanded range of SQL queries. The `allow_non_incremental_definition` option can't be changed after the materialized view is created.
    - `maxStaleness` string, byte — [Optional] Max staleness of data that could be returned when materizlized view is queried (formatted as Google SQL Interval type).
    - `refreshIntervalMs` string, int64 — Optional. The maximum frequency at which this materialized view will be refreshed. The default value is "1800000" (30 minutes).
  - `externalDataConfiguration` ExternalDataConfiguration
    - `autodetect` boolean — Try to detect schema and format options automatically. Any option specified explicitly will be honored.
    - `avroOptions` AvroOptions — Options for external data sources.
      - `useAvroLogicalTypes` boolean — Optional. If sourceFormat is set to "AVRO", indicates whether to interpret logical types as the corresponding BigQuery data type (for example, TIMESTAMP), instead of using the raw type (for example, INTEGER).
    - `sourceUris` string[] — [Required] The fully-qualified URIs that point to your data in Google Cloud. For Google Cloud Storage URIs: Each URI can contain one '*' wildcard character and it must come after the 'bucket' name. Size limits related to load jobs apply to external data sources. For Google Cloud Bigtable URIs: Exactly one URI can be specified and it has be a fully specified and valid HTTPS URL for a Google Cloud Bigtable table. For Google Cloud Datastore backups, exactly one URI can be specified. Also, the '*' wildcard character is not allowed.
    - `timeZone` string — Optional. Time zone used when parsing timestamp values that do not have specific time zone information (e.g. 2024-04-20 12:34:56). The expected format is a IANA timezone string (e.g. America/Los_Angeles).
    - `objectMetadata` 'OBJECT_METADATA_UNSPECIFIED' | 'DIRECTORY' | 'SIMPLE' — Optional. ObjectMetadata is used to create Object Tables. Object Tables contain a listing of objects (with their metadata) found at the source_uris. If ObjectMetadata is set, source_format should be omitted. Currently SIMPLE is the only supported Object Metadata type.
    - `timestampTargetPrecision` integer[] — Precisions (maximum number of total digits in base 10) for seconds of TIMESTAMP types that are allowed to the destination table for autodetection mode. Available for the formats: CSV, PARQUET, AVRO, and Iceberg External Table. Possible values include: Not Specified, [], or [6]: timestamp(6) for all auto detected TIMESTAMP columns [6, 12]: timestamp(6) for all auto detected TIMESTAMP columns that have less than 6 digits of subseconds. timestamp(12) for all auto detected TIMESTAMP columns that have more than 6 digits of subseconds. [12]: timestamp(12) for all auto detected TIMESTAMP columns. The order of the elements in this array is ignored. Inputs that have higher precision than the highest target precision in this array will be truncated.
    - `decimalTargetTypes` string[] — Defines the list of possible SQL data types to which the source decimal values are converted. This list and the precision and the scale parameters of the decimal field determine the target type. In the order of NUMERIC, BIGNUMERIC, and STRING, a type is picked if it is in the specified list and if it supports the precision and the scale. STRING supports all precision and scale values. If none of the listed types supports the precision and the scale, the type supporting the widest range in the specified list is picked, and if a value exceeds the supported range when reading the data, an error will be thrown. Example: Suppose the value of this field is ["NUMERIC", "BIGNUMERIC"]. If (precision,scale) is: * (38,9) -> NUMERIC; * (39,9) -> BIGNUMERIC (NUMERIC cannot hold 30 integer digits); * (38,10) -> BIGNUMERIC (NUMERIC cannot hold 10 fractional digits); * (76,38) -> BIGNUMERIC; * (77,38) -> BIGNUMERIC (error if value exceeds supported range). This field cannot contain duplicate types. The order of the types in this field is ignored. For example, ["BIGNUMERIC", "NUMERIC"] is the same as ["NUMERIC", "BIGNUMERIC"] and NUMERIC always takes precedence over BIGNUMERIC. Defaults to ["NUMERIC", "STRING"] for ORC and ["NUMERIC"] for the other file formats.
    - `parquetOptions` ParquetOptions — Parquet Options for load and make external tables.
      - `enumAsString` boolean — Optional. Indicates whether to infer Parquet ENUM logical type as STRING instead of BYTES by default.
      - `enableListInference` boolean — Optional. Indicates whether to use schema inference specifically for Parquet LIST logical type.
      - `mapTargetType` 'MAP_TARGET_TYPE_UNSPECIFIED' | 'ARRAY_OF_STRUCT' — Optional. Indicates how to represent a Parquet map if present.
    - `timestampFormat` string — Optional. Format used to parse TIMESTAMP values. Supports C-style and SQL-style values.
    - `maxBadRecords` integer — Optional. The maximum number of bad records that BigQuery can ignore when reading data. If the number of bad records exceeds this value, an invalid error is returned in the job result. The default value is 0, which requires that all records are valid. This setting is ignored for Google Cloud Bigtable, Google Cloud Datastore backups, Avro, ORC and Parquet formats.
    - `dateFormat` string — Optional. Format used to parse DATE values. Supports C-style and SQL-style values.
    - `schema` TableSchema — Schema of a table
      - `foreignTypeInfo` ForeignTypeInfo — Metadata about the foreign data type definition such as the system in which the type is defined.
        - `typeSystem` 'TYPE_SYSTEM_UNSPECIFIED' | 'HIVE' — Required. Specifies the system which defines the foreign data type.
      - `fields` TableFieldSchema[] — Describes the fields in a table.
        - `defaultValueExpression` string — Optional. A SQL expression to specify the [default value] (https://cloud.google.com/bigquery/docs/default-values) for this field.
        - `rangeElementType` object — Represents the type of a field element.
          - `type` string — Required. The type of a field element. For more information, see TableFieldSchema.type.
        - `fields` TableFieldSchema[] — Optional. Describes the nested schema fields if the type property is set to RECORD.
        - `generatedColumn` GeneratedColumn — Optional. Definition of how values are generated for the field. Only valid for top-level schema fields (not nested fields).
          - `generatedExpressionInfo` GeneratedExpressionInfo — Definition of the expression used to generate the field.
            - `asynchronous` boolean — Optional. Whether the column generation is done asynchronously.
            - `generationExpression` string — Optional. The generation expression (e.g. AI.EMBED(...)) used to generate the field.
            - `stored` boolean — Optional. Whether the generated column is stored in the table.
          - `generatedMode` 'GENERATED_MODE_UNSPECIFIED' | 'GENERATED_ALWAYS' | 'GENERATED_BY_DEFAULT' — Optional. Dictates when system generated values are used to populate the field.
        - `policyTags` object — Optional. The policy tags attached to this field, used for field-level access control. If not set, defaults to empty policy_tags.
          - `names` string[] — A list of policy tag resource names. For example, "projects/1/locations/eu/taxonomies/2/policyTags/3". At most 1 policy tag is currently allowed.
        - `roundingMode` 'ROUNDING_MODE_UNSPECIFIED' | 'ROUND_HALF_AWAY_FROM_ZERO' | 'ROUND_HALF_EVEN' — Optional. Specifies the rounding mode to be used when storing values of NUMERIC and BIGNUMERIC type.
        - `description` string — Optional. The field description. The maximum length is 1,024 characters.
        - `mode` string — Optional. The field mode. Possible values include NULLABLE, REQUIRED and REPEATED. The default value is NULLABLE.
        - `name` string — Required. The field name. The name must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_), and must start with a letter or underscore. The maximum length is 300 characters.
        - `dataGovernanceTagsInfo` object — Optional. Specifies the data governance tags on this field. This field works with other column-level security fields as follows: - Precedence: If a data governance tag is attached to a column, it takes precedence over the policy tag attached to the column. However, if a data policy is attached to a column, it takes precedence over the data governance tag. - Patching behavior (how this field behaves during a `Table.patch` schema update): - Unset: If the `data_governance_tags_info` field is omitted from the update request, the existing tags on the column are preserved. - Empty Field: To clear data governance tags from a column, send the `data_governance_tags_info` field as an empty object. This will remove all tags from the column. - Updating tags: To replace existing tag, send the field with the new tag.
          - `dataGovernanceTags` object — Optional. The data governance tags added to this field are used for field-level access control. Only one data governance tag is currently supported on a field. Tag keys are globally unique. Tag key is expected to be in the namespaced format, for example "123456789012/pii" where 123456789012 is the ID of the parent organization or project resource for this tag key. Tag value is expected to be the short name, for example "sensitive". See [Tag definitions](https://cloud.google.com/iam/docs/tags-access-control#definitions) for more details. For example: "123456789012/pii": "sensitive", "myProject/cost_center": "sales"
        - `scale` string, int64 — Optional. See documentation for precision.
        - `precision` string, int64 — Optional. Precision (maximum number of total digits in base 10) and scale (maximum number of digits in the fractional part in base 10) constraints for values of this field for NUMERIC or BIGNUMERIC. It is invalid to set precision or scale if type ≠ "NUMERIC" and ≠ "BIGNUMERIC". If precision and scale are not specified, no value range constraint is imposed on this field insofar as values are permitted by the type. Values of this NUMERIC or BIGNUMERIC field must be in this range when: * Precision (P) and scale (S) are specified: [-10P-S + 10-S, 10P-S - 10-S] * Precision (P) is specified but not scale (and thus scale is interpreted to be equal to zero): [-10P + 1, 10P - 1]. Acceptable values for precision and scale if both are specified: * If type = "NUMERIC": 1 ≤ precision - scale ≤ 29 and 0 ≤ scale ≤ 9. * If type = "BIGNUMERIC": 1 ≤ precision - scale ≤ 38 and 0 ≤ scale ≤ 38. Acceptable values for precision if only precision is specified but not scale (and thus scale is interpreted to be equal to zero): * If type = "NUMERIC": 1 ≤ precision ≤ 29. * If type = "BIGNUMERIC": 1 ≤ precision ≤ 38. If scale is specified but not precision, then it is invalid.
        - `dataPolicies` DataPolicyOption[] — Optional. Data policies attached to this field, used for field-level access control.
          - `name` string — Data policy resource name in the form of projects/project_id/locations/location_id/dataPolicies/data_policy_id.
        - `categories` object — Deprecated.
          - `names` string[] — Deprecated.
        - `timestampPrecision` string, int64 — Optional. Precision (maximum number of total digits in base 10) for seconds of TIMESTAMP type. Possible values include: * 6 (Default, for TIMESTAMP type with microsecond precision) * 12 (For TIMESTAMP type with picosecond precision)
        - `type` string — Required. The field data type. Possible values include: * STRING * BYTES * INTEGER (or INT64) * FLOAT (or FLOAT64) * BOOLEAN (or BOOL) * TIMESTAMP * DATE * TIME * DATETIME * GEOGRAPHY * NUMERIC * BIGNUMERIC * JSON * RECORD (or STRUCT) * RANGE Use of RECORD/STRUCT indicates that the field contains a nested schema.
        - `maxLength` string, int64 — Optional. Maximum length of values of this field for STRINGS or BYTES. If max_length is not specified, no maximum length constraint is imposed on this field. If type = "STRING", then max_length represents the maximum UTF-8 length of strings in this field. If type = "BYTES", then max_length represents the maximum number of bytes in this field. It is invalid to set this field if type ≠ "STRING" and ≠ "BYTES".
        - `collation` string — Optional. Field collation can be set only when the type of field is STRING. The following values are supported: * 'und:ci': undetermined locale, case insensitive. * '': empty string. Default to case-sensitive behavior.
        - `dataPolicyList` DataPolicyList — A list of data policy options. For more information, see [Mask data by applying data policies to a column](https://docs.cloud.google.com/bigquery/docs/column-data-masking#data-policies-on-column).
          - `dataPolicies` DataPolicyOption[] — Contains a list of data policy options. At most 9 data policies are allowed per field.
            - `name` string — Data policy resource name in the form of projects/project_id/locations/location_id/dataPolicies/data_policy_id.
        - `foreignTypeDefinition` string — Optional. Definition of the foreign data type. Only valid for top-level schema fields (not nested fields). If the type is FOREIGN, this field is required.
    - `hivePartitioningOptions` HivePartitioningOptions — Options for configuring hive partitioning detect.
      - `requirePartitionFilter` boolean — Optional. If set to true, queries over this table require a partition filter that can be used for partition elimination to be specified. Note that this field should only be true when creating a permanent external table or querying a temporary external table. Hive-partitioned loads with require_partition_filter explicitly set to true will fail.
      - `mode` string — Optional. When set, what mode of hive partitioning to use when reading data. The following modes are supported: * AUTO: automatically infer partition key name(s) and type(s). * STRINGS: automatically infer partition key name(s). All types are strings. * CUSTOM: partition key schema is encoded in the source URI prefix. Not all storage formats support hive partitioning. Requesting hive partitioning on an unsupported format will lead to an error. Currently supported formats are: JSON, CSV, ORC, Avro and Parquet.
      - `sourceUriPrefix` string — Optional. When hive partition detection is requested, a common prefix for all source uris must be required. The prefix must end immediately before the partition key encoding begins. For example, consider files following this data layout: gs://bucket/path_to_table/dt=2019-06-01/country=USA/id=7/file.avro gs://bucket/path_to_table/dt=2019-05-31/country=CA/id=3/file.avro When hive partitioning is requested with either AUTO or STRINGS detection, the common prefix can be either of gs://bucket/path_to_table or gs://bucket/path_to_table/. CUSTOM detection requires encoding the partitioning schema immediately after the common prefix. For CUSTOM, any of * gs://bucket/path_to_table/{dt:DATE}/{country:STRING}/{id:INTEGER} * gs://bucket/path_to_table/{dt:STRING}/{country:STRING}/{id:INTEGER} * gs://bucket/path_to_table/{dt:DATE}/{country:STRING}/{id:STRING} would all be valid source URI prefixes.
      - `fields` string[] — Output only. For permanent external tables, this field is populated with the hive partition keys in the order they were inferred. The types of the partition keys can be deduced by checking the table schema (which will include the partition keys). Not every API will populate this field in the output. For example, Tables.Get will populate it, but Tables.List will not contain this field.
    - `datetimeFormat` string — Optional. Format used to parse DATETIME values. Supports C-style and SQL-style values.
    - `csvOptions` CsvOptions — Information related to a CSV data source.
      - `nullMarker` string — Optional. Specifies a string that represents a null value in a CSV file. For example, if you specify "\N", BigQuery interprets "\N" as a null value when querying a CSV file. The default value is the empty string. If you set this property to a custom value, BigQuery throws an error if an empty string is present for all data types except for STRING and BYTE. For STRING and BYTE columns, BigQuery interprets the empty string as an empty value.
      - `preserveAsciiControlCharacters` boolean — Optional. Indicates if the embedded ASCII control characters (the first 32 characters in the ASCII-table, from '\x00' to '\x1F') are preserved.
      - `encoding` string — Optional. The character encoding of the data. The supported values are UTF-8, ISO-8859-1, UTF-16BE, UTF-16LE, UTF-32BE, and UTF-32LE. The default value is UTF-8. BigQuery decodes the data after the raw, binary data has been split using the values of the quote and fieldDelimiter properties.
      - `nullMarkers` string[] — Optional. A list of strings represented as SQL NULL value in a CSV file. null_marker and null_markers can't be set at the same time. If null_marker is set, null_markers has to be not set. If null_markers is set, null_marker has to be not set. If both null_marker and null_markers are set at the same time, a user error would be thrown. Any strings listed in null_markers, including empty string would be interpreted as SQL NULL. This applies to all column types.
      - `sourceColumnMatch` string — Optional. Controls the strategy used to match loaded columns to the schema. If not set, a sensible default is chosen based on how the schema is provided. If autodetect is used, then columns are matched by name. Otherwise, columns are matched by position. This is done to keep the behavior backward-compatible. Acceptable values are: POSITION - matches by position. This assumes that the columns are ordered the same way as the schema. NAME - matches by name. This reads the header row as column names and reorders columns to match the field names in the schema.
      - `allowQuotedNewlines` boolean — Optional. Indicates if BigQuery should allow quoted data sections that contain newline characters in a CSV file. The default value is false.
      - `skipLeadingRows` string, int64 — Optional. The number of rows at the top of a CSV file that BigQuery will skip when reading the data. The default value is 0. This property is useful if you have header rows in the file that should be skipped. When autodetect is on, the behavior is the following: * skipLeadingRows unspecified - Autodetect tries to detect headers in the first row. If they are not detected, the row is read as data. Otherwise data is read starting from the second row. * skipLeadingRows is 0 - Instructs autodetect that there are no headers and data should be read starting from the first row. * skipLeadingRows = N > 0 - Autodetect skips N-1 rows and tries to detect headers in row N. If headers are not detected, row N is just skipped. Otherwise row N is used to extract column names for the detected schema.
      - `quote` string — Optional. The value that is used to quote data sections in a CSV file. BigQuery converts the string to ISO-8859-1 encoding, and then uses the first byte of the encoded string to split the data in its raw, binary state. The default value is a double-quote ("). If your data does not contain quoted sections, set the property value to an empty string. If your data contains quoted newline characters, you must also set the allowQuotedNewlines property to true. To include the specific quote character within a quoted value, precede it with an additional matching quote character. For example, if you want to escape the default character ' " ', use ' "" '.
      - `allowJaggedRows` boolean — Optional. Indicates if 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 there are too many bad records, an invalid error is returned in the job result. The default value is false.
      - `fieldDelimiter` string — Optional. The separator character for fields in a CSV file. The separator is interpreted as a single byte. For files encoded in ISO-8859-1, any single character can be used as a separator. For files encoded in UTF-8, characters represented in decimal range 1-127 (U+0001-U+007F) can be used without any modification. UTF-8 characters encoded with multiple bytes (i.e. U+0080 and above) will have only the first byte used for separating fields. The remaining bytes will be treated as a part of the field. BigQuery also supports the escape sequence "\t" (U+0009) to specify a tab separator. The default value is comma (",", U+002C).
    - `referenceFileSchemaUri` string — Optional. When creating an external table, the user can provide a reference file with the table schema. This is enabled for the following formats: AVRO, PARQUET, ORC.
    - `connectionId` string — Optional. The connection specifying the credentials to be used to read external storage, such as Azure Blob, Cloud Storage, or S3. The connection_id can have the form `{project_id}.{location_id};{connection_id}` or `projects/{project_id}/locations/{location_id}/connections/{connection_id}`.
    - `jsonExtension` 'JSON_EXTENSION_UNSPECIFIED' | 'GEOJSON' — Optional. Load option to be used together with source_format newline-delimited JSON to indicate that a variant of JSON is being loaded. To load newline-delimited GeoJSON, specify GEOJSON (and source_format must be set to NEWLINE_DELIMITED_JSON).
    - `fileSetSpecType` 'FILE_SET_SPEC_TYPE_FILE_SYSTEM_MATCH' | 'FILE_SET_SPEC_TYPE_NEW_LINE_DELIMITED_MANIFEST' — Optional. Specifies how source URIs are interpreted for constructing the file set to load. By default source URIs are expanded against the underlying storage. Other options include specifying manifest files. Only applicable to object storage systems.
    - `jsonOptions` JsonOptions — Json Options for load and make external tables.
      - `encoding` string — Optional. The character encoding of the data. The supported values are UTF-8, UTF-16BE, UTF-16LE, UTF-32BE, and UTF-32LE. The default value is UTF-8.
    - `googleSheetsOptions` GoogleSheetsOptions — Options specific to Google Sheets data sources.
      - `skipLeadingRows` string, int64 — Optional. The number of rows at the top of a sheet that BigQuery will skip when reading the data. The default value is 0. This property is useful if you have header rows that should be skipped. When autodetect is on, the behavior is the following: * skipLeadingRows unspecified - Autodetect tries to detect headers in the first row. If they are not detected, the row is read as data. Otherwise data is read starting from the second row. * skipLeadingRows is 0 - Instructs autodetect that there are no headers and data should be read starting from the first row. * skipLeadingRows = N > 0 - Autodetect skips N-1 rows and tries to detect headers in row N. If headers are not detected, row N is just skipped. Otherwise row N is used to extract column names for the detected schema.
      - `range` string — Optional. Range of a sheet to query from. Only used when non-empty. Typical format: sheet_name!top_left_cell_id:bottom_right_cell_id For example: sheet1!A1:B20
    - `metadataCacheMode` 'METADATA_CACHE_MODE_UNSPECIFIED' | 'AUTOMATIC' | 'MANUAL' — Optional. Metadata Cache Mode for the table. Set this to enable caching of metadata from external data source.
    - `sourceFormat` string — [Required] The data format. For CSV files, specify "CSV". For Google sheets, specify "GOOGLE_SHEETS". For newline-delimited JSON, specify "NEWLINE_DELIMITED_JSON". For Avro files, specify "AVRO". For Google Cloud Datastore backups, specify "DATASTORE_BACKUP". For Apache Iceberg tables, specify "ICEBERG". For ORC files, specify "ORC". For Parquet files, specify "PARQUET". [Beta] For Google Cloud Bigtable, specify "BIGTABLE".
    - `ignoreUnknownValues` boolean — Optional. Indicates if BigQuery should allow extra values that are not represented in the table schema. If true, the extra values are ignored. If false, records with extra columns are treated as bad records, and if there are too many bad records, an invalid error is returned in the job result. The default value is false. The sourceFormat property determines what BigQuery treats as an extra value: CSV: Trailing columns JSON: Named values that don't match any column names Google Cloud Bigtable: This setting is ignored. Google Cloud Datastore backups: This setting is ignored. Avro: This setting is ignored. ORC: This setting is ignored. Parquet: This setting is ignored.
    - `timeFormat` string — Optional. Format used to parse TIME values. Supports C-style and SQL-style values.
    - `bigtableOptions` BigtableOptions — Options specific to Google Cloud Bigtable data sources.
      - `readRowkeyAsString` boolean — Optional. If field is true, then the rowkey column families will be read and converted to string. Otherwise they are read with BYTES type values and users need to manually cast them with CAST if necessary. The default value is false.
      - `ignoreUnspecifiedColumnFamilies` boolean — Optional. If field is true, then the column families that are not specified in columnFamilies list are not exposed in the table schema. Otherwise, they are read with BYTES type values. The default value is false.
      - `columnFamilies` BigtableColumnFamily[] — Optional. List of column families to expose in the table schema along with their types. This list restricts the column families that can be referenced in queries and specifies their value types. You can use this list to do type conversions - see the 'type' field for more details. If you leave this list empty, all column families are present in the table schema and their values are read as BYTES. During a query only the column families referenced in that query are read from Bigtable.
        - `familyId` string — Identifier of the column family.
        - `columns` BigtableColumn[] — Optional. Lists of columns that should be exposed as individual fields as opposed to a list of (column name, value) pairs. All columns whose qualifier matches a qualifier in this list can be accessed as `.`. Other columns can be accessed as a list through the `.Column` field.
          - `encoding` string — Optional. The encoding of the values when the type is not STRING. Acceptable encoding values are: TEXT - indicates values are alphanumeric text strings. BINARY - indicates values are encoded using HBase Bytes.toBytes family of functions. PROTO_BINARY - indicates values are encoded using serialized proto messages. This can only be used in combination with JSON type. 'encoding' can also be set at the column family level. However, the setting at this level takes precedence if 'encoding' is set at both levels.
          - `qualifierString` string — Qualifier string.
          - `type` string — Optional. The type to convert the value in cells of this column. The values are expected to be encoded using HBase Bytes.toBytes function when using the BINARY encoding value. Following BigQuery types are allowed (case-sensitive): * BYTES * STRING * INTEGER * FLOAT * BOOLEAN * JSON Default type is BYTES. 'type' can also be set at the column family level. However, the setting at this level takes precedence if 'type' is set at both levels.
          - `qualifierEncoded` string, byte — [Required] Qualifier of the column. Columns in the parent column family that has this exact qualifier are exposed as `.` field. If the qualifier is valid UTF-8 string, it can be specified in the qualifier_string field. Otherwise, a base-64 encoded value must be set to qualifier_encoded. The column field name is the same as the column qualifier. However, if the qualifier is not a valid BigQuery field identifier i.e. does not match a-zA-Z*, a valid identifier must be provided as field_name.
          - `fieldName` string — Optional. If the qualifier is not a valid BigQuery field identifier i.e. does not match a-zA-Z*, a valid identifier must be provided as the column field name and is used as field name in queries.
          - `protoConfig` BigtableProtoConfig — Information related to a Bigtable protobuf column.
            - `protoMessageName` string — Optional. The fully qualified proto message name of the protobuf. In the format of "foo.bar.Message".
            - `schemaBundleId` string — Optional. The ID of the Bigtable SchemaBundle resource associated with this protobuf. The ID should be referred to within the parent table, e.g., `foo` rather than `projects/{project}/instances/{instance}/tables/{table}/schemaBundles/foo`. See [more details on Bigtable SchemaBundles](https://docs.cloud.google.com/bigtable/docs/create-manage-protobuf-schemas).
          - `onlyReadLatest` boolean — Optional. If this is set, only the latest version of value in this column are exposed. 'onlyReadLatest' can also be set at the column family level. However, the setting at this level takes precedence if 'onlyReadLatest' is set at both levels.
        - `onlyReadLatest` boolean — Optional. If this is set only the latest version of value are exposed for all columns in this column family. This can be overridden for a specific column by listing that column in 'columns' and specifying a different setting for that column.
        - `protoConfig` BigtableProtoConfig — Information related to a Bigtable protobuf column.
          - `protoMessageName` string — Optional. The fully qualified proto message name of the protobuf. In the format of "foo.bar.Message".
          - `schemaBundleId` string — Optional. The ID of the Bigtable SchemaBundle resource associated with this protobuf. The ID should be referred to within the parent table, e.g., `foo` rather than `projects/{project}/instances/{instance}/tables/{table}/schemaBundles/foo`. See [more details on Bigtable SchemaBundles](https://docs.cloud.google.com/bigtable/docs/create-manage-protobuf-schemas).
        - `encoding` string — Optional. The encoding of the values when the type is not STRING. Acceptable encoding values are: TEXT - indicates values are alphanumeric text strings. BINARY - indicates values are encoded using HBase Bytes.toBytes family of functions. PROTO_BINARY - indicates values are encoded using serialized proto messages. This can only be used in combination with JSON type. This can be overridden for a specific column by listing that column in 'columns' and specifying an encoding for it.
        - `type` string — Optional. The type to convert the value in cells of this column family. The values are expected to be encoded using HBase Bytes.toBytes function when using the BINARY encoding value. Following BigQuery types are allowed (case-sensitive): * BYTES * STRING * INTEGER * FLOAT * BOOLEAN * JSON Default type is BYTES. This can be overridden for a specific column by listing that column in 'columns' and specifying a type for it.
      - `outputColumnFamiliesAsJson` boolean — Optional. If field is true, then each column family will be read as a single JSON column. Otherwise they are read as a repeated cell structure containing timestamp/value tuples. The default value is false.
    - `compression` string — Optional. The compression type of the data source. Possible values include GZIP and NONE. The default value is NONE. This setting is ignored for Google Cloud Bigtable, Google Cloud Datastore backups, Avro, ORC and Parquet formats. An empty string is an invalid value.
  - `kind` string — The type of resource ID.
  - `numLongTermLogicalBytes` string, int64 — Output only. Number of logical bytes that are more than 90 days old.
  - `externalCatalogTableOptions` ExternalCatalogTableOptions — Metadata about open source compatible table. The fields contained in these options correspond to Hive metastore's table-level properties.
    - `connectionId` string — Optional. A connection ID that specifies the credentials to be used to read external storage, such as Azure Blob, Cloud Storage, or Amazon S3. This connection is needed to read the open source table from BigQuery. The connection_id format must be either `..` or `projects//locations//connections/`.
    - `storageDescriptor` StorageDescriptor — Contains information about how a table's data is stored and accessed by open source query engines.
      - `locationUri` string — Optional. The physical location of the table (e.g. `gs://spark-dataproc-data/pangea-data/case_sensitive/` or `gs://spark-dataproc-data/pangea-data/*`). The maximum length is 2056 bytes.
      - `outputFormat` string — Optional. Specifies the fully qualified class name of the OutputFormat (e.g. "org.apache.hadoop.hive.ql.io.orc.OrcOutputFormat"). The maximum length is 128 characters.
      - `serdeInfo` SerDeInfo — Serializer and deserializer information.
        - `name` string — Optional. Name of the SerDe. The maximum length is 256 characters.
        - `serializationLibrary` string — Required. Specifies a fully-qualified class name of the serialization library that is responsible for the translation of data between table representation and the underlying low-level input and output format structures. The maximum length is 256 characters.
        - `parameters` object — Optional. Key-value pairs that define the initialization parameters for the serialization library. Maximum size 10 Kib.
      - `inputFormat` string — Optional. Specifies the fully qualified class name of the InputFormat (e.g. "org.apache.hadoop.hive.ql.io.orc.OrcInputFormat"). The maximum length is 128 characters.
    - `parameters` object — Optional. A map of the key-value pairs defining the parameters and properties of the open source table. Corresponds with Hive metastore table parameters. Maximum size of 4MiB.
  - `description` string — Optional. A user-friendly description of this table.
  - `rangePartitioning` RangePartitioning
    - `field` string — Required. The name of the column to partition the table on. It must be a top-level, INT64 column whose mode is NULLABLE or REQUIRED.
    - `range` object — [Experimental] Defines the ranges for range partitioning.
      - `end` string, int64 — [Experimental] The end of range partitioning, exclusive.
      - `interval` string, int64 — [Experimental] The width of each interval.
      - `start` string, int64 — [Experimental] The start of range partitioning, inclusive.
  - `model` ModelDefinition
    - `trainingRuns` BqmlTrainingRun[] — Deprecated.
      - `state` string — Deprecated.
      - `trainingOptions` object — Deprecated.
        - `warmStart` boolean
        - `learnRate` number, double
        - `learnRateStrategy` string
        - `earlyStop` boolean
        - `l1Reg` number, double
        - `l2Reg` number, double
        - `minRelProgress` number, double
        - `maxIteration` string, int64
        - `lineSearchInitLearnRate` number, double
      - `iterationResults` BqmlIterationResult[] — Deprecated.
        - `evalLoss` number, double — Deprecated.
        - `index` integer — Deprecated.
        - `durationMs` string, int64 — Deprecated.
        - `trainingLoss` number, double — Deprecated.
        - `learnRate` number, double — Deprecated.
      - `startTime` string, date-time — Deprecated.
    - `modelOptions` object — Deprecated.
      - `lossType` string
      - `modelType` string
      - `labels` string[]
  - `numTotalLogicalBytes` string, int64 — Output only. Total number of logical bytes in the table or materialized view.
  - `numTotalPhysicalBytes` string, int64 — Output only. The physical size of this table in bytes. This also includes storage used for time travel. This data is not kept in real time, and might be delayed by a few seconds to a few minutes.
  - `partitionDefinition` PartitioningDefinition — The partitioning information, which includes managed table, external table and metastore partitioned table partition information.
    - `partitionedColumn` PartitionedColumn[] — Optional. Details about each partitioning column. This field is output only for all partitioning types other than metastore partitioned tables. BigQuery native tables only support 1 partitioning column. Other table types may support 0, 1 or more partitioning columns. For metastore partitioned tables, the order must match the definition order in the Hive Metastore, where it must match the physical layout of the table. For example, CREATE TABLE a_table(id BIGINT, name STRING) PARTITIONED BY (city STRING, state STRING). In this case the values must be ['city', 'state'] in that order.
      - `field` string — Required. The name of the partition column.
  - `id` string — Output only. An opaque ID uniquely identifying the table.
  - `defaultCollation` string — Optional. Defines the default collation specification of new STRING fields in the table. During table creation or update, if a STRING field is added to this table without explicit collation specified, then the table inherits the table default collation. A change to this field affects only fields added afterwards, and does not alter the existing fields. The following values are supported: * 'und:ci': undetermined locale, case insensitive. * '': empty string. Default to case-sensitive behavior.
  - `tableConstraints` TableConstraints — The TableConstraints defines the primary key and foreign key.
    - `foreignKeys` object[] — Optional. Present only if the table has a foreign key. The foreign key is not enforced.
      - `columnReferences` object[] — Required. The columns that compose the foreign key.
        - `referencedColumn` string — Required. The column in the primary key that are referenced by the referencing_column.
        - `referencingColumn` string — Required. The column that composes the foreign key.
      - `name` string — Optional. Set only if the foreign key constraint is named.
      - `referencedTable` object
        - `projectId` string
        - `tableId` string
        - `datasetId` string
    - `primaryKey` object — Represents the primary key constraint on a table's columns.
      - `columns` string[] — Required. The columns that are composed of the primary key constraint.
  - `tableReference` TableReference
    - `datasetId` string — Required. The ID of the dataset containing this table.
    - `projectId` string — Required. The ID of the project containing this table.
    - `tableId` string — Required. The ID of the table. The ID can contain Unicode characters in category L (letter), M (mark), N (number), Pc (connector, including underscore), Pd (dash), and Zs (space). For more information, see [General Category](https://wikipedia.org/wiki/Unicode_character_property#General_Category). The maximum length is 1,024 characters. Certain operations allow suffixing of the table ID with a partition decorator, such as `sample_table$20190123`.
  - `clustering` Clustering — Configures table clustering.
    - `fields` string[] — One or more fields on which data should be clustered. Only top-level, non-repeated, simple-type fields are supported. The ordering of the clustering fields should be prioritized from most to least important for filtering purposes. For additional information, see [Introduction to clustered tables](https://cloud.google.com/bigquery/docs/clustered-tables#limitations).
  - `numCurrentPhysicalBytes` string, int64 — Output only. Number of physical bytes used by current live data storage. This data is not kept in real time, and might be delayed by a few seconds to a few minutes.
  - `resourceTags` object — [Optional] The tags associated with this table. Tag keys are globally unique. See additional information on [tags](https://cloud.google.com/iam/docs/tags-access-control#definitions). An object containing a list of "key": value pairs. The key is the namespaced friendly name of the tag key, e.g. "12345/environment" where 12345 is parent id. The value is the friendly short name of the tag value, e.g. "production".
  - `schema` TableSchema — Schema of a table
    - `foreignTypeInfo` ForeignTypeInfo — Metadata about the foreign data type definition such as the system in which the type is defined.
      - `typeSystem` 'TYPE_SYSTEM_UNSPECIFIED' | 'HIVE' — Required. Specifies the system which defines the foreign data type.
    - `fields` TableFieldSchema[] — Describes the fields in a table.
      - `defaultValueExpression` string — Optional. A SQL expression to specify the [default value] (https://cloud.google.com/bigquery/docs/default-values) for this field.
      - `rangeElementType` object — Represents the type of a field element.
        - `type` string — Required. The type of a field element. For more information, see TableFieldSchema.type.
      - `fields` TableFieldSchema[] — Optional. Describes the nested schema fields if the type property is set to RECORD.
      - `generatedColumn` GeneratedColumn — Optional. Definition of how values are generated for the field. Only valid for top-level schema fields (not nested fields).
        - `generatedExpressionInfo` GeneratedExpressionInfo — Definition of the expression used to generate the field.
          - `asynchronous` boolean — Optional. Whether the column generation is done asynchronously.
          - `generationExpression` string — Optional. The generation expression (e.g. AI.EMBED(...)) used to generate the field.
          - `stored` boolean — Optional. Whether the generated column is stored in the table.
        - `generatedMode` 'GENERATED_MODE_UNSPECIFIED' | 'GENERATED_ALWAYS' | 'GENERATED_BY_DEFAULT' — Optional. Dictates when system generated values are used to populate the field.
      - `policyTags` object — Optional. The policy tags attached to this field, used for field-level access control. If not set, defaults to empty policy_tags.
        - `names` string[] — A list of policy tag resource names. For example, "projects/1/locations/eu/taxonomies/2/policyTags/3". At most 1 policy tag is currently allowed.
      - `roundingMode` 'ROUNDING_MODE_UNSPECIFIED' | 'ROUND_HALF_AWAY_FROM_ZERO' | 'ROUND_HALF_EVEN' — Optional. Specifies the rounding mode to be used when storing values of NUMERIC and BIGNUMERIC type.
      - `description` string — Optional. The field description. The maximum length is 1,024 characters.
      - `mode` string — Optional. The field mode. Possible values include NULLABLE, REQUIRED and REPEATED. The default value is NULLABLE.
      - `name` string — Required. The field name. The name must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_), and must start with a letter or underscore. The maximum length is 300 characters.
      - `dataGovernanceTagsInfo` object — Optional. Specifies the data governance tags on this field. This field works with other column-level security fields as follows: - Precedence: If a data governance tag is attached to a column, it takes precedence over the policy tag attached to the column. However, if a data policy is attached to a column, it takes precedence over the data governance tag. - Patching behavior (how this field behaves during a `Table.patch` schema update): - Unset: If the `data_governance_tags_info` field is omitted from the update request, the existing tags on the column are preserved. - Empty Field: To clear data governance tags from a column, send the `data_governance_tags_info` field as an empty object. This will remove all tags from the column. - Updating tags: To replace existing tag, send the field with the new tag.
        - `dataGovernanceTags` object — Optional. The data governance tags added to this field are used for field-level access control. Only one data governance tag is currently supported on a field. Tag keys are globally unique. Tag key is expected to be in the namespaced format, for example "123456789012/pii" where 123456789012 is the ID of the parent organization or project resource for this tag key. Tag value is expected to be the short name, for example "sensitive". See [Tag definitions](https://cloud.google.com/iam/docs/tags-access-control#definitions) for more details. For example: "123456789012/pii": "sensitive", "myProject/cost_center": "sales"
      - `scale` string, int64 — Optional. See documentation for precision.
      - `precision` string, int64 — Optional. Precision (maximum number of total digits in base 10) and scale (maximum number of digits in the fractional part in base 10) constraints for values of this field for NUMERIC or BIGNUMERIC. It is invalid to set precision or scale if type ≠ "NUMERIC" and ≠ "BIGNUMERIC". If precision and scale are not specified, no value range constraint is imposed on this field insofar as values are permitted by the type. Values of this NUMERIC or BIGNUMERIC field must be in this range when: * Precision (P) and scale (S) are specified: [-10P-S + 10-S, 10P-S - 10-S] * Precision (P) is specified but not scale (and thus scale is interpreted to be equal to zero): [-10P + 1, 10P - 1]. Acceptable values for precision and scale if both are specified: * If type = "NUMERIC": 1 ≤ precision - scale ≤ 29 and 0 ≤ scale ≤ 9. * If type = "BIGNUMERIC": 1 ≤ precision - scale ≤ 38 and 0 ≤ scale ≤ 38. Acceptable values for precision if only precision is specified but not scale (and thus scale is interpreted to be equal to zero): * If type = "NUMERIC": 1 ≤ precision ≤ 29. * If type = "BIGNUMERIC": 1 ≤ precision ≤ 38. If scale is specified but not precision, then it is invalid.
      - `dataPolicies` DataPolicyOption[] — Optional. Data policies attached to this field, used for field-level access control.
        - `name` string — Data policy resource name in the form of projects/project_id/locations/location_id/dataPolicies/data_policy_id.
      - `categories` object — Deprecated.
        - `names` string[] — Deprecated.
      - `timestampPrecision` string, int64 — Optional. Precision (maximum number of total digits in base 10) for seconds of TIMESTAMP type. Possible values include: * 6 (Default, for TIMESTAMP type with microsecond precision) * 12 (For TIMESTAMP type with picosecond precision)
      - `type` string — Required. The field data type. Possible values include: * STRING * BYTES * INTEGER (or INT64) * FLOAT (or FLOAT64) * BOOLEAN (or BOOL) * TIMESTAMP * DATE * TIME * DATETIME * GEOGRAPHY * NUMERIC * BIGNUMERIC * JSON * RECORD (or STRUCT) * RANGE Use of RECORD/STRUCT indicates that the field contains a nested schema.
      - `maxLength` string, int64 — Optional. Maximum length of values of this field for STRINGS or BYTES. If max_length is not specified, no maximum length constraint is imposed on this field. If type = "STRING", then max_length represents the maximum UTF-8 length of strings in this field. If type = "BYTES", then max_length represents the maximum number of bytes in this field. It is invalid to set this field if type ≠ "STRING" and ≠ "BYTES".
      - `collation` string — Optional. Field collation can be set only when the type of field is STRING. The following values are supported: * 'und:ci': undetermined locale, case insensitive. * '': empty string. Default to case-sensitive behavior.
      - `dataPolicyList` DataPolicyList — A list of data policy options. For more information, see [Mask data by applying data policies to a column](https://docs.cloud.google.com/bigquery/docs/column-data-masking#data-policies-on-column).
        - `dataPolicies` DataPolicyOption[] — Contains a list of data policy options. At most 9 data policies are allowed per field.
          - `name` string — Data policy resource name in the form of projects/project_id/locations/location_id/dataPolicies/data_policy_id.
      - `foreignTypeDefinition` string — Optional. Definition of the foreign data type. Only valid for top-level schema fields (not nested fields). If the type is FOREIGN, this field is required.
  - `streamingBuffer` Streamingbuffer
    - `estimatedBytes` string, uint64 — Output only. A lower-bound estimate of the number of bytes currently in the streaming buffer.
    - `estimatedRows` string, uint64 — Output only. A lower-bound estimate of the number of rows currently in the streaming buffer.
    - `oldestEntryTime` string, uint64 — Output only. Contains the timestamp of the oldest entry in the streaming buffer, in milliseconds since the epoch, if the streaming buffer is available.
  - `numLongTermPhysicalBytes` string, int64 — Output only. Number of physical bytes more than 90 days old. This data is not kept in real time, and might be delayed by a few seconds to a few minutes.
  - `requirePartitionFilter` boolean — Optional. If set to true, queries over this table require a partition filter that can be used for partition elimination to be specified.
  - `cloneDefinition` CloneDefinition — Information about base table and clone time of a table clone.
    - `baseTableReference` TableReference
      - `datasetId` string — Required. The ID of the dataset containing this table.
      - `projectId` string — Required. The ID of the project containing this table.
      - `tableId` string — Required. The ID of the table. The ID can contain Unicode characters in category L (letter), M (mark), N (number), Pc (connector, including underscore), Pd (dash), and Zs (space). For more information, see [General Category](https://wikipedia.org/wiki/Unicode_character_property#General_Category). The maximum length is 1,024 characters. Certain operations allow suffixing of the table ID with a partition decorator, such as `sample_table$20190123`.
    - `cloneTime` string, date-time — Required. The time at which the base table was cloned. This value is reported in the JSON response using RFC3339 format.
  - `expirationTime` string, int64 — Optional. The time when this table expires, in milliseconds since the epoch. If not present, the table will persist indefinitely. Expired tables will be deleted and their storage reclaimed. The defaultTableExpirationMs property of the encapsulating dataset can be used to set a default expirationTime on newly created tables.
  - `type` string — Output only. Describes the table type. The following values are supported: * `TABLE`: A normal BigQuery table. * `VIEW`: A virtual table defined by a SQL query. * `EXTERNAL`: A table that references data stored in an external storage system, such as Google Cloud Storage. * `MATERIALIZED_VIEW`: A precomputed view defined by a SQL query. * `SNAPSHOT`: An immutable BigQuery table that preserves the contents of a base table at a particular time. See additional information on [table snapshots](https://cloud.google.com/bigquery/docs/table-snapshots-intro). The default value is `TABLE`.
  - `numPartitions` string, int64 — Output only. The number of partitions present in the table or materialized view. This data is not kept in real time, and might be delayed by a few seconds to a few minutes.
  - `numActivePhysicalBytes` string, int64 — Output only. Number of physical bytes less than 90 days old. This data is not kept in real time, and might be delayed by a few seconds to a few minutes.
  - `lastModifiedTime` string, uint64 — Output only. The time when this table was last modified, in milliseconds since the epoch.
  - `view` ViewDefinition — Describes the definition of a logical view.
    - `query` string — Required. A query that BigQuery executes when the view is referenced.
    - `foreignDefinitions` ForeignViewDefinition[] — Optional. Foreign view representations.
      - `dialect` string — Optional. Represents the dialect of the query.
      - `query` string — Required. The query that defines the view.
    - `userDefinedFunctionResources` UserDefinedFunctionResource[] — Describes user-defined function resources used in the query.
      - `inlineCode` string — [Pick one] An inline resource that contains code for a user-defined function (UDF). Providing a inline code resource is equivalent to providing a URI for a file containing the same code.
      - `resourceUri` string — [Pick one] A code resource to load from a Google Cloud Storage URI (gs://bucket/path).
    - `privacyPolicy` PrivacyPolicy — Represents privacy policy that contains the privacy requirements specified by the data owner. Currently, this is only supported on views.
      - `differentialPrivacyPolicy` DifferentialPrivacyPolicy — Represents privacy policy associated with "differential privacy" method.
        - `deltaBudget` number, double — Optional. The total delta budget for all queries against the privacy-protected view. Each subscriber query against this view charges the amount of delta that is pre-defined by the contributor through the privacy policy delta_per_query field. If there is sufficient budget, then the subscriber query attempts to complete. It might still fail due to other reasons, in which case the charge is refunded. If there is insufficient budget the query is rejected. There might be multiple charge attempts if a single query references multiple views. In this case there must be sufficient budget for all charges or the query is rejected and charges are refunded in best effort. The budget does not have a refresh policy and can only be updated via ALTER VIEW or circumvented by creating a new view that can be queried with a fresh budget.
        - `epsilonBudgetRemaining` number, double — Output only. The epsilon budget remaining. If budget is exhausted, no more queries are allowed. Note that the budget for queries that are in progress is deducted before the query executes. If the query fails or is cancelled then the budget is refunded. In this case the amount of budget remaining can increase.
        - `deltaBudgetRemaining` number, double — Output only. The delta budget remaining. If budget is exhausted, no more queries are allowed. Note that the budget for queries that are in progress is deducted before the query executes. If the query fails or is cancelled then the budget is refunded. In this case the amount of budget remaining can increase.
        - `deltaPerQuery` number, double — Optional. The delta value that is used per query. Delta represents the probability that any row will fail to be epsilon differentially private. Indicates the risk associated with exposing aggregate rows in the result of a query.
        - `maxEpsilonPerQuery` number, double — Optional. The maximum epsilon value that a query can consume. If the subscriber specifies epsilon as a parameter in a SELECT query, it must be less than or equal to this value. The epsilon parameter controls the amount of noise that is added to the groups — a higher epsilon means less noise.
        - `epsilonBudget` number, double — Optional. The total epsilon budget for all queries against the privacy-protected view. Each subscriber query against this view charges the amount of epsilon they request in their query. If there is sufficient budget, then the subscriber query attempts to complete. It might still fail due to other reasons, in which case the charge is refunded. If there is insufficient budget the query is rejected. There might be multiple charge attempts if a single query references multiple views. In this case there must be sufficient budget for all charges or the query is rejected and charges are refunded in best effort. The budget does not have a refresh policy and can only be updated via ALTER VIEW or circumvented by creating a new view that can be queried with a fresh budget.
        - `privacyUnitColumn` string — Optional. The privacy unit column associated with this policy. Differential privacy policies can only have one privacy unit column per data source object (table, view).
        - `maxGroupsContributed` string, int64 — Optional. The maximum groups contributed value that is used per query. Represents the maximum number of groups to which each protected entity can contribute. Changing this value does not improve or worsen privacy. The best value for accuracy and utility depends on the query and data.
      - `joinRestrictionPolicy` JoinRestrictionPolicy — Represents privacy policy associated with "join restrictions". Join restriction gives data providers the ability to enforce joins on the 'join_allowed_columns' when data is queried from a privacy protected view.
        - `joinAllowedColumns` string[] — Optional. The only columns that joins are allowed on. This field is must be specified for join_conditions JOIN_ANY and JOIN_ALL and it cannot be set for JOIN_BLOCKED.
        - `joinCondition` 'JOIN_CONDITION_UNSPECIFIED' | 'JOIN_ANY' | 'JOIN_ALL' | 'JOIN_NOT_REQUIRED' | 'JOIN_BLOCKED' — Optional. Specifies if a join is required or not on queries for the view. Default is JOIN_CONDITION_UNSPECIFIED.
      - `aggregationThresholdPolicy` AggregationThresholdPolicy — Represents privacy policy associated with "aggregation threshold" method.
        - `threshold` string, int64 — Optional. The threshold for the "aggregation threshold" policy.
        - `privacyUnitColumns` string[] — Optional. The privacy unit column(s) associated with this policy. For now, only one column per data source object (table, view) is allowed as a privacy unit column. Representing as a repeated field in metadata for extensibility to multiple columns in future. Duplicates and Repeated struct fields are not allowed. For nested fields, use dot notation ("outer.inner")
    - `useExplicitColumnNames` boolean — True if the column names are explicitly specified. For example by using the 'CREATE VIEW v(c1, c2) AS ...' syntax. Can only be set for GoogleSQL views.
    - `useLegacySql` boolean — Specifies whether to use BigQuery's legacy SQL for this view. The default value is true. If set to false, the view uses BigQuery's [GoogleSQL](https://docs.cloud.google.com/bigquery/docs/introduction-sql). Queries and views that reference this view must use the same flag value. A wrapper is used here because the default value is True.

## Response `200`

Successful response

---

[API](https://skmtc.dev/google/apis/bigquery.md) · [All operations](https://skmtc.dev/google/apis/bigquery/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/google/bigquery/revisions/98f33ea9c8c9/schema)
