blob: 5f2d43d1cb7ca13b034ce6cf0372cc1253d9e144 [file] [log] [blame]
John Asmuth614db982014-04-24 15:46:26 -04001<html><body>
2<style>
3
4body, h1, h2, h3, div, span, p, pre, a {
5 margin: 0;
6 padding: 0;
7 border: 0;
8 font-weight: inherit;
9 font-style: inherit;
10 font-size: 100%;
11 font-family: inherit;
12 vertical-align: baseline;
13}
14
15body {
16 font-size: 13px;
17 padding: 1em;
18}
19
20h1 {
21 font-size: 26px;
22 margin-bottom: 1em;
23}
24
25h2 {
26 font-size: 24px;
27 margin-bottom: 1em;
28}
29
30h3 {
31 font-size: 20px;
32 margin-bottom: 1em;
33 margin-top: 1em;
34}
35
36pre, code {
37 line-height: 1.5;
38 font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
39}
40
41pre {
42 margin-top: 0.5em;
43}
44
45h1, h2, h3, p {
46 font-family: Arial, sans serif;
47}
48
49h1, h2, h3 {
50 border-bottom: solid #CCC 1px;
51}
52
53.toc_element {
54 margin-top: 0.5em;
55}
56
57.firstline {
58 margin-left: 2 em;
59}
60
61.method {
62 margin-top: 1em;
63 border: solid 1px #CCC;
64 padding: 1em;
65 background: #EEE;
66}
67
68.details {
69 font-weight: bold;
70 font-size: 14px;
71}
72
73</style>
74
75<h1><a href="bigquery_v2.html">BigQuery API</a> . <a href="bigquery_v2.tables.html">tables</a></h1>
76<h2>Instance Methods</h2>
77<p class="toc_element">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -070078 <code><a href="#close">close()</a></code></p>
79<p class="firstline">Close httplib2 connections.</p>
80<p class="toc_element">
John Asmuth614db982014-04-24 15:46:26 -040081 <code><a href="#delete">delete(projectId, datasetId, tableId)</a></code></p>
82<p class="firstline">Deletes the table specified by tableId from the dataset. If the table contains data, all the data will be deleted.</p>
83<p class="toc_element">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070084 <code><a href="#get">get(projectId, datasetId, tableId, selectedFields=None)</a></code></p>
John Asmuth614db982014-04-24 15:46:26 -040085<p class="firstline">Gets the specified table resource by table ID. This method does not return the data in the table, it only returns the table resource, which describes the structure of this table.</p>
86<p class="toc_element">
Bu Sun Kim65020912020-05-20 12:08:20 -070087 <code><a href="#getIamPolicy">getIamPolicy(resource, body=None)</a></code></p>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -070088<p class="firstline">Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.</p>
Bu Sun Kim65020912020-05-20 12:08:20 -070089<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070090 <code><a href="#insert">insert(projectId, datasetId, body=None)</a></code></p>
John Asmuth614db982014-04-24 15:46:26 -040091<p class="firstline">Creates a new, empty table in the dataset.</p>
92<p class="toc_element">
93 <code><a href="#list">list(projectId, datasetId, pageToken=None, maxResults=None)</a></code></p>
Nathaniel Manista4f877e52015-06-15 16:44:50 +000094<p class="firstline">Lists all tables in the specified dataset. Requires the READER dataset role.</p>
John Asmuth614db982014-04-24 15:46:26 -040095<p class="toc_element">
96 <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p>
97<p class="firstline">Retrieves the next page of results.</p>
98<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070099 <code><a href="#patch">patch(projectId, datasetId, tableId, body=None)</a></code></p>
John Asmuth614db982014-04-24 15:46:26 -0400100<p class="firstline">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. This method supports patch semantics.</p>
101<p class="toc_element">
Bu Sun Kim65020912020-05-20 12:08:20 -0700102 <code><a href="#setIamPolicy">setIamPolicy(resource, body=None)</a></code></p>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700103<p class="firstline">Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.</p>
Bu Sun Kim65020912020-05-20 12:08:20 -0700104<p class="toc_element">
105 <code><a href="#testIamPermissions">testIamPermissions(resource, body=None)</a></code></p>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700106<p class="firstline">Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may "fail open" without warning.</p>
Bu Sun Kim65020912020-05-20 12:08:20 -0700107<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700108 <code><a href="#update">update(projectId, datasetId, tableId, body=None)</a></code></p>
John Asmuth614db982014-04-24 15:46:26 -0400109<p class="firstline">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.</p>
110<h3>Method Details</h3>
111<div class="method">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700112 <code class="details" id="close">close()</code>
113 <pre>Close httplib2 connections.</pre>
114</div>
115
116<div class="method">
John Asmuth614db982014-04-24 15:46:26 -0400117 <code class="details" id="delete">delete(projectId, datasetId, tableId)</code>
118 <pre>Deletes the table specified by tableId from the dataset. If the table contains data, all the data will be deleted.
119
120Args:
121 projectId: string, Project ID of the table to delete (required)
122 datasetId: string, Dataset ID of the table to delete (required)
123 tableId: string, Table ID of the table to delete (required)
124</pre>
125</div>
126
127<div class="method">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700128 <code class="details" id="get">get(projectId, datasetId, tableId, selectedFields=None)</code>
John Asmuth614db982014-04-24 15:46:26 -0400129 <pre>Gets the specified table resource by table ID. This method does not return the data in the table, it only returns the table resource, which describes the structure of this table.
130
131Args:
132 projectId: string, Project ID of the requested table (required)
133 datasetId: string, Dataset ID of the requested table (required)
134 tableId: string, Table ID of the requested table (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700135 selectedFields: string, List of fields to return (comma-separated). If unspecified, all fields are returned
John Asmuth614db982014-04-24 15:46:26 -0400136
137Returns:
138 An object of the form:
139
140 {
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700141 &quot;type&quot;: &quot;A String&quot;, # [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. SNAPSHOT: An immutable, read-only table that is a copy of another table. [TrustedTester] MATERIALIZED_VIEW: SQL query whose result is persisted. EXTERNAL: A table that references data stored in an external storage system, such as Google Cloud Storage. The default value is TABLE.
142 &quot;encryptionConfiguration&quot;: { # Custom encryption configuration (e.g., Cloud KMS keys).
143 &quot;kmsKeyName&quot;: &quot;A String&quot;, # [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.
144 },
145 &quot;tableReference&quot;: { # [Required] Reference describing the ID of this table.
146 &quot;datasetId&quot;: &quot;A String&quot;, # [Required] The ID of the dataset containing this table.
147 &quot;projectId&quot;: &quot;A String&quot;, # [Required] The ID of the project containing this table.
148 &quot;tableId&quot;: &quot;A String&quot;, # [Required] The ID of the table. The ID must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_). The maximum length is 1,024 characters.
149 },
150 &quot;numLongTermBytes&quot;: &quot;A String&quot;, # [Output-only] The number of bytes in the table that are considered &quot;long-term storage&quot;.
151 &quot;requirePartitionFilter&quot;: false, # [Optional] If set to true, queries over this table require a partition filter that can be used for partition elimination to be specified.
152 &quot;etag&quot;: &quot;A String&quot;, # [Output-only] A hash of the table metadata. Used to ensure there were no concurrent modifications to the resource when attempting an update. Not guaranteed to change when the table contents or the fields numRows, numBytes, numLongTermBytes or lastModifiedTime change.
153 &quot;expirationTime&quot;: &quot;A String&quot;, # [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.
154 &quot;location&quot;: &quot;A String&quot;, # [Output-only] The geographic location where the table resides. This value is inherited from the dataset.
155 &quot;friendlyName&quot;: &quot;A String&quot;, # [Optional] A descriptive name for this table.
156 &quot;numRows&quot;: &quot;A String&quot;, # [Output-only] The number of rows of data in this table, excluding any data in the streaming buffer.
157 &quot;model&quot;: { # [Output-only, Beta] Present iff this table represents a ML model. Describes the training information for the model, and it is required to run &#x27;PREDICT&#x27; queries.
158 &quot;modelOptions&quot;: { # [Output-only, Beta] Model options used for the first training run. These options are immutable for subsequent training runs. Default values are used for any options not specified in the input query.
159 &quot;lossType&quot;: &quot;A String&quot;,
160 &quot;labels&quot;: [
161 &quot;A String&quot;,
162 ],
163 &quot;modelType&quot;: &quot;A String&quot;,
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700164 },
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700165 &quot;trainingRuns&quot;: [ # [Output-only, Beta] Information about ml training runs, each training run comprises of multiple iterations and there may be multiple training runs for the model if warm start is used or if a user decides to continue a previously cancelled query.
166 {
167 &quot;state&quot;: &quot;A String&quot;, # [Output-only, Beta] Different state applicable for a training run. IN PROGRESS: Training run is in progress. FAILED: Training run ended due to a non-retryable failure. SUCCEEDED: Training run successfully completed. CANCELLED: Training run cancelled by the user.
168 &quot;startTime&quot;: &quot;A String&quot;, # [Output-only, Beta] Training run start time in milliseconds since the epoch.
169 &quot;iterationResults&quot;: [ # [Output-only, Beta] List of each iteration results.
170 {
171 &quot;index&quot;: 42, # [Output-only, Beta] Index of the ML training iteration, starting from zero for each training run.
172 &quot;learnRate&quot;: 3.14, # [Output-only, Beta] Learning rate used for this iteration, it varies for different training iterations if learn_rate_strategy option is not constant.
173 &quot;evalLoss&quot;: 3.14, # [Output-only, Beta] Eval loss computed on the eval data at the end of the iteration. The eval loss is used for early stopping to avoid overfitting. No eval loss if eval_split_method option is specified as no_split or auto_split with input data size less than 500 rows.
174 &quot;durationMs&quot;: &quot;A String&quot;, # [Output-only, Beta] Time taken to run the training iteration in milliseconds.
175 &quot;trainingLoss&quot;: 3.14, # [Output-only, Beta] Training loss computed on the training data at the end of the iteration. The training loss function is defined by model type.
176 },
177 ],
178 &quot;trainingOptions&quot;: { # [Output-only, Beta] Training options used by this training run. These options are mutable for subsequent training runs. Default values are explicitly stored for options not specified in the input query of the first training run. For subsequent training runs, any option not explicitly specified in the input query will be copied from the previous training run.
179 &quot;lineSearchInitLearnRate&quot;: 3.14,
180 &quot;maxIteration&quot;: &quot;A String&quot;,
181 &quot;learnRate&quot;: 3.14,
182 &quot;l1Reg&quot;: 3.14,
183 &quot;l2Reg&quot;: 3.14,
184 &quot;learnRateStrategy&quot;: &quot;A String&quot;,
185 &quot;earlyStop&quot;: True or False,
186 &quot;minRelProgress&quot;: 3.14,
187 &quot;warmStart&quot;: True or False,
188 },
189 },
190 ],
191 },
192 &quot;numPhysicalBytes&quot;: &quot;A String&quot;, # [Output-only] [TrustedTester] The physical size of this table in bytes, excluding any data in the streaming buffer. This includes compression and storage used for time travel.
193 &quot;creationTime&quot;: &quot;A String&quot;, # [Output-only] The time when this table was created, in milliseconds since the epoch.
194 &quot;selfLink&quot;: &quot;A String&quot;, # [Output-only] A URL that can be used to access this resource again.
195 &quot;id&quot;: &quot;A String&quot;, # [Output-only] An opaque ID uniquely identifying the table.
196 &quot;description&quot;: &quot;A String&quot;, # [Optional] A user-friendly description of this table.
197 &quot;snapshotDefinition&quot;: { # [Output-only] Snapshot definition.
198 &quot;baseTableReference&quot;: { # [Required] Reference describing the ID of the table that is snapshotted.
199 &quot;datasetId&quot;: &quot;A String&quot;, # [Required] The ID of the dataset containing this table.
200 &quot;projectId&quot;: &quot;A String&quot;, # [Required] The ID of the project containing this table.
201 &quot;tableId&quot;: &quot;A String&quot;, # [Required] The ID of the table. The ID must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_). The maximum length is 1,024 characters.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700202 },
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700203 &quot;snapshotTime&quot;: &quot;A String&quot;, # [Required] The time at which the base table was snapshot.
204 },
205 &quot;view&quot;: { # [Optional] The view definition.
206 &quot;useLegacySql&quot;: True or False, # Specifies whether to use BigQuery&#x27;s legacy SQL for this view. The default value is true. If set to false, the view will use BigQuery&#x27;s standard SQL: https://cloud.google.com/bigquery/sql-reference/ Queries and views that reference this view must use the same flag value.
207 &quot;query&quot;: &quot;A String&quot;, # [Required] A query that BigQuery executes when the view is referenced.
208 &quot;userDefinedFunctionResources&quot;: [ # Describes user-defined function resources used in the query.
209 { # This is used for defining User Defined Function (UDF) resources only when using legacy SQL. Users of Standard SQL should leverage either DDL (e.g. CREATE [TEMPORARY] FUNCTION ... ) or the Routines API to define UDF resources. For additional information on migrating, see: https://cloud.google.com/bigquery/docs/reference/standard-sql/migrating-from-legacy-sql#differences_in_user-defined_javascript_functions
210 &quot;resourceUri&quot;: &quot;A String&quot;, # [Pick one] A code resource to load from a Google Cloud Storage URI (gs://bucket/path).
211 &quot;inlineCode&quot;: &quot;A String&quot;, # [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.
212 },
213 ],
214 },
215 &quot;externalDataConfiguration&quot;: { # [Optional] Describes the data format, location, and other properties of a table stored outside of BigQuery. By defining these properties, the data source can then be queried as if it were a standard BigQuery table.
216 &quot;connectionId&quot;: &quot;A String&quot;, # [Optional, Trusted Tester] Connection for external data source.
217 &quot;sourceFormat&quot;: &quot;A String&quot;, # [Required] The data format. For CSV files, specify &quot;CSV&quot;. For Google sheets, specify &quot;GOOGLE_SHEETS&quot;. For newline-delimited JSON, specify &quot;NEWLINE_DELIMITED_JSON&quot;. For Avro files, specify &quot;AVRO&quot;. For Google Cloud Datastore backups, specify &quot;DATASTORE_BACKUP&quot;. [Beta] For Google Cloud Bigtable, specify &quot;BIGTABLE&quot;.
218 &quot;bigtableOptions&quot;: { # [Optional] Additional options if sourceFormat is set to BIGTABLE.
219 &quot;columnFamilies&quot;: [ # [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 &#x27;type&#x27; 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.
220 {
221 &quot;columns&quot;: [ # [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 .Column field.
222 {
223 &quot;qualifierString&quot;: &quot;A String&quot;,
224 &quot;qualifierEncoded&quot;: &quot;A String&quot;, # [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-zA-Z0-9_]*, a valid identifier must be provided as field_name.
225 &quot;encoding&quot;: &quot;A String&quot;, # [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. &#x27;encoding&#x27; can also be set at the column family level. However, the setting at this level takes precedence if &#x27;encoding&#x27; is set at both levels.
226 &quot;fieldName&quot;: &quot;A String&quot;, # [Optional] If the qualifier is not a valid BigQuery field identifier i.e. does not match [a-zA-Z][a-zA-Z0-9_]*, a valid identifier must be provided as the column field name and is used as field name in queries.
227 &quot;onlyReadLatest&quot;: True or False, # [Optional] If this is set, only the latest version of value in this column are exposed. &#x27;onlyReadLatest&#x27; can also be set at the column family level. However, the setting at this level takes precedence if &#x27;onlyReadLatest&#x27; is set at both levels.
228 &quot;type&quot;: &quot;A String&quot;, # [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 Default type is BYTES. &#x27;type&#x27; can also be set at the column family level. However, the setting at this level takes precedence if &#x27;type&#x27; is set at both levels.
229 },
230 ],
231 &quot;type&quot;: &quot;A String&quot;, # [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 Default type is BYTES. This can be overridden for a specific column by listing that column in &#x27;columns&#x27; and specifying a type for it.
232 &quot;encoding&quot;: &quot;A String&quot;, # [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. This can be overridden for a specific column by listing that column in &#x27;columns&#x27; and specifying an encoding for it.
233 &quot;familyId&quot;: &quot;A String&quot;, # Identifier of the column family.
234 &quot;onlyReadLatest&quot;: True or False, # [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 &#x27;columns&#x27; and specifying a different setting for that column.
235 },
236 ],
237 &quot;ignoreUnspecifiedColumnFamilies&quot;: True or False, # [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.
238 &quot;readRowkeyAsString&quot;: True or False, # [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.
239 },
240 &quot;schema&quot;: { # [Optional] The schema for the data. Schema is required for CSV and JSON formats. Schema is disallowed for Google Cloud Bigtable, Cloud Datastore backups, and Avro formats.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700241 &quot;fields&quot;: [ # Describes the fields in a table.
242 {
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700243 &quot;description&quot;: &quot;A String&quot;, # [Optional] The field description. The maximum length is 1,024 characters.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700244 &quot;categories&quot;: { # [Optional] The categories attached to this field, used for field-level access control.
245 &quot;names&quot;: [ # A list of category resource names. For example, &quot;projects/1/taxonomies/2/categories/3&quot;. At most 5 categories are allowed.
246 &quot;A String&quot;,
247 ],
248 },
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700249 &quot;type&quot;: &quot;A String&quot;, # [Required] The field data type. Possible values include STRING, BYTES, INTEGER, INT64 (same as INTEGER), FLOAT, FLOAT64 (same as FLOAT), BOOLEAN, BOOL (same as BOOLEAN), TIMESTAMP, DATE, TIME, DATETIME, RECORD (where RECORD indicates that the field contains a nested schema) or STRUCT (same as RECORD).
250 &quot;fields&quot;: [ # [Optional] Describes the nested schema fields if the type property is set to RECORD.
251 # Object with schema name: TableFieldSchema
252 ],
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700253 &quot;policyTags&quot;: {
254 &quot;names&quot;: [ # A list of category resource names. For example, &quot;projects/1/location/eu/taxonomies/2/policyTags/3&quot;. At most 1 policy tag is allowed.
255 &quot;A String&quot;,
256 ],
257 },
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700258 &quot;mode&quot;: &quot;A String&quot;, # [Optional] The field mode. Possible values include NULLABLE, REQUIRED and REPEATED. The default value is NULLABLE.
259 &quot;name&quot;: &quot;A String&quot;, # [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 128 characters.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700260 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700261 ],
262 },
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700263 &quot;ignoreUnknownValues&quot;: True or False, # [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&#x27;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.
264 &quot;hivePartitioningOptions&quot;: { # [Optional, Trusted Tester] Options to configure hive partitioning support.
265 &quot;mode&quot;: &quot;A String&quot;, # [Optional] When set, what mode of hive partitioning to use when reading data. The following modes are supported. (1) AUTO: automatically infer partition key name(s) and type(s). (2) STRINGS: automatically infer partition key name(s). All types are interpreted as strings. (3) 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 types include: AVRO, CSV, JSON, ORC and Parquet.
266 &quot;sourceUriPrefix&quot;: &quot;A String&quot;, # [Optional] When hive partition detection is requested, a common prefix for all source uris should be supplied. 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-01-01/country=BR/id=7/file.avro gs://bucket/path_to_table/dt=2018-12-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/ (trailing slash does not matter).
267 &quot;requirePartitionFilter&quot;: True or False, # [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 requirePartitionFilter explicitly set to true will fail.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700268 },
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700269 &quot;compression&quot;: &quot;A String&quot;, # [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 and Avro formats.
270 &quot;maxBadRecords&quot;: 42, # [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. This is only valid for CSV, JSON, and Google Sheets. The default value is 0, which requires that all records are valid. This setting is ignored for Google Cloud Bigtable, Google Cloud Datastore backups and Avro formats.
271 &quot;googleSheetsOptions&quot;: { # [Optional] Additional options if sourceFormat is set to GOOGLE_SHEETS.
272 &quot;skipLeadingRows&quot;: &quot;A String&quot;, # [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, 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 &gt; 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.
273 &quot;range&quot;: &quot;A String&quot;, # [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
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700274 },
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700275 &quot;sourceUris&quot;: [ # [Required] The fully-qualified URIs that point to your data in Google Cloud. For Google Cloud Storage URIs: Each URI can contain one &#x27;*&#x27; wildcard character and it must come after the &#x27;bucket&#x27; 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 &#x27;*&#x27; wildcard character is not allowed.
276 &quot;A String&quot;,
277 ],
278 &quot;csvOptions&quot;: { # Additional properties to set if sourceFormat is set to CSV.
279 &quot;quote&quot;: &quot;&quot;&quot;, # [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 (&#x27;&quot;&#x27;). 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.
280 &quot;skipLeadingRows&quot;: &quot;A String&quot;, # [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 &gt; 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.
281 &quot;allowQuotedNewlines&quot;: True or False, # [Optional] Indicates if BigQuery should allow quoted data sections that contain newline characters in a CSV file. The default value is false.
282 &quot;fieldDelimiter&quot;: &quot;A String&quot;, # [Optional] The separator for fields 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. BigQuery also supports the escape sequence &quot;\t&quot; to specify a tab separator. The default value is a comma (&#x27;,&#x27;).
283 &quot;encoding&quot;: &quot;A String&quot;, # [Optional] The character encoding of the data. The supported values are UTF-8 or ISO-8859-1. 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.
284 &quot;allowJaggedRows&quot;: True or False, # [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.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700285 },
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700286 &quot;autodetect&quot;: True or False, # Try to detect schema and format options automatically. Any option specified explicitly will be honored.
287 },
288 &quot;labels&quot;: { # 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.
289 &quot;a_key&quot;: &quot;A String&quot;,
290 },
291 &quot;lastModifiedTime&quot;: &quot;A String&quot;, # [Output-only] The time when this table was last modified, in milliseconds since the epoch.
292 &quot;schema&quot;: { # [Optional] Describes the schema of this table.
293 &quot;fields&quot;: [ # Describes the fields in a table.
294 {
295 &quot;description&quot;: &quot;A String&quot;, # [Optional] The field description. The maximum length is 1,024 characters.
296 &quot;categories&quot;: { # [Optional] The categories attached to this field, used for field-level access control.
297 &quot;names&quot;: [ # A list of category resource names. For example, &quot;projects/1/taxonomies/2/categories/3&quot;. At most 5 categories are allowed.
298 &quot;A String&quot;,
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700299 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700300 },
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700301 &quot;type&quot;: &quot;A String&quot;, # [Required] The field data type. Possible values include STRING, BYTES, INTEGER, INT64 (same as INTEGER), FLOAT, FLOAT64 (same as FLOAT), BOOLEAN, BOOL (same as BOOLEAN), TIMESTAMP, DATE, TIME, DATETIME, RECORD (where RECORD indicates that the field contains a nested schema) or STRUCT (same as RECORD).
302 &quot;fields&quot;: [ # [Optional] Describes the nested schema fields if the type property is set to RECORD.
303 # Object with schema name: TableFieldSchema
304 ],
305 &quot;policyTags&quot;: {
306 &quot;names&quot;: [ # A list of category resource names. For example, &quot;projects/1/location/eu/taxonomies/2/policyTags/3&quot;. At most 1 policy tag is allowed.
307 &quot;A String&quot;,
308 ],
309 },
310 &quot;mode&quot;: &quot;A String&quot;, # [Optional] The field mode. Possible values include NULLABLE, REQUIRED and REPEATED. The default value is NULLABLE.
311 &quot;name&quot;: &quot;A String&quot;, # [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 128 characters.
312 },
313 ],
314 },
315 &quot;timePartitioning&quot;: { # Time-based partitioning specification for this table. Only one of timePartitioning and rangePartitioning should be specified.
316 &quot;field&quot;: &quot;A String&quot;, # [Beta] [Optional] If not set, the table is partitioned by pseudo column, referenced via either &#x27;_PARTITIONTIME&#x27; as TIMESTAMP type, or &#x27;_PARTITIONDATE&#x27; as DATE type. If field is specified, the table is instead partitioned by this field. The field must be a top-level TIMESTAMP or DATE field. Its mode must be NULLABLE or REQUIRED.
317 &quot;expirationMs&quot;: &quot;A String&quot;, # [Optional] Number of milliseconds for which to keep the storage for partitions in the table. The storage in a partition will have an expiration time of its partition time plus this value.
318 &quot;requirePartitionFilter&quot;: True or False,
319 &quot;type&quot;: &quot;A String&quot;, # [Required] The supported types are DAY, HOUR, MONTH, and YEAR, which will generate one partition per day, hour, month, and year, respectively. When the type is not specified, the default behavior is DAY.
320 },
321 &quot;kind&quot;: &quot;bigquery#table&quot;, # [Output-only] The type of the resource.
322 &quot;materializedView&quot;: { # [Optional] Materialized view definition.
323 &quot;query&quot;: &quot;A String&quot;, # [Required] A query whose result is persisted.
324 &quot;lastRefreshTime&quot;: &quot;A String&quot;, # [Output-only] [TrustedTester] The time when this materialized view was last modified, in milliseconds since the epoch.
325 &quot;enableRefresh&quot;: True or False, # [Optional] [TrustedTester] Enable automatic refresh of the materialized view when the base table is updated. The default value is &quot;true&quot;.
326 &quot;refreshIntervalMs&quot;: &quot;A String&quot;, # [Optional] [TrustedTester] The maximum frequency at which this materialized view will be refreshed. The default value is &quot;1800000&quot; (30 minutes).
327 },
328 &quot;streamingBuffer&quot;: { # [Output-only] Contains information regarding this table&#x27;s streaming buffer, if one is present. This field will be absent if the table is not being streamed to or if there is no data in the streaming buffer.
329 &quot;oldestEntryTime&quot;: &quot;A String&quot;, # [Output-only] Contains the timestamp of the oldest entry in the streaming buffer, in milliseconds since the epoch, if the streaming buffer is available.
330 &quot;estimatedRows&quot;: &quot;A String&quot;, # [Output-only] A lower-bound estimate of the number of rows currently in the streaming buffer.
331 &quot;estimatedBytes&quot;: &quot;A String&quot;, # [Output-only] A lower-bound estimate of the number of bytes currently in the streaming buffer.
332 },
333 &quot;clustering&quot;: { # [Beta] Clustering specification for the table. Must be specified with partitioning, data in the table will be first partitioned and subsequently clustered.
334 &quot;fields&quot;: [ # [Repeated] One or more fields on which data should be clustered. Only top-level, non-repeated, simple-type fields are supported. When you cluster a table using multiple columns, the order of columns you specify is important. The order of the specified columns determines the sort order of the data.
335 &quot;A String&quot;,
336 ],
337 },
338 &quot;rangePartitioning&quot;: { # [TrustedTester] Range partitioning specification for this table. Only one of timePartitioning and rangePartitioning should be specified.
339 &quot;range&quot;: { # [TrustedTester] [Required] Defines the ranges for range partitioning.
340 &quot;start&quot;: &quot;A String&quot;, # [TrustedTester] [Required] The start of range partitioning, inclusive.
341 &quot;interval&quot;: &quot;A String&quot;, # [TrustedTester] [Required] The width of each interval.
342 &quot;end&quot;: &quot;A String&quot;, # [TrustedTester] [Required] The end of range partitioning, exclusive.
Bu Sun Kim65020912020-05-20 12:08:20 -0700343 },
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700344 &quot;field&quot;: &quot;A String&quot;, # [TrustedTester] [Required] The table is partitioned by this field. The field must be a top-level NULLABLE/REQUIRED field. The only supported type is INTEGER/INT64.
345 },
346 &quot;numBytes&quot;: &quot;A String&quot;, # [Output-only] The size of this table in bytes, excluding any data in the streaming buffer.
347 }</pre>
John Asmuth614db982014-04-24 15:46:26 -0400348</div>
349
350<div class="method">
Bu Sun Kim65020912020-05-20 12:08:20 -0700351 <code class="details" id="getIamPolicy">getIamPolicy(resource, body=None)</code>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700352 <pre>Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.
Bu Sun Kim65020912020-05-20 12:08:20 -0700353
354Args:
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700355 resource: string, REQUIRED: The resource for which the policy is being requested. See the operation documentation for the appropriate value for this field. (required)
Bu Sun Kim65020912020-05-20 12:08:20 -0700356 body: object, The request body.
357 The object takes the form of:
358
359{ # Request message for `GetIamPolicy` method.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700360 &quot;options&quot;: { # Encapsulates settings provided to GetIamPolicy. # OPTIONAL: A `GetPolicyOptions` object for specifying options to `GetIamPolicy`.
361 &quot;requestedPolicyVersion&quot;: 42, # Optional. The policy format version to be returned. Valid values are 0, 1, and 3. Requests specifying an invalid value will be rejected. Requests for policies with any conditional bindings must specify version 3. Policies without any conditional bindings may specify any valid value or leave the field unset. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
Bu Sun Kim65020912020-05-20 12:08:20 -0700362 },
363 }
364
365
366Returns:
367 An object of the form:
368
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700369 { # An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources. A `Policy` is a collection of `bindings`. A `binding` binds one or more `members` to a single `role`. Members can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role. For some types of Google Cloud resources, a `binding` can also specify a `condition`, which is a logical expression that allows access to a resource only if the expression evaluates to `true`. A condition can add constraints based on attributes of the request, the resource, or both. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). **JSON example:** { &quot;bindings&quot;: [ { &quot;role&quot;: &quot;roles/resourcemanager.organizationAdmin&quot;, &quot;members&quot;: [ &quot;user:mike@example.com&quot;, &quot;group:admins@example.com&quot;, &quot;domain:google.com&quot;, &quot;serviceAccount:my-project-id@appspot.gserviceaccount.com&quot; ] }, { &quot;role&quot;: &quot;roles/resourcemanager.organizationViewer&quot;, &quot;members&quot;: [ &quot;user:eve@example.com&quot; ], &quot;condition&quot;: { &quot;title&quot;: &quot;expirable access&quot;, &quot;description&quot;: &quot;Does not grant access after Sep 2020&quot;, &quot;expression&quot;: &quot;request.time &lt; timestamp(&#x27;2020-10-01T00:00:00.000Z&#x27;)&quot;, } } ], &quot;etag&quot;: &quot;BwWWja0YfJA=&quot;, &quot;version&quot;: 3 } **YAML example:** bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time &lt; timestamp(&#x27;2020-10-01T00:00:00.000Z&#x27;) - etag: BwWWja0YfJA= - version: 3 For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/).
370 &quot;version&quot;: 42, # Specifies the format of the policy. Valid values are `0`, `1`, and `3`. Requests that specify an invalid value are rejected. Any operation that affects conditional role bindings must specify version `3`. This requirement applies to the following operations: * Getting a policy that includes a conditional role binding * Adding a conditional role binding to a policy * Changing a conditional role binding in a policy * Removing any role binding, with or without a condition, from a policy that includes conditions **Important:** If you use IAM Conditions, you must include the `etag` field whenever you call `setIamPolicy`. If you omit this field, then IAM allows you to overwrite a version `3` policy with a version `1` policy, and all of the conditions in the version `3` policy are lost. If a policy does not include any conditions, operations on that policy may specify any valid version or leave the field unset. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
Bu Sun Kim65020912020-05-20 12:08:20 -0700371 &quot;auditConfigs&quot;: [ # Specifies cloud audit logging configuration for this policy.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700372 { # Specifies the audit configuration for a service. The configuration determines which permission types are logged, and what identities, if any, are exempted from logging. An AuditConfig must have one or more AuditLogConfigs. If there are AuditConfigs for both `allServices` and a specific service, the union of the two AuditConfigs is used for that service: the log_types specified in each AuditConfig are enabled, and the exempted_members in each AuditLogConfig are exempted. Example Policy with multiple AuditConfigs: { &quot;audit_configs&quot;: [ { &quot;service&quot;: &quot;allServices&quot;, &quot;audit_log_configs&quot;: [ { &quot;log_type&quot;: &quot;DATA_READ&quot;, &quot;exempted_members&quot;: [ &quot;user:jose@example.com&quot; ] }, { &quot;log_type&quot;: &quot;DATA_WRITE&quot; }, { &quot;log_type&quot;: &quot;ADMIN_READ&quot; } ] }, { &quot;service&quot;: &quot;sampleservice.googleapis.com&quot;, &quot;audit_log_configs&quot;: [ { &quot;log_type&quot;: &quot;DATA_READ&quot; }, { &quot;log_type&quot;: &quot;DATA_WRITE&quot;, &quot;exempted_members&quot;: [ &quot;user:aliya@example.com&quot; ] } ] } ] } For sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ logging. It also exempts jose@example.com from DATA_READ logging, and aliya@example.com from DATA_WRITE logging.
373 &quot;service&quot;: &quot;A String&quot;, # Specifies a service that will be enabled for audit logging. For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. `allServices` is a special value that covers all services.
Bu Sun Kim65020912020-05-20 12:08:20 -0700374 &quot;auditLogConfigs&quot;: [ # The configuration for logging of each type of permission.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700375 { # Provides the configuration for logging a type of permissions. Example: { &quot;audit_log_configs&quot;: [ { &quot;log_type&quot;: &quot;DATA_READ&quot;, &quot;exempted_members&quot;: [ &quot;user:jose@example.com&quot; ] }, { &quot;log_type&quot;: &quot;DATA_WRITE&quot; } ] } This enables &#x27;DATA_READ&#x27; and &#x27;DATA_WRITE&#x27; logging, while exempting jose@example.com from DATA_READ logging.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700376 &quot;exemptedMembers&quot;: [ # Specifies the identities that do not cause logging for this type of permission. Follows the same format of Binding.members.
Bu Sun Kim65020912020-05-20 12:08:20 -0700377 &quot;A String&quot;,
378 ],
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700379 &quot;logType&quot;: &quot;A String&quot;, # The log type that this config enables.
Bu Sun Kim65020912020-05-20 12:08:20 -0700380 },
381 ],
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700382 },
383 ],
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700384 &quot;etag&quot;: &quot;A String&quot;, # `etag` is used for optimistic concurrency control as a way to help prevent simultaneous updates of a policy from overwriting each other. It is strongly suggested that systems make use of the `etag` in the read-modify-write cycle to perform policy updates in order to avoid race conditions: An `etag` is returned in the response to `getIamPolicy`, and systems are expected to put that etag in the request to `setIamPolicy` to ensure that their change will be applied to the same version of the policy. **Important:** If you use IAM Conditions, you must include the `etag` field whenever you call `setIamPolicy`. If you omit this field, then IAM allows you to overwrite a version `3` policy with a version `1` policy, and all of the conditions in the version `3` policy are lost.
385 &quot;bindings&quot;: [ # Associates a list of `members` to a `role`. Optionally, may specify a `condition` that determines how and when the `bindings` are applied. Each of the `bindings` must contain at least one member.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700386 { # Associates `members` with a `role`.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700387 &quot;members&quot;: [ # Specifies the identities requesting access for a Cloud Platform resource. `members` can have the following values: * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account. * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account. * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` . * `serviceAccount:{emailid}`: An email address that represents a service account. For example, `my-other-app@appspot.gserviceaccount.com`. * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`. * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a user that has been recently deleted. For example, `alice@example.com?uid=123456789012345678901`. If the user is recovered, this value reverts to `user:{emailid}` and the recovered user retains the role in the binding. * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a service account that has been recently deleted. For example, `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. If the service account is undeleted, this value reverts to `serviceAccount:{emailid}` and the undeleted service account retains the role in the binding. * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a Google group that has been recently deleted. For example, `admins@example.com?uid=123456789012345678901`. If the group is recovered, this value reverts to `group:{emailid}` and the recovered group retains the role in the binding. * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700388 &quot;A String&quot;,
389 ],
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700390 &quot;role&quot;: &quot;A String&quot;, # Role that is assigned to `members`. For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
391 &quot;bindingId&quot;: &quot;A String&quot;,
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700392 &quot;condition&quot;: { # Represents a textual expression in the Common Expression Language (CEL) syntax. CEL is a C-like expression language. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec. Example (Comparison): title: &quot;Summary size limit&quot; description: &quot;Determines if a summary is less than 100 chars&quot; expression: &quot;document.summary.size() &lt; 100&quot; Example (Equality): title: &quot;Requestor is owner&quot; description: &quot;Determines if requestor is the document owner&quot; expression: &quot;document.owner == request.auth.claims.email&quot; Example (Logic): title: &quot;Public documents&quot; description: &quot;Determine whether the document should be publicly visible&quot; expression: &quot;document.type != &#x27;private&#x27; &amp;&amp; document.type != &#x27;internal&#x27;&quot; Example (Data Manipulation): title: &quot;Notification string&quot; description: &quot;Create a notification string with a timestamp.&quot; expression: &quot;&#x27;New message received at &#x27; + string(document.create_time)&quot; The exact variables and functions that may be referenced within an expression are determined by the service that evaluates it. See the service documentation for additional information. # The condition that is associated with this binding. If the condition evaluates to `true`, then this binding applies to the current request. If the condition evaluates to `false`, then this binding does not apply to the current request. However, a different role binding might grant the same role to one or more of the members in this binding. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700393 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language syntax.
394 &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700395 &quot;location&quot;: &quot;A String&quot;, # Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700396 &quot;description&quot;: &quot;A String&quot;, # Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.
397 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700398 },
399 ],
400 }</pre>
401</div>
402
403<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700404 <code class="details" id="insert">insert(projectId, datasetId, body=None)</code>
John Asmuth614db982014-04-24 15:46:26 -0400405 <pre>Creates a new, empty table in the dataset.
406
407Args:
408 projectId: string, Project ID of the new table (required)
409 datasetId: string, Dataset ID of the new table (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700410 body: object, The request body.
John Asmuth614db982014-04-24 15:46:26 -0400411 The object takes the form of:
412
413{
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700414 &quot;type&quot;: &quot;A String&quot;, # [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. SNAPSHOT: An immutable, read-only table that is a copy of another table. [TrustedTester] MATERIALIZED_VIEW: SQL query whose result is persisted. EXTERNAL: A table that references data stored in an external storage system, such as Google Cloud Storage. The default value is TABLE.
415 &quot;encryptionConfiguration&quot;: { # Custom encryption configuration (e.g., Cloud KMS keys).
416 &quot;kmsKeyName&quot;: &quot;A String&quot;, # [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.
417 },
418 &quot;tableReference&quot;: { # [Required] Reference describing the ID of this table.
419 &quot;datasetId&quot;: &quot;A String&quot;, # [Required] The ID of the dataset containing this table.
420 &quot;projectId&quot;: &quot;A String&quot;, # [Required] The ID of the project containing this table.
421 &quot;tableId&quot;: &quot;A String&quot;, # [Required] The ID of the table. The ID must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_). The maximum length is 1,024 characters.
422 },
423 &quot;numLongTermBytes&quot;: &quot;A String&quot;, # [Output-only] The number of bytes in the table that are considered &quot;long-term storage&quot;.
424 &quot;requirePartitionFilter&quot;: false, # [Optional] If set to true, queries over this table require a partition filter that can be used for partition elimination to be specified.
425 &quot;etag&quot;: &quot;A String&quot;, # [Output-only] A hash of the table metadata. Used to ensure there were no concurrent modifications to the resource when attempting an update. Not guaranteed to change when the table contents or the fields numRows, numBytes, numLongTermBytes or lastModifiedTime change.
426 &quot;expirationTime&quot;: &quot;A String&quot;, # [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.
427 &quot;location&quot;: &quot;A String&quot;, # [Output-only] The geographic location where the table resides. This value is inherited from the dataset.
428 &quot;friendlyName&quot;: &quot;A String&quot;, # [Optional] A descriptive name for this table.
429 &quot;numRows&quot;: &quot;A String&quot;, # [Output-only] The number of rows of data in this table, excluding any data in the streaming buffer.
430 &quot;model&quot;: { # [Output-only, Beta] Present iff this table represents a ML model. Describes the training information for the model, and it is required to run &#x27;PREDICT&#x27; queries.
431 &quot;modelOptions&quot;: { # [Output-only, Beta] Model options used for the first training run. These options are immutable for subsequent training runs. Default values are used for any options not specified in the input query.
432 &quot;lossType&quot;: &quot;A String&quot;,
433 &quot;labels&quot;: [
434 &quot;A String&quot;,
435 ],
436 &quot;modelType&quot;: &quot;A String&quot;,
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700437 },
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700438 &quot;trainingRuns&quot;: [ # [Output-only, Beta] Information about ml training runs, each training run comprises of multiple iterations and there may be multiple training runs for the model if warm start is used or if a user decides to continue a previously cancelled query.
439 {
440 &quot;state&quot;: &quot;A String&quot;, # [Output-only, Beta] Different state applicable for a training run. IN PROGRESS: Training run is in progress. FAILED: Training run ended due to a non-retryable failure. SUCCEEDED: Training run successfully completed. CANCELLED: Training run cancelled by the user.
441 &quot;startTime&quot;: &quot;A String&quot;, # [Output-only, Beta] Training run start time in milliseconds since the epoch.
442 &quot;iterationResults&quot;: [ # [Output-only, Beta] List of each iteration results.
443 {
444 &quot;index&quot;: 42, # [Output-only, Beta] Index of the ML training iteration, starting from zero for each training run.
445 &quot;learnRate&quot;: 3.14, # [Output-only, Beta] Learning rate used for this iteration, it varies for different training iterations if learn_rate_strategy option is not constant.
446 &quot;evalLoss&quot;: 3.14, # [Output-only, Beta] Eval loss computed on the eval data at the end of the iteration. The eval loss is used for early stopping to avoid overfitting. No eval loss if eval_split_method option is specified as no_split or auto_split with input data size less than 500 rows.
447 &quot;durationMs&quot;: &quot;A String&quot;, # [Output-only, Beta] Time taken to run the training iteration in milliseconds.
448 &quot;trainingLoss&quot;: 3.14, # [Output-only, Beta] Training loss computed on the training data at the end of the iteration. The training loss function is defined by model type.
449 },
450 ],
451 &quot;trainingOptions&quot;: { # [Output-only, Beta] Training options used by this training run. These options are mutable for subsequent training runs. Default values are explicitly stored for options not specified in the input query of the first training run. For subsequent training runs, any option not explicitly specified in the input query will be copied from the previous training run.
452 &quot;lineSearchInitLearnRate&quot;: 3.14,
453 &quot;maxIteration&quot;: &quot;A String&quot;,
454 &quot;learnRate&quot;: 3.14,
455 &quot;l1Reg&quot;: 3.14,
456 &quot;l2Reg&quot;: 3.14,
457 &quot;learnRateStrategy&quot;: &quot;A String&quot;,
458 &quot;earlyStop&quot;: True or False,
459 &quot;minRelProgress&quot;: 3.14,
460 &quot;warmStart&quot;: True or False,
461 },
462 },
463 ],
464 },
465 &quot;numPhysicalBytes&quot;: &quot;A String&quot;, # [Output-only] [TrustedTester] The physical size of this table in bytes, excluding any data in the streaming buffer. This includes compression and storage used for time travel.
466 &quot;creationTime&quot;: &quot;A String&quot;, # [Output-only] The time when this table was created, in milliseconds since the epoch.
467 &quot;selfLink&quot;: &quot;A String&quot;, # [Output-only] A URL that can be used to access this resource again.
468 &quot;id&quot;: &quot;A String&quot;, # [Output-only] An opaque ID uniquely identifying the table.
469 &quot;description&quot;: &quot;A String&quot;, # [Optional] A user-friendly description of this table.
470 &quot;snapshotDefinition&quot;: { # [Output-only] Snapshot definition.
471 &quot;baseTableReference&quot;: { # [Required] Reference describing the ID of the table that is snapshotted.
472 &quot;datasetId&quot;: &quot;A String&quot;, # [Required] The ID of the dataset containing this table.
473 &quot;projectId&quot;: &quot;A String&quot;, # [Required] The ID of the project containing this table.
474 &quot;tableId&quot;: &quot;A String&quot;, # [Required] The ID of the table. The ID must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_). The maximum length is 1,024 characters.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700475 },
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700476 &quot;snapshotTime&quot;: &quot;A String&quot;, # [Required] The time at which the base table was snapshot.
477 },
478 &quot;view&quot;: { # [Optional] The view definition.
479 &quot;useLegacySql&quot;: True or False, # Specifies whether to use BigQuery&#x27;s legacy SQL for this view. The default value is true. If set to false, the view will use BigQuery&#x27;s standard SQL: https://cloud.google.com/bigquery/sql-reference/ Queries and views that reference this view must use the same flag value.
480 &quot;query&quot;: &quot;A String&quot;, # [Required] A query that BigQuery executes when the view is referenced.
481 &quot;userDefinedFunctionResources&quot;: [ # Describes user-defined function resources used in the query.
482 { # This is used for defining User Defined Function (UDF) resources only when using legacy SQL. Users of Standard SQL should leverage either DDL (e.g. CREATE [TEMPORARY] FUNCTION ... ) or the Routines API to define UDF resources. For additional information on migrating, see: https://cloud.google.com/bigquery/docs/reference/standard-sql/migrating-from-legacy-sql#differences_in_user-defined_javascript_functions
483 &quot;resourceUri&quot;: &quot;A String&quot;, # [Pick one] A code resource to load from a Google Cloud Storage URI (gs://bucket/path).
484 &quot;inlineCode&quot;: &quot;A String&quot;, # [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.
485 },
486 ],
487 },
488 &quot;externalDataConfiguration&quot;: { # [Optional] Describes the data format, location, and other properties of a table stored outside of BigQuery. By defining these properties, the data source can then be queried as if it were a standard BigQuery table.
489 &quot;connectionId&quot;: &quot;A String&quot;, # [Optional, Trusted Tester] Connection for external data source.
490 &quot;sourceFormat&quot;: &quot;A String&quot;, # [Required] The data format. For CSV files, specify &quot;CSV&quot;. For Google sheets, specify &quot;GOOGLE_SHEETS&quot;. For newline-delimited JSON, specify &quot;NEWLINE_DELIMITED_JSON&quot;. For Avro files, specify &quot;AVRO&quot;. For Google Cloud Datastore backups, specify &quot;DATASTORE_BACKUP&quot;. [Beta] For Google Cloud Bigtable, specify &quot;BIGTABLE&quot;.
491 &quot;bigtableOptions&quot;: { # [Optional] Additional options if sourceFormat is set to BIGTABLE.
492 &quot;columnFamilies&quot;: [ # [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 &#x27;type&#x27; 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.
493 {
494 &quot;columns&quot;: [ # [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 .Column field.
495 {
496 &quot;qualifierString&quot;: &quot;A String&quot;,
497 &quot;qualifierEncoded&quot;: &quot;A String&quot;, # [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-zA-Z0-9_]*, a valid identifier must be provided as field_name.
498 &quot;encoding&quot;: &quot;A String&quot;, # [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. &#x27;encoding&#x27; can also be set at the column family level. However, the setting at this level takes precedence if &#x27;encoding&#x27; is set at both levels.
499 &quot;fieldName&quot;: &quot;A String&quot;, # [Optional] If the qualifier is not a valid BigQuery field identifier i.e. does not match [a-zA-Z][a-zA-Z0-9_]*, a valid identifier must be provided as the column field name and is used as field name in queries.
500 &quot;onlyReadLatest&quot;: True or False, # [Optional] If this is set, only the latest version of value in this column are exposed. &#x27;onlyReadLatest&#x27; can also be set at the column family level. However, the setting at this level takes precedence if &#x27;onlyReadLatest&#x27; is set at both levels.
501 &quot;type&quot;: &quot;A String&quot;, # [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 Default type is BYTES. &#x27;type&#x27; can also be set at the column family level. However, the setting at this level takes precedence if &#x27;type&#x27; is set at both levels.
502 },
503 ],
504 &quot;type&quot;: &quot;A String&quot;, # [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 Default type is BYTES. This can be overridden for a specific column by listing that column in &#x27;columns&#x27; and specifying a type for it.
505 &quot;encoding&quot;: &quot;A String&quot;, # [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. This can be overridden for a specific column by listing that column in &#x27;columns&#x27; and specifying an encoding for it.
506 &quot;familyId&quot;: &quot;A String&quot;, # Identifier of the column family.
507 &quot;onlyReadLatest&quot;: True or False, # [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 &#x27;columns&#x27; and specifying a different setting for that column.
508 },
509 ],
510 &quot;ignoreUnspecifiedColumnFamilies&quot;: True or False, # [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.
511 &quot;readRowkeyAsString&quot;: True or False, # [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.
512 },
513 &quot;schema&quot;: { # [Optional] The schema for the data. Schema is required for CSV and JSON formats. Schema is disallowed for Google Cloud Bigtable, Cloud Datastore backups, and Avro formats.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700514 &quot;fields&quot;: [ # Describes the fields in a table.
515 {
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700516 &quot;description&quot;: &quot;A String&quot;, # [Optional] The field description. The maximum length is 1,024 characters.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700517 &quot;categories&quot;: { # [Optional] The categories attached to this field, used for field-level access control.
518 &quot;names&quot;: [ # A list of category resource names. For example, &quot;projects/1/taxonomies/2/categories/3&quot;. At most 5 categories are allowed.
519 &quot;A String&quot;,
520 ],
521 },
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700522 &quot;type&quot;: &quot;A String&quot;, # [Required] The field data type. Possible values include STRING, BYTES, INTEGER, INT64 (same as INTEGER), FLOAT, FLOAT64 (same as FLOAT), BOOLEAN, BOOL (same as BOOLEAN), TIMESTAMP, DATE, TIME, DATETIME, RECORD (where RECORD indicates that the field contains a nested schema) or STRUCT (same as RECORD).
523 &quot;fields&quot;: [ # [Optional] Describes the nested schema fields if the type property is set to RECORD.
524 # Object with schema name: TableFieldSchema
525 ],
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700526 &quot;policyTags&quot;: {
527 &quot;names&quot;: [ # A list of category resource names. For example, &quot;projects/1/location/eu/taxonomies/2/policyTags/3&quot;. At most 1 policy tag is allowed.
528 &quot;A String&quot;,
529 ],
530 },
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700531 &quot;mode&quot;: &quot;A String&quot;, # [Optional] The field mode. Possible values include NULLABLE, REQUIRED and REPEATED. The default value is NULLABLE.
532 &quot;name&quot;: &quot;A String&quot;, # [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 128 characters.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700533 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700534 ],
535 },
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700536 &quot;ignoreUnknownValues&quot;: True or False, # [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&#x27;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.
537 &quot;hivePartitioningOptions&quot;: { # [Optional, Trusted Tester] Options to configure hive partitioning support.
538 &quot;mode&quot;: &quot;A String&quot;, # [Optional] When set, what mode of hive partitioning to use when reading data. The following modes are supported. (1) AUTO: automatically infer partition key name(s) and type(s). (2) STRINGS: automatically infer partition key name(s). All types are interpreted as strings. (3) 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 types include: AVRO, CSV, JSON, ORC and Parquet.
539 &quot;sourceUriPrefix&quot;: &quot;A String&quot;, # [Optional] When hive partition detection is requested, a common prefix for all source uris should be supplied. 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-01-01/country=BR/id=7/file.avro gs://bucket/path_to_table/dt=2018-12-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/ (trailing slash does not matter).
540 &quot;requirePartitionFilter&quot;: True or False, # [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 requirePartitionFilter explicitly set to true will fail.
541 },
542 &quot;compression&quot;: &quot;A String&quot;, # [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 and Avro formats.
543 &quot;maxBadRecords&quot;: 42, # [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. This is only valid for CSV, JSON, and Google Sheets. The default value is 0, which requires that all records are valid. This setting is ignored for Google Cloud Bigtable, Google Cloud Datastore backups and Avro formats.
544 &quot;googleSheetsOptions&quot;: { # [Optional] Additional options if sourceFormat is set to GOOGLE_SHEETS.
545 &quot;skipLeadingRows&quot;: &quot;A String&quot;, # [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, 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 &gt; 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.
546 &quot;range&quot;: &quot;A String&quot;, # [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
547 },
548 &quot;sourceUris&quot;: [ # [Required] The fully-qualified URIs that point to your data in Google Cloud. For Google Cloud Storage URIs: Each URI can contain one &#x27;*&#x27; wildcard character and it must come after the &#x27;bucket&#x27; 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 &#x27;*&#x27; wildcard character is not allowed.
549 &quot;A String&quot;,
550 ],
551 &quot;csvOptions&quot;: { # Additional properties to set if sourceFormat is set to CSV.
552 &quot;quote&quot;: &quot;&quot;&quot;, # [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 (&#x27;&quot;&#x27;). 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.
553 &quot;skipLeadingRows&quot;: &quot;A String&quot;, # [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 &gt; 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.
554 &quot;allowQuotedNewlines&quot;: True or False, # [Optional] Indicates if BigQuery should allow quoted data sections that contain newline characters in a CSV file. The default value is false.
555 &quot;fieldDelimiter&quot;: &quot;A String&quot;, # [Optional] The separator for fields 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. BigQuery also supports the escape sequence &quot;\t&quot; to specify a tab separator. The default value is a comma (&#x27;,&#x27;).
556 &quot;encoding&quot;: &quot;A String&quot;, # [Optional] The character encoding of the data. The supported values are UTF-8 or ISO-8859-1. 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.
557 &quot;allowJaggedRows&quot;: True or False, # [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.
558 },
559 &quot;autodetect&quot;: True or False, # Try to detect schema and format options automatically. Any option specified explicitly will be honored.
560 },
561 &quot;labels&quot;: { # 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.
562 &quot;a_key&quot;: &quot;A String&quot;,
563 },
564 &quot;lastModifiedTime&quot;: &quot;A String&quot;, # [Output-only] The time when this table was last modified, in milliseconds since the epoch.
565 &quot;schema&quot;: { # [Optional] Describes the schema of this table.
566 &quot;fields&quot;: [ # Describes the fields in a table.
567 {
568 &quot;description&quot;: &quot;A String&quot;, # [Optional] The field description. The maximum length is 1,024 characters.
569 &quot;categories&quot;: { # [Optional] The categories attached to this field, used for field-level access control.
570 &quot;names&quot;: [ # A list of category resource names. For example, &quot;projects/1/taxonomies/2/categories/3&quot;. At most 5 categories are allowed.
571 &quot;A String&quot;,
572 ],
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700573 },
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700574 &quot;type&quot;: &quot;A String&quot;, # [Required] The field data type. Possible values include STRING, BYTES, INTEGER, INT64 (same as INTEGER), FLOAT, FLOAT64 (same as FLOAT), BOOLEAN, BOOL (same as BOOLEAN), TIMESTAMP, DATE, TIME, DATETIME, RECORD (where RECORD indicates that the field contains a nested schema) or STRUCT (same as RECORD).
575 &quot;fields&quot;: [ # [Optional] Describes the nested schema fields if the type property is set to RECORD.
576 # Object with schema name: TableFieldSchema
577 ],
578 &quot;policyTags&quot;: {
579 &quot;names&quot;: [ # A list of category resource names. For example, &quot;projects/1/location/eu/taxonomies/2/policyTags/3&quot;. At most 1 policy tag is allowed.
580 &quot;A String&quot;,
581 ],
582 },
583 &quot;mode&quot;: &quot;A String&quot;, # [Optional] The field mode. Possible values include NULLABLE, REQUIRED and REPEATED. The default value is NULLABLE.
584 &quot;name&quot;: &quot;A String&quot;, # [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 128 characters.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700585 },
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700586 ],
587 },
588 &quot;timePartitioning&quot;: { # Time-based partitioning specification for this table. Only one of timePartitioning and rangePartitioning should be specified.
589 &quot;field&quot;: &quot;A String&quot;, # [Beta] [Optional] If not set, the table is partitioned by pseudo column, referenced via either &#x27;_PARTITIONTIME&#x27; as TIMESTAMP type, or &#x27;_PARTITIONDATE&#x27; as DATE type. If field is specified, the table is instead partitioned by this field. The field must be a top-level TIMESTAMP or DATE field. Its mode must be NULLABLE or REQUIRED.
590 &quot;expirationMs&quot;: &quot;A String&quot;, # [Optional] Number of milliseconds for which to keep the storage for partitions in the table. The storage in a partition will have an expiration time of its partition time plus this value.
591 &quot;requirePartitionFilter&quot;: True or False,
592 &quot;type&quot;: &quot;A String&quot;, # [Required] The supported types are DAY, HOUR, MONTH, and YEAR, which will generate one partition per day, hour, month, and year, respectively. When the type is not specified, the default behavior is DAY.
593 },
594 &quot;kind&quot;: &quot;bigquery#table&quot;, # [Output-only] The type of the resource.
595 &quot;materializedView&quot;: { # [Optional] Materialized view definition.
596 &quot;query&quot;: &quot;A String&quot;, # [Required] A query whose result is persisted.
597 &quot;lastRefreshTime&quot;: &quot;A String&quot;, # [Output-only] [TrustedTester] The time when this materialized view was last modified, in milliseconds since the epoch.
598 &quot;enableRefresh&quot;: True or False, # [Optional] [TrustedTester] Enable automatic refresh of the materialized view when the base table is updated. The default value is &quot;true&quot;.
599 &quot;refreshIntervalMs&quot;: &quot;A String&quot;, # [Optional] [TrustedTester] The maximum frequency at which this materialized view will be refreshed. The default value is &quot;1800000&quot; (30 minutes).
600 },
601 &quot;streamingBuffer&quot;: { # [Output-only] Contains information regarding this table&#x27;s streaming buffer, if one is present. This field will be absent if the table is not being streamed to or if there is no data in the streaming buffer.
602 &quot;oldestEntryTime&quot;: &quot;A String&quot;, # [Output-only] Contains the timestamp of the oldest entry in the streaming buffer, in milliseconds since the epoch, if the streaming buffer is available.
603 &quot;estimatedRows&quot;: &quot;A String&quot;, # [Output-only] A lower-bound estimate of the number of rows currently in the streaming buffer.
604 &quot;estimatedBytes&quot;: &quot;A String&quot;, # [Output-only] A lower-bound estimate of the number of bytes currently in the streaming buffer.
605 },
606 &quot;clustering&quot;: { # [Beta] Clustering specification for the table. Must be specified with partitioning, data in the table will be first partitioned and subsequently clustered.
607 &quot;fields&quot;: [ # [Repeated] One or more fields on which data should be clustered. Only top-level, non-repeated, simple-type fields are supported. When you cluster a table using multiple columns, the order of columns you specify is important. The order of the specified columns determines the sort order of the data.
608 &quot;A String&quot;,
609 ],
610 },
611 &quot;rangePartitioning&quot;: { # [TrustedTester] Range partitioning specification for this table. Only one of timePartitioning and rangePartitioning should be specified.
612 &quot;range&quot;: { # [TrustedTester] [Required] Defines the ranges for range partitioning.
613 &quot;start&quot;: &quot;A String&quot;, # [TrustedTester] [Required] The start of range partitioning, inclusive.
614 &quot;interval&quot;: &quot;A String&quot;, # [TrustedTester] [Required] The width of each interval.
615 &quot;end&quot;: &quot;A String&quot;, # [TrustedTester] [Required] The end of range partitioning, exclusive.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700616 },
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700617 &quot;field&quot;: &quot;A String&quot;, # [TrustedTester] [Required] The table is partitioned by this field. The field must be a top-level NULLABLE/REQUIRED field. The only supported type is INTEGER/INT64.
618 },
619 &quot;numBytes&quot;: &quot;A String&quot;, # [Output-only] The size of this table in bytes, excluding any data in the streaming buffer.
620}
621
622
623Returns:
624 An object of the form:
625
626 {
627 &quot;type&quot;: &quot;A String&quot;, # [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. SNAPSHOT: An immutable, read-only table that is a copy of another table. [TrustedTester] MATERIALIZED_VIEW: SQL query whose result is persisted. EXTERNAL: A table that references data stored in an external storage system, such as Google Cloud Storage. The default value is TABLE.
628 &quot;encryptionConfiguration&quot;: { # Custom encryption configuration (e.g., Cloud KMS keys).
629 &quot;kmsKeyName&quot;: &quot;A String&quot;, # [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.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700630 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700631 &quot;tableReference&quot;: { # [Required] Reference describing the ID of this table.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700632 &quot;datasetId&quot;: &quot;A String&quot;, # [Required] The ID of the dataset containing this table.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700633 &quot;projectId&quot;: &quot;A String&quot;, # [Required] The ID of the project containing this table.
634 &quot;tableId&quot;: &quot;A String&quot;, # [Required] The ID of the table. The ID must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_). The maximum length is 1,024 characters.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700635 },
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700636 &quot;numLongTermBytes&quot;: &quot;A String&quot;, # [Output-only] The number of bytes in the table that are considered &quot;long-term storage&quot;.
637 &quot;requirePartitionFilter&quot;: false, # [Optional] If set to true, queries over this table require a partition filter that can be used for partition elimination to be specified.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700638 &quot;etag&quot;: &quot;A String&quot;, # [Output-only] A hash of the table metadata. Used to ensure there were no concurrent modifications to the resource when attempting an update. Not guaranteed to change when the table contents or the fields numRows, numBytes, numLongTermBytes or lastModifiedTime change.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700639 &quot;expirationTime&quot;: &quot;A String&quot;, # [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.
640 &quot;location&quot;: &quot;A String&quot;, # [Output-only] The geographic location where the table resides. This value is inherited from the dataset.
641 &quot;friendlyName&quot;: &quot;A String&quot;, # [Optional] A descriptive name for this table.
642 &quot;numRows&quot;: &quot;A String&quot;, # [Output-only] The number of rows of data in this table, excluding any data in the streaming buffer.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700643 &quot;model&quot;: { # [Output-only, Beta] Present iff this table represents a ML model. Describes the training information for the model, and it is required to run &#x27;PREDICT&#x27; queries.
644 &quot;modelOptions&quot;: { # [Output-only, Beta] Model options used for the first training run. These options are immutable for subsequent training runs. Default values are used for any options not specified in the input query.
645 &quot;lossType&quot;: &quot;A String&quot;,
646 &quot;labels&quot;: [
647 &quot;A String&quot;,
648 ],
649 &quot;modelType&quot;: &quot;A String&quot;,
650 },
651 &quot;trainingRuns&quot;: [ # [Output-only, Beta] Information about ml training runs, each training run comprises of multiple iterations and there may be multiple training runs for the model if warm start is used or if a user decides to continue a previously cancelled query.
Bu Sun Kim65020912020-05-20 12:08:20 -0700652 {
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700653 &quot;state&quot;: &quot;A String&quot;, # [Output-only, Beta] Different state applicable for a training run. IN PROGRESS: Training run is in progress. FAILED: Training run ended due to a non-retryable failure. SUCCEEDED: Training run successfully completed. CANCELLED: Training run cancelled by the user.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700654 &quot;startTime&quot;: &quot;A String&quot;, # [Output-only, Beta] Training run start time in milliseconds since the epoch.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700655 &quot;iterationResults&quot;: [ # [Output-only, Beta] List of each iteration results.
656 {
657 &quot;index&quot;: 42, # [Output-only, Beta] Index of the ML training iteration, starting from zero for each training run.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700658 &quot;learnRate&quot;: 3.14, # [Output-only, Beta] Learning rate used for this iteration, it varies for different training iterations if learn_rate_strategy option is not constant.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700659 &quot;evalLoss&quot;: 3.14, # [Output-only, Beta] Eval loss computed on the eval data at the end of the iteration. The eval loss is used for early stopping to avoid overfitting. No eval loss if eval_split_method option is specified as no_split or auto_split with input data size less than 500 rows.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700660 &quot;durationMs&quot;: &quot;A String&quot;, # [Output-only, Beta] Time taken to run the training iteration in milliseconds.
661 &quot;trainingLoss&quot;: 3.14, # [Output-only, Beta] Training loss computed on the training data at the end of the iteration. The training loss function is defined by model type.
662 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700663 ],
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700664 &quot;trainingOptions&quot;: { # [Output-only, Beta] Training options used by this training run. These options are mutable for subsequent training runs. Default values are explicitly stored for options not specified in the input query of the first training run. For subsequent training runs, any option not explicitly specified in the input query will be copied from the previous training run.
665 &quot;lineSearchInitLearnRate&quot;: 3.14,
666 &quot;maxIteration&quot;: &quot;A String&quot;,
667 &quot;learnRate&quot;: 3.14,
668 &quot;l1Reg&quot;: 3.14,
669 &quot;l2Reg&quot;: 3.14,
670 &quot;learnRateStrategy&quot;: &quot;A String&quot;,
671 &quot;earlyStop&quot;: True or False,
672 &quot;minRelProgress&quot;: 3.14,
673 &quot;warmStart&quot;: True or False,
674 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700675 },
676 ],
677 },
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700678 &quot;numPhysicalBytes&quot;: &quot;A String&quot;, # [Output-only] [TrustedTester] The physical size of this table in bytes, excluding any data in the streaming buffer. This includes compression and storage used for time travel.
679 &quot;creationTime&quot;: &quot;A String&quot;, # [Output-only] The time when this table was created, in milliseconds since the epoch.
680 &quot;selfLink&quot;: &quot;A String&quot;, # [Output-only] A URL that can be used to access this resource again.
681 &quot;id&quot;: &quot;A String&quot;, # [Output-only] An opaque ID uniquely identifying the table.
682 &quot;description&quot;: &quot;A String&quot;, # [Optional] A user-friendly description of this table.
683 &quot;snapshotDefinition&quot;: { # [Output-only] Snapshot definition.
684 &quot;baseTableReference&quot;: { # [Required] Reference describing the ID of the table that is snapshotted.
685 &quot;datasetId&quot;: &quot;A String&quot;, # [Required] The ID of the dataset containing this table.
686 &quot;projectId&quot;: &quot;A String&quot;, # [Required] The ID of the project containing this table.
687 &quot;tableId&quot;: &quot;A String&quot;, # [Required] The ID of the table. The ID must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_). The maximum length is 1,024 characters.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700688 },
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700689 &quot;snapshotTime&quot;: &quot;A String&quot;, # [Required] The time at which the base table was snapshot.
690 },
691 &quot;view&quot;: { # [Optional] The view definition.
692 &quot;useLegacySql&quot;: True or False, # Specifies whether to use BigQuery&#x27;s legacy SQL for this view. The default value is true. If set to false, the view will use BigQuery&#x27;s standard SQL: https://cloud.google.com/bigquery/sql-reference/ Queries and views that reference this view must use the same flag value.
693 &quot;query&quot;: &quot;A String&quot;, # [Required] A query that BigQuery executes when the view is referenced.
694 &quot;userDefinedFunctionResources&quot;: [ # Describes user-defined function resources used in the query.
695 { # This is used for defining User Defined Function (UDF) resources only when using legacy SQL. Users of Standard SQL should leverage either DDL (e.g. CREATE [TEMPORARY] FUNCTION ... ) or the Routines API to define UDF resources. For additional information on migrating, see: https://cloud.google.com/bigquery/docs/reference/standard-sql/migrating-from-legacy-sql#differences_in_user-defined_javascript_functions
696 &quot;resourceUri&quot;: &quot;A String&quot;, # [Pick one] A code resource to load from a Google Cloud Storage URI (gs://bucket/path).
697 &quot;inlineCode&quot;: &quot;A String&quot;, # [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.
698 },
699 ],
700 },
701 &quot;externalDataConfiguration&quot;: { # [Optional] Describes the data format, location, and other properties of a table stored outside of BigQuery. By defining these properties, the data source can then be queried as if it were a standard BigQuery table.
702 &quot;connectionId&quot;: &quot;A String&quot;, # [Optional, Trusted Tester] Connection for external data source.
703 &quot;sourceFormat&quot;: &quot;A String&quot;, # [Required] The data format. For CSV files, specify &quot;CSV&quot;. For Google sheets, specify &quot;GOOGLE_SHEETS&quot;. For newline-delimited JSON, specify &quot;NEWLINE_DELIMITED_JSON&quot;. For Avro files, specify &quot;AVRO&quot;. For Google Cloud Datastore backups, specify &quot;DATASTORE_BACKUP&quot;. [Beta] For Google Cloud Bigtable, specify &quot;BIGTABLE&quot;.
704 &quot;bigtableOptions&quot;: { # [Optional] Additional options if sourceFormat is set to BIGTABLE.
705 &quot;columnFamilies&quot;: [ # [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 &#x27;type&#x27; 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.
706 {
707 &quot;columns&quot;: [ # [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 .Column field.
708 {
709 &quot;qualifierString&quot;: &quot;A String&quot;,
710 &quot;qualifierEncoded&quot;: &quot;A String&quot;, # [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-zA-Z0-9_]*, a valid identifier must be provided as field_name.
711 &quot;encoding&quot;: &quot;A String&quot;, # [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. &#x27;encoding&#x27; can also be set at the column family level. However, the setting at this level takes precedence if &#x27;encoding&#x27; is set at both levels.
712 &quot;fieldName&quot;: &quot;A String&quot;, # [Optional] If the qualifier is not a valid BigQuery field identifier i.e. does not match [a-zA-Z][a-zA-Z0-9_]*, a valid identifier must be provided as the column field name and is used as field name in queries.
713 &quot;onlyReadLatest&quot;: True or False, # [Optional] If this is set, only the latest version of value in this column are exposed. &#x27;onlyReadLatest&#x27; can also be set at the column family level. However, the setting at this level takes precedence if &#x27;onlyReadLatest&#x27; is set at both levels.
714 &quot;type&quot;: &quot;A String&quot;, # [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 Default type is BYTES. &#x27;type&#x27; can also be set at the column family level. However, the setting at this level takes precedence if &#x27;type&#x27; is set at both levels.
715 },
716 ],
717 &quot;type&quot;: &quot;A String&quot;, # [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 Default type is BYTES. This can be overridden for a specific column by listing that column in &#x27;columns&#x27; and specifying a type for it.
718 &quot;encoding&quot;: &quot;A String&quot;, # [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. This can be overridden for a specific column by listing that column in &#x27;columns&#x27; and specifying an encoding for it.
719 &quot;familyId&quot;: &quot;A String&quot;, # Identifier of the column family.
720 &quot;onlyReadLatest&quot;: True or False, # [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 &#x27;columns&#x27; and specifying a different setting for that column.
721 },
722 ],
723 &quot;ignoreUnspecifiedColumnFamilies&quot;: True or False, # [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.
724 &quot;readRowkeyAsString&quot;: True or False, # [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.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700725 },
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700726 &quot;schema&quot;: { # [Optional] The schema for the data. Schema is required for CSV and JSON formats. Schema is disallowed for Google Cloud Bigtable, Cloud Datastore backups, and Avro formats.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700727 &quot;fields&quot;: [ # Describes the fields in a table.
728 {
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700729 &quot;description&quot;: &quot;A String&quot;, # [Optional] The field description. The maximum length is 1,024 characters.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700730 &quot;categories&quot;: { # [Optional] The categories attached to this field, used for field-level access control.
731 &quot;names&quot;: [ # A list of category resource names. For example, &quot;projects/1/taxonomies/2/categories/3&quot;. At most 5 categories are allowed.
732 &quot;A String&quot;,
733 ],
734 },
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700735 &quot;type&quot;: &quot;A String&quot;, # [Required] The field data type. Possible values include STRING, BYTES, INTEGER, INT64 (same as INTEGER), FLOAT, FLOAT64 (same as FLOAT), BOOLEAN, BOOL (same as BOOLEAN), TIMESTAMP, DATE, TIME, DATETIME, RECORD (where RECORD indicates that the field contains a nested schema) or STRUCT (same as RECORD).
736 &quot;fields&quot;: [ # [Optional] Describes the nested schema fields if the type property is set to RECORD.
737 # Object with schema name: TableFieldSchema
738 ],
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700739 &quot;policyTags&quot;: {
740 &quot;names&quot;: [ # A list of category resource names. For example, &quot;projects/1/location/eu/taxonomies/2/policyTags/3&quot;. At most 1 policy tag is allowed.
741 &quot;A String&quot;,
742 ],
743 },
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700744 &quot;mode&quot;: &quot;A String&quot;, # [Optional] The field mode. Possible values include NULLABLE, REQUIRED and REPEATED. The default value is NULLABLE.
745 &quot;name&quot;: &quot;A String&quot;, # [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 128 characters.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700746 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700747 ],
748 },
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700749 &quot;ignoreUnknownValues&quot;: True or False, # [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&#x27;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.
750 &quot;hivePartitioningOptions&quot;: { # [Optional, Trusted Tester] Options to configure hive partitioning support.
751 &quot;mode&quot;: &quot;A String&quot;, # [Optional] When set, what mode of hive partitioning to use when reading data. The following modes are supported. (1) AUTO: automatically infer partition key name(s) and type(s). (2) STRINGS: automatically infer partition key name(s). All types are interpreted as strings. (3) 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 types include: AVRO, CSV, JSON, ORC and Parquet.
752 &quot;sourceUriPrefix&quot;: &quot;A String&quot;, # [Optional] When hive partition detection is requested, a common prefix for all source uris should be supplied. 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-01-01/country=BR/id=7/file.avro gs://bucket/path_to_table/dt=2018-12-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/ (trailing slash does not matter).
753 &quot;requirePartitionFilter&quot;: True or False, # [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 requirePartitionFilter explicitly set to true will fail.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700754 },
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700755 &quot;compression&quot;: &quot;A String&quot;, # [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 and Avro formats.
756 &quot;maxBadRecords&quot;: 42, # [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. This is only valid for CSV, JSON, and Google Sheets. The default value is 0, which requires that all records are valid. This setting is ignored for Google Cloud Bigtable, Google Cloud Datastore backups and Avro formats.
757 &quot;googleSheetsOptions&quot;: { # [Optional] Additional options if sourceFormat is set to GOOGLE_SHEETS.
758 &quot;skipLeadingRows&quot;: &quot;A String&quot;, # [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, 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 &gt; 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.
759 &quot;range&quot;: &quot;A String&quot;, # [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
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700760 },
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700761 &quot;sourceUris&quot;: [ # [Required] The fully-qualified URIs that point to your data in Google Cloud. For Google Cloud Storage URIs: Each URI can contain one &#x27;*&#x27; wildcard character and it must come after the &#x27;bucket&#x27; 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 &#x27;*&#x27; wildcard character is not allowed.
762 &quot;A String&quot;,
763 ],
764 &quot;csvOptions&quot;: { # Additional properties to set if sourceFormat is set to CSV.
765 &quot;quote&quot;: &quot;&quot;&quot;, # [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 (&#x27;&quot;&#x27;). 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.
766 &quot;skipLeadingRows&quot;: &quot;A String&quot;, # [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 &gt; 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.
767 &quot;allowQuotedNewlines&quot;: True or False, # [Optional] Indicates if BigQuery should allow quoted data sections that contain newline characters in a CSV file. The default value is false.
768 &quot;fieldDelimiter&quot;: &quot;A String&quot;, # [Optional] The separator for fields 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. BigQuery also supports the escape sequence &quot;\t&quot; to specify a tab separator. The default value is a comma (&#x27;,&#x27;).
769 &quot;encoding&quot;: &quot;A String&quot;, # [Optional] The character encoding of the data. The supported values are UTF-8 or ISO-8859-1. 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.
770 &quot;allowJaggedRows&quot;: True or False, # [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.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700771 },
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700772 &quot;autodetect&quot;: True or False, # Try to detect schema and format options automatically. Any option specified explicitly will be honored.
773 },
774 &quot;labels&quot;: { # 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.
775 &quot;a_key&quot;: &quot;A String&quot;,
776 },
777 &quot;lastModifiedTime&quot;: &quot;A String&quot;, # [Output-only] The time when this table was last modified, in milliseconds since the epoch.
778 &quot;schema&quot;: { # [Optional] Describes the schema of this table.
779 &quot;fields&quot;: [ # Describes the fields in a table.
780 {
781 &quot;description&quot;: &quot;A String&quot;, # [Optional] The field description. The maximum length is 1,024 characters.
782 &quot;categories&quot;: { # [Optional] The categories attached to this field, used for field-level access control.
783 &quot;names&quot;: [ # A list of category resource names. For example, &quot;projects/1/taxonomies/2/categories/3&quot;. At most 5 categories are allowed.
784 &quot;A String&quot;,
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700785 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700786 },
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700787 &quot;type&quot;: &quot;A String&quot;, # [Required] The field data type. Possible values include STRING, BYTES, INTEGER, INT64 (same as INTEGER), FLOAT, FLOAT64 (same as FLOAT), BOOLEAN, BOOL (same as BOOLEAN), TIMESTAMP, DATE, TIME, DATETIME, RECORD (where RECORD indicates that the field contains a nested schema) or STRUCT (same as RECORD).
788 &quot;fields&quot;: [ # [Optional] Describes the nested schema fields if the type property is set to RECORD.
789 # Object with schema name: TableFieldSchema
790 ],
791 &quot;policyTags&quot;: {
792 &quot;names&quot;: [ # A list of category resource names. For example, &quot;projects/1/location/eu/taxonomies/2/policyTags/3&quot;. At most 1 policy tag is allowed.
793 &quot;A String&quot;,
794 ],
795 },
796 &quot;mode&quot;: &quot;A String&quot;, # [Optional] The field mode. Possible values include NULLABLE, REQUIRED and REPEATED. The default value is NULLABLE.
797 &quot;name&quot;: &quot;A String&quot;, # [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 128 characters.
798 },
799 ],
800 },
801 &quot;timePartitioning&quot;: { # Time-based partitioning specification for this table. Only one of timePartitioning and rangePartitioning should be specified.
802 &quot;field&quot;: &quot;A String&quot;, # [Beta] [Optional] If not set, the table is partitioned by pseudo column, referenced via either &#x27;_PARTITIONTIME&#x27; as TIMESTAMP type, or &#x27;_PARTITIONDATE&#x27; as DATE type. If field is specified, the table is instead partitioned by this field. The field must be a top-level TIMESTAMP or DATE field. Its mode must be NULLABLE or REQUIRED.
803 &quot;expirationMs&quot;: &quot;A String&quot;, # [Optional] Number of milliseconds for which to keep the storage for partitions in the table. The storage in a partition will have an expiration time of its partition time plus this value.
804 &quot;requirePartitionFilter&quot;: True or False,
805 &quot;type&quot;: &quot;A String&quot;, # [Required] The supported types are DAY, HOUR, MONTH, and YEAR, which will generate one partition per day, hour, month, and year, respectively. When the type is not specified, the default behavior is DAY.
806 },
807 &quot;kind&quot;: &quot;bigquery#table&quot;, # [Output-only] The type of the resource.
808 &quot;materializedView&quot;: { # [Optional] Materialized view definition.
809 &quot;query&quot;: &quot;A String&quot;, # [Required] A query whose result is persisted.
810 &quot;lastRefreshTime&quot;: &quot;A String&quot;, # [Output-only] [TrustedTester] The time when this materialized view was last modified, in milliseconds since the epoch.
811 &quot;enableRefresh&quot;: True or False, # [Optional] [TrustedTester] Enable automatic refresh of the materialized view when the base table is updated. The default value is &quot;true&quot;.
812 &quot;refreshIntervalMs&quot;: &quot;A String&quot;, # [Optional] [TrustedTester] The maximum frequency at which this materialized view will be refreshed. The default value is &quot;1800000&quot; (30 minutes).
813 },
814 &quot;streamingBuffer&quot;: { # [Output-only] Contains information regarding this table&#x27;s streaming buffer, if one is present. This field will be absent if the table is not being streamed to or if there is no data in the streaming buffer.
815 &quot;oldestEntryTime&quot;: &quot;A String&quot;, # [Output-only] Contains the timestamp of the oldest entry in the streaming buffer, in milliseconds since the epoch, if the streaming buffer is available.
816 &quot;estimatedRows&quot;: &quot;A String&quot;, # [Output-only] A lower-bound estimate of the number of rows currently in the streaming buffer.
817 &quot;estimatedBytes&quot;: &quot;A String&quot;, # [Output-only] A lower-bound estimate of the number of bytes currently in the streaming buffer.
818 },
819 &quot;clustering&quot;: { # [Beta] Clustering specification for the table. Must be specified with partitioning, data in the table will be first partitioned and subsequently clustered.
820 &quot;fields&quot;: [ # [Repeated] One or more fields on which data should be clustered. Only top-level, non-repeated, simple-type fields are supported. When you cluster a table using multiple columns, the order of columns you specify is important. The order of the specified columns determines the sort order of the data.
821 &quot;A String&quot;,
822 ],
823 },
824 &quot;rangePartitioning&quot;: { # [TrustedTester] Range partitioning specification for this table. Only one of timePartitioning and rangePartitioning should be specified.
825 &quot;range&quot;: { # [TrustedTester] [Required] Defines the ranges for range partitioning.
826 &quot;start&quot;: &quot;A String&quot;, # [TrustedTester] [Required] The start of range partitioning, inclusive.
827 &quot;interval&quot;: &quot;A String&quot;, # [TrustedTester] [Required] The width of each interval.
828 &quot;end&quot;: &quot;A String&quot;, # [TrustedTester] [Required] The end of range partitioning, exclusive.
Bu Sun Kim65020912020-05-20 12:08:20 -0700829 },
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700830 &quot;field&quot;: &quot;A String&quot;, # [TrustedTester] [Required] The table is partitioned by this field. The field must be a top-level NULLABLE/REQUIRED field. The only supported type is INTEGER/INT64.
831 },
832 &quot;numBytes&quot;: &quot;A String&quot;, # [Output-only] The size of this table in bytes, excluding any data in the streaming buffer.
833 }</pre>
John Asmuth614db982014-04-24 15:46:26 -0400834</div>
835
836<div class="method">
837 <code class="details" id="list">list(projectId, datasetId, pageToken=None, maxResults=None)</code>
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000838 <pre>Lists all tables in the specified dataset. Requires the READER dataset role.
John Asmuth614db982014-04-24 15:46:26 -0400839
840Args:
841 projectId: string, Project ID of the tables to list (required)
842 datasetId: string, Dataset ID of the tables to list (required)
843 pageToken: string, Page token, returned by a previous call, to request the next page of results
844 maxResults: integer, Maximum number of results to return
845
846Returns:
847 An object of the form:
848
849 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700850 &quot;tables&quot;: [ # Tables in the requested dataset.
John Asmuth614db982014-04-24 15:46:26 -0400851 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700852 &quot;rangePartitioning&quot;: { # The range partitioning specification for this table, if configured.
853 &quot;range&quot;: { # [TrustedTester] [Required] Defines the ranges for range partitioning.
Bu Sun Kim65020912020-05-20 12:08:20 -0700854 &quot;start&quot;: &quot;A String&quot;, # [TrustedTester] [Required] The start of range partitioning, inclusive.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700855 &quot;interval&quot;: &quot;A String&quot;, # [TrustedTester] [Required] The width of each interval.
Bu Sun Kim65020912020-05-20 12:08:20 -0700856 &quot;end&quot;: &quot;A String&quot;, # [TrustedTester] [Required] The end of range partitioning, exclusive.
Dan O'Mearadd494642020-05-01 07:42:23 -0700857 },
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700858 &quot;field&quot;: &quot;A String&quot;, # [TrustedTester] [Required] The table is partitioned by this field. The field must be a top-level NULLABLE/REQUIRED field. The only supported type is INTEGER/INT64.
Dan O'Mearadd494642020-05-01 07:42:23 -0700859 },
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700860 &quot;kind&quot;: &quot;bigquery#table&quot;, # The resource type.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700861 &quot;labels&quot;: { # The labels associated with this table. You can use these to organize and group your tables.
862 &quot;a_key&quot;: &quot;A String&quot;,
863 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700864 &quot;clustering&quot;: { # [Beta] Clustering specification for this table, if configured.
865 &quot;fields&quot;: [ # [Repeated] One or more fields on which data should be clustered. Only top-level, non-repeated, simple-type fields are supported. When you cluster a table using multiple columns, the order of columns you specify is important. The order of the specified columns determines the sort order of the data.
866 &quot;A String&quot;,
867 ],
868 },
869 &quot;view&quot;: { # Additional details for a view.
870 &quot;useLegacySql&quot;: True or False, # True if view is defined in legacy SQL dialect, false if in standard SQL.
871 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700872 &quot;creationTime&quot;: &quot;A String&quot;, # The time when this table was created, in milliseconds since the epoch.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700873 &quot;type&quot;: &quot;A String&quot;, # The type of table. Possible values are: TABLE, VIEW.
874 &quot;expirationTime&quot;: &quot;A String&quot;, # [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.
875 &quot;id&quot;: &quot;A String&quot;, # An opaque ID of the table
Bu Sun Kim65020912020-05-20 12:08:20 -0700876 &quot;tableReference&quot;: { # A reference uniquely identifying the table.
Bu Sun Kim65020912020-05-20 12:08:20 -0700877 &quot;datasetId&quot;: &quot;A String&quot;, # [Required] The ID of the dataset containing this table.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700878 &quot;projectId&quot;: &quot;A String&quot;, # [Required] The ID of the project containing this table.
879 &quot;tableId&quot;: &quot;A String&quot;, # [Required] The ID of the table. The ID must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_). The maximum length is 1,024 characters.
John Asmuth614db982014-04-24 15:46:26 -0400880 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700881 &quot;friendlyName&quot;: &quot;A String&quot;, # The user-friendly name for this table.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700882 &quot;timePartitioning&quot;: { # The time-based partitioning specification for this table, if configured.
883 &quot;field&quot;: &quot;A String&quot;, # [Beta] [Optional] If not set, the table is partitioned by pseudo column, referenced via either &#x27;_PARTITIONTIME&#x27; as TIMESTAMP type, or &#x27;_PARTITIONDATE&#x27; as DATE type. If field is specified, the table is instead partitioned by this field. The field must be a top-level TIMESTAMP or DATE field. Its mode must be NULLABLE or REQUIRED.
884 &quot;expirationMs&quot;: &quot;A String&quot;, # [Optional] Number of milliseconds for which to keep the storage for partitions in the table. The storage in a partition will have an expiration time of its partition time plus this value.
885 &quot;requirePartitionFilter&quot;: True or False,
886 &quot;type&quot;: &quot;A String&quot;, # [Required] The supported types are DAY, HOUR, MONTH, and YEAR, which will generate one partition per day, hour, month, and year, respectively. When the type is not specified, the default behavior is DAY.
887 },
John Asmuth614db982014-04-24 15:46:26 -0400888 },
889 ],
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700890 &quot;totalItems&quot;: 42, # The total number of tables in the dataset.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700891 &quot;nextPageToken&quot;: &quot;A String&quot;, # A token to request the next page of results.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700892 &quot;kind&quot;: &quot;bigquery#tableList&quot;, # The type of list.
893 &quot;etag&quot;: &quot;A String&quot;, # A hash of this page of results.
John Asmuth614db982014-04-24 15:46:26 -0400894 }</pre>
895</div>
896
897<div class="method">
898 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
899 <pre>Retrieves the next page of results.
900
901Args:
902 previous_request: The request for the previous page. (required)
903 previous_response: The response from the request for the previous page. (required)
904
905Returns:
Bu Sun Kim65020912020-05-20 12:08:20 -0700906 A request object that you can call &#x27;execute()&#x27; on to request the next
John Asmuth614db982014-04-24 15:46:26 -0400907 page. Returns None if there are no more items in the collection.
908 </pre>
909</div>
910
911<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700912 <code class="details" id="patch">patch(projectId, datasetId, tableId, body=None)</code>
John Asmuth614db982014-04-24 15:46:26 -0400913 <pre>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. This method supports patch semantics.
914
915Args:
916 projectId: string, Project ID of the table to update (required)
917 datasetId: string, Dataset ID of the table to update (required)
918 tableId: string, Table ID of the table to update (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700919 body: object, The request body.
John Asmuth614db982014-04-24 15:46:26 -0400920 The object takes the form of:
921
922{
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700923 &quot;type&quot;: &quot;A String&quot;, # [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. SNAPSHOT: An immutable, read-only table that is a copy of another table. [TrustedTester] MATERIALIZED_VIEW: SQL query whose result is persisted. EXTERNAL: A table that references data stored in an external storage system, such as Google Cloud Storage. The default value is TABLE.
924 &quot;encryptionConfiguration&quot;: { # Custom encryption configuration (e.g., Cloud KMS keys).
925 &quot;kmsKeyName&quot;: &quot;A String&quot;, # [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.
926 },
927 &quot;tableReference&quot;: { # [Required] Reference describing the ID of this table.
928 &quot;datasetId&quot;: &quot;A String&quot;, # [Required] The ID of the dataset containing this table.
929 &quot;projectId&quot;: &quot;A String&quot;, # [Required] The ID of the project containing this table.
930 &quot;tableId&quot;: &quot;A String&quot;, # [Required] The ID of the table. The ID must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_). The maximum length is 1,024 characters.
931 },
932 &quot;numLongTermBytes&quot;: &quot;A String&quot;, # [Output-only] The number of bytes in the table that are considered &quot;long-term storage&quot;.
933 &quot;requirePartitionFilter&quot;: false, # [Optional] If set to true, queries over this table require a partition filter that can be used for partition elimination to be specified.
934 &quot;etag&quot;: &quot;A String&quot;, # [Output-only] A hash of the table metadata. Used to ensure there were no concurrent modifications to the resource when attempting an update. Not guaranteed to change when the table contents or the fields numRows, numBytes, numLongTermBytes or lastModifiedTime change.
935 &quot;expirationTime&quot;: &quot;A String&quot;, # [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.
936 &quot;location&quot;: &quot;A String&quot;, # [Output-only] The geographic location where the table resides. This value is inherited from the dataset.
937 &quot;friendlyName&quot;: &quot;A String&quot;, # [Optional] A descriptive name for this table.
938 &quot;numRows&quot;: &quot;A String&quot;, # [Output-only] The number of rows of data in this table, excluding any data in the streaming buffer.
939 &quot;model&quot;: { # [Output-only, Beta] Present iff this table represents a ML model. Describes the training information for the model, and it is required to run &#x27;PREDICT&#x27; queries.
940 &quot;modelOptions&quot;: { # [Output-only, Beta] Model options used for the first training run. These options are immutable for subsequent training runs. Default values are used for any options not specified in the input query.
941 &quot;lossType&quot;: &quot;A String&quot;,
942 &quot;labels&quot;: [
943 &quot;A String&quot;,
944 ],
945 &quot;modelType&quot;: &quot;A String&quot;,
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700946 },
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700947 &quot;trainingRuns&quot;: [ # [Output-only, Beta] Information about ml training runs, each training run comprises of multiple iterations and there may be multiple training runs for the model if warm start is used or if a user decides to continue a previously cancelled query.
948 {
949 &quot;state&quot;: &quot;A String&quot;, # [Output-only, Beta] Different state applicable for a training run. IN PROGRESS: Training run is in progress. FAILED: Training run ended due to a non-retryable failure. SUCCEEDED: Training run successfully completed. CANCELLED: Training run cancelled by the user.
950 &quot;startTime&quot;: &quot;A String&quot;, # [Output-only, Beta] Training run start time in milliseconds since the epoch.
951 &quot;iterationResults&quot;: [ # [Output-only, Beta] List of each iteration results.
952 {
953 &quot;index&quot;: 42, # [Output-only, Beta] Index of the ML training iteration, starting from zero for each training run.
954 &quot;learnRate&quot;: 3.14, # [Output-only, Beta] Learning rate used for this iteration, it varies for different training iterations if learn_rate_strategy option is not constant.
955 &quot;evalLoss&quot;: 3.14, # [Output-only, Beta] Eval loss computed on the eval data at the end of the iteration. The eval loss is used for early stopping to avoid overfitting. No eval loss if eval_split_method option is specified as no_split or auto_split with input data size less than 500 rows.
956 &quot;durationMs&quot;: &quot;A String&quot;, # [Output-only, Beta] Time taken to run the training iteration in milliseconds.
957 &quot;trainingLoss&quot;: 3.14, # [Output-only, Beta] Training loss computed on the training data at the end of the iteration. The training loss function is defined by model type.
958 },
959 ],
960 &quot;trainingOptions&quot;: { # [Output-only, Beta] Training options used by this training run. These options are mutable for subsequent training runs. Default values are explicitly stored for options not specified in the input query of the first training run. For subsequent training runs, any option not explicitly specified in the input query will be copied from the previous training run.
961 &quot;lineSearchInitLearnRate&quot;: 3.14,
962 &quot;maxIteration&quot;: &quot;A String&quot;,
963 &quot;learnRate&quot;: 3.14,
964 &quot;l1Reg&quot;: 3.14,
965 &quot;l2Reg&quot;: 3.14,
966 &quot;learnRateStrategy&quot;: &quot;A String&quot;,
967 &quot;earlyStop&quot;: True or False,
968 &quot;minRelProgress&quot;: 3.14,
969 &quot;warmStart&quot;: True or False,
970 },
971 },
972 ],
973 },
974 &quot;numPhysicalBytes&quot;: &quot;A String&quot;, # [Output-only] [TrustedTester] The physical size of this table in bytes, excluding any data in the streaming buffer. This includes compression and storage used for time travel.
975 &quot;creationTime&quot;: &quot;A String&quot;, # [Output-only] The time when this table was created, in milliseconds since the epoch.
976 &quot;selfLink&quot;: &quot;A String&quot;, # [Output-only] A URL that can be used to access this resource again.
977 &quot;id&quot;: &quot;A String&quot;, # [Output-only] An opaque ID uniquely identifying the table.
978 &quot;description&quot;: &quot;A String&quot;, # [Optional] A user-friendly description of this table.
979 &quot;snapshotDefinition&quot;: { # [Output-only] Snapshot definition.
980 &quot;baseTableReference&quot;: { # [Required] Reference describing the ID of the table that is snapshotted.
981 &quot;datasetId&quot;: &quot;A String&quot;, # [Required] The ID of the dataset containing this table.
982 &quot;projectId&quot;: &quot;A String&quot;, # [Required] The ID of the project containing this table.
983 &quot;tableId&quot;: &quot;A String&quot;, # [Required] The ID of the table. The ID must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_). The maximum length is 1,024 characters.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700984 },
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700985 &quot;snapshotTime&quot;: &quot;A String&quot;, # [Required] The time at which the base table was snapshot.
986 },
987 &quot;view&quot;: { # [Optional] The view definition.
988 &quot;useLegacySql&quot;: True or False, # Specifies whether to use BigQuery&#x27;s legacy SQL for this view. The default value is true. If set to false, the view will use BigQuery&#x27;s standard SQL: https://cloud.google.com/bigquery/sql-reference/ Queries and views that reference this view must use the same flag value.
989 &quot;query&quot;: &quot;A String&quot;, # [Required] A query that BigQuery executes when the view is referenced.
990 &quot;userDefinedFunctionResources&quot;: [ # Describes user-defined function resources used in the query.
991 { # This is used for defining User Defined Function (UDF) resources only when using legacy SQL. Users of Standard SQL should leverage either DDL (e.g. CREATE [TEMPORARY] FUNCTION ... ) or the Routines API to define UDF resources. For additional information on migrating, see: https://cloud.google.com/bigquery/docs/reference/standard-sql/migrating-from-legacy-sql#differences_in_user-defined_javascript_functions
992 &quot;resourceUri&quot;: &quot;A String&quot;, # [Pick one] A code resource to load from a Google Cloud Storage URI (gs://bucket/path).
993 &quot;inlineCode&quot;: &quot;A String&quot;, # [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.
994 },
995 ],
996 },
997 &quot;externalDataConfiguration&quot;: { # [Optional] Describes the data format, location, and other properties of a table stored outside of BigQuery. By defining these properties, the data source can then be queried as if it were a standard BigQuery table.
998 &quot;connectionId&quot;: &quot;A String&quot;, # [Optional, Trusted Tester] Connection for external data source.
999 &quot;sourceFormat&quot;: &quot;A String&quot;, # [Required] The data format. For CSV files, specify &quot;CSV&quot;. For Google sheets, specify &quot;GOOGLE_SHEETS&quot;. For newline-delimited JSON, specify &quot;NEWLINE_DELIMITED_JSON&quot;. For Avro files, specify &quot;AVRO&quot;. For Google Cloud Datastore backups, specify &quot;DATASTORE_BACKUP&quot;. [Beta] For Google Cloud Bigtable, specify &quot;BIGTABLE&quot;.
1000 &quot;bigtableOptions&quot;: { # [Optional] Additional options if sourceFormat is set to BIGTABLE.
1001 &quot;columnFamilies&quot;: [ # [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 &#x27;type&#x27; 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.
1002 {
1003 &quot;columns&quot;: [ # [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 .Column field.
1004 {
1005 &quot;qualifierString&quot;: &quot;A String&quot;,
1006 &quot;qualifierEncoded&quot;: &quot;A String&quot;, # [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-zA-Z0-9_]*, a valid identifier must be provided as field_name.
1007 &quot;encoding&quot;: &quot;A String&quot;, # [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. &#x27;encoding&#x27; can also be set at the column family level. However, the setting at this level takes precedence if &#x27;encoding&#x27; is set at both levels.
1008 &quot;fieldName&quot;: &quot;A String&quot;, # [Optional] If the qualifier is not a valid BigQuery field identifier i.e. does not match [a-zA-Z][a-zA-Z0-9_]*, a valid identifier must be provided as the column field name and is used as field name in queries.
1009 &quot;onlyReadLatest&quot;: True or False, # [Optional] If this is set, only the latest version of value in this column are exposed. &#x27;onlyReadLatest&#x27; can also be set at the column family level. However, the setting at this level takes precedence if &#x27;onlyReadLatest&#x27; is set at both levels.
1010 &quot;type&quot;: &quot;A String&quot;, # [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 Default type is BYTES. &#x27;type&#x27; can also be set at the column family level. However, the setting at this level takes precedence if &#x27;type&#x27; is set at both levels.
1011 },
1012 ],
1013 &quot;type&quot;: &quot;A String&quot;, # [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 Default type is BYTES. This can be overridden for a specific column by listing that column in &#x27;columns&#x27; and specifying a type for it.
1014 &quot;encoding&quot;: &quot;A String&quot;, # [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. This can be overridden for a specific column by listing that column in &#x27;columns&#x27; and specifying an encoding for it.
1015 &quot;familyId&quot;: &quot;A String&quot;, # Identifier of the column family.
1016 &quot;onlyReadLatest&quot;: True or False, # [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 &#x27;columns&#x27; and specifying a different setting for that column.
1017 },
1018 ],
1019 &quot;ignoreUnspecifiedColumnFamilies&quot;: True or False, # [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.
1020 &quot;readRowkeyAsString&quot;: True or False, # [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.
1021 },
1022 &quot;schema&quot;: { # [Optional] The schema for the data. Schema is required for CSV and JSON formats. Schema is disallowed for Google Cloud Bigtable, Cloud Datastore backups, and Avro formats.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001023 &quot;fields&quot;: [ # Describes the fields in a table.
1024 {
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001025 &quot;description&quot;: &quot;A String&quot;, # [Optional] The field description. The maximum length is 1,024 characters.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001026 &quot;categories&quot;: { # [Optional] The categories attached to this field, used for field-level access control.
1027 &quot;names&quot;: [ # A list of category resource names. For example, &quot;projects/1/taxonomies/2/categories/3&quot;. At most 5 categories are allowed.
1028 &quot;A String&quot;,
1029 ],
1030 },
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07001031 &quot;type&quot;: &quot;A String&quot;, # [Required] The field data type. Possible values include STRING, BYTES, INTEGER, INT64 (same as INTEGER), FLOAT, FLOAT64 (same as FLOAT), BOOLEAN, BOOL (same as BOOLEAN), TIMESTAMP, DATE, TIME, DATETIME, RECORD (where RECORD indicates that the field contains a nested schema) or STRUCT (same as RECORD).
1032 &quot;fields&quot;: [ # [Optional] Describes the nested schema fields if the type property is set to RECORD.
1033 # Object with schema name: TableFieldSchema
1034 ],
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001035 &quot;policyTags&quot;: {
1036 &quot;names&quot;: [ # A list of category resource names. For example, &quot;projects/1/location/eu/taxonomies/2/policyTags/3&quot;. At most 1 policy tag is allowed.
1037 &quot;A String&quot;,
1038 ],
1039 },
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07001040 &quot;mode&quot;: &quot;A String&quot;, # [Optional] The field mode. Possible values include NULLABLE, REQUIRED and REPEATED. The default value is NULLABLE.
1041 &quot;name&quot;: &quot;A String&quot;, # [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 128 characters.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001042 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001043 ],
1044 },
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07001045 &quot;ignoreUnknownValues&quot;: True or False, # [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&#x27;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.
1046 &quot;hivePartitioningOptions&quot;: { # [Optional, Trusted Tester] Options to configure hive partitioning support.
1047 &quot;mode&quot;: &quot;A String&quot;, # [Optional] When set, what mode of hive partitioning to use when reading data. The following modes are supported. (1) AUTO: automatically infer partition key name(s) and type(s). (2) STRINGS: automatically infer partition key name(s). All types are interpreted as strings. (3) 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 types include: AVRO, CSV, JSON, ORC and Parquet.
1048 &quot;sourceUriPrefix&quot;: &quot;A String&quot;, # [Optional] When hive partition detection is requested, a common prefix for all source uris should be supplied. 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-01-01/country=BR/id=7/file.avro gs://bucket/path_to_table/dt=2018-12-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/ (trailing slash does not matter).
1049 &quot;requirePartitionFilter&quot;: True or False, # [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 requirePartitionFilter explicitly set to true will fail.
1050 },
1051 &quot;compression&quot;: &quot;A String&quot;, # [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 and Avro formats.
1052 &quot;maxBadRecords&quot;: 42, # [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. This is only valid for CSV, JSON, and Google Sheets. The default value is 0, which requires that all records are valid. This setting is ignored for Google Cloud Bigtable, Google Cloud Datastore backups and Avro formats.
1053 &quot;googleSheetsOptions&quot;: { # [Optional] Additional options if sourceFormat is set to GOOGLE_SHEETS.
1054 &quot;skipLeadingRows&quot;: &quot;A String&quot;, # [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, 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 &gt; 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.
1055 &quot;range&quot;: &quot;A String&quot;, # [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
1056 },
1057 &quot;sourceUris&quot;: [ # [Required] The fully-qualified URIs that point to your data in Google Cloud. For Google Cloud Storage URIs: Each URI can contain one &#x27;*&#x27; wildcard character and it must come after the &#x27;bucket&#x27; 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 &#x27;*&#x27; wildcard character is not allowed.
1058 &quot;A String&quot;,
1059 ],
1060 &quot;csvOptions&quot;: { # Additional properties to set if sourceFormat is set to CSV.
1061 &quot;quote&quot;: &quot;&quot;&quot;, # [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 (&#x27;&quot;&#x27;). 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.
1062 &quot;skipLeadingRows&quot;: &quot;A String&quot;, # [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 &gt; 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.
1063 &quot;allowQuotedNewlines&quot;: True or False, # [Optional] Indicates if BigQuery should allow quoted data sections that contain newline characters in a CSV file. The default value is false.
1064 &quot;fieldDelimiter&quot;: &quot;A String&quot;, # [Optional] The separator for fields 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. BigQuery also supports the escape sequence &quot;\t&quot; to specify a tab separator. The default value is a comma (&#x27;,&#x27;).
1065 &quot;encoding&quot;: &quot;A String&quot;, # [Optional] The character encoding of the data. The supported values are UTF-8 or ISO-8859-1. 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.
1066 &quot;allowJaggedRows&quot;: True or False, # [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.
1067 },
1068 &quot;autodetect&quot;: True or False, # Try to detect schema and format options automatically. Any option specified explicitly will be honored.
1069 },
1070 &quot;labels&quot;: { # 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.
1071 &quot;a_key&quot;: &quot;A String&quot;,
1072 },
1073 &quot;lastModifiedTime&quot;: &quot;A String&quot;, # [Output-only] The time when this table was last modified, in milliseconds since the epoch.
1074 &quot;schema&quot;: { # [Optional] Describes the schema of this table.
1075 &quot;fields&quot;: [ # Describes the fields in a table.
1076 {
1077 &quot;description&quot;: &quot;A String&quot;, # [Optional] The field description. The maximum length is 1,024 characters.
1078 &quot;categories&quot;: { # [Optional] The categories attached to this field, used for field-level access control.
1079 &quot;names&quot;: [ # A list of category resource names. For example, &quot;projects/1/taxonomies/2/categories/3&quot;. At most 5 categories are allowed.
1080 &quot;A String&quot;,
1081 ],
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001082 },
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07001083 &quot;type&quot;: &quot;A String&quot;, # [Required] The field data type. Possible values include STRING, BYTES, INTEGER, INT64 (same as INTEGER), FLOAT, FLOAT64 (same as FLOAT), BOOLEAN, BOOL (same as BOOLEAN), TIMESTAMP, DATE, TIME, DATETIME, RECORD (where RECORD indicates that the field contains a nested schema) or STRUCT (same as RECORD).
1084 &quot;fields&quot;: [ # [Optional] Describes the nested schema fields if the type property is set to RECORD.
1085 # Object with schema name: TableFieldSchema
1086 ],
1087 &quot;policyTags&quot;: {
1088 &quot;names&quot;: [ # A list of category resource names. For example, &quot;projects/1/location/eu/taxonomies/2/policyTags/3&quot;. At most 1 policy tag is allowed.
1089 &quot;A String&quot;,
1090 ],
1091 },
1092 &quot;mode&quot;: &quot;A String&quot;, # [Optional] The field mode. Possible values include NULLABLE, REQUIRED and REPEATED. The default value is NULLABLE.
1093 &quot;name&quot;: &quot;A String&quot;, # [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 128 characters.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001094 },
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07001095 ],
1096 },
1097 &quot;timePartitioning&quot;: { # Time-based partitioning specification for this table. Only one of timePartitioning and rangePartitioning should be specified.
1098 &quot;field&quot;: &quot;A String&quot;, # [Beta] [Optional] If not set, the table is partitioned by pseudo column, referenced via either &#x27;_PARTITIONTIME&#x27; as TIMESTAMP type, or &#x27;_PARTITIONDATE&#x27; as DATE type. If field is specified, the table is instead partitioned by this field. The field must be a top-level TIMESTAMP or DATE field. Its mode must be NULLABLE or REQUIRED.
1099 &quot;expirationMs&quot;: &quot;A String&quot;, # [Optional] Number of milliseconds for which to keep the storage for partitions in the table. The storage in a partition will have an expiration time of its partition time plus this value.
1100 &quot;requirePartitionFilter&quot;: True or False,
1101 &quot;type&quot;: &quot;A String&quot;, # [Required] The supported types are DAY, HOUR, MONTH, and YEAR, which will generate one partition per day, hour, month, and year, respectively. When the type is not specified, the default behavior is DAY.
1102 },
1103 &quot;kind&quot;: &quot;bigquery#table&quot;, # [Output-only] The type of the resource.
1104 &quot;materializedView&quot;: { # [Optional] Materialized view definition.
1105 &quot;query&quot;: &quot;A String&quot;, # [Required] A query whose result is persisted.
1106 &quot;lastRefreshTime&quot;: &quot;A String&quot;, # [Output-only] [TrustedTester] The time when this materialized view was last modified, in milliseconds since the epoch.
1107 &quot;enableRefresh&quot;: True or False, # [Optional] [TrustedTester] Enable automatic refresh of the materialized view when the base table is updated. The default value is &quot;true&quot;.
1108 &quot;refreshIntervalMs&quot;: &quot;A String&quot;, # [Optional] [TrustedTester] The maximum frequency at which this materialized view will be refreshed. The default value is &quot;1800000&quot; (30 minutes).
1109 },
1110 &quot;streamingBuffer&quot;: { # [Output-only] Contains information regarding this table&#x27;s streaming buffer, if one is present. This field will be absent if the table is not being streamed to or if there is no data in the streaming buffer.
1111 &quot;oldestEntryTime&quot;: &quot;A String&quot;, # [Output-only] Contains the timestamp of the oldest entry in the streaming buffer, in milliseconds since the epoch, if the streaming buffer is available.
1112 &quot;estimatedRows&quot;: &quot;A String&quot;, # [Output-only] A lower-bound estimate of the number of rows currently in the streaming buffer.
1113 &quot;estimatedBytes&quot;: &quot;A String&quot;, # [Output-only] A lower-bound estimate of the number of bytes currently in the streaming buffer.
1114 },
1115 &quot;clustering&quot;: { # [Beta] Clustering specification for the table. Must be specified with partitioning, data in the table will be first partitioned and subsequently clustered.
1116 &quot;fields&quot;: [ # [Repeated] One or more fields on which data should be clustered. Only top-level, non-repeated, simple-type fields are supported. When you cluster a table using multiple columns, the order of columns you specify is important. The order of the specified columns determines the sort order of the data.
1117 &quot;A String&quot;,
1118 ],
1119 },
1120 &quot;rangePartitioning&quot;: { # [TrustedTester] Range partitioning specification for this table. Only one of timePartitioning and rangePartitioning should be specified.
1121 &quot;range&quot;: { # [TrustedTester] [Required] Defines the ranges for range partitioning.
1122 &quot;start&quot;: &quot;A String&quot;, # [TrustedTester] [Required] The start of range partitioning, inclusive.
1123 &quot;interval&quot;: &quot;A String&quot;, # [TrustedTester] [Required] The width of each interval.
1124 &quot;end&quot;: &quot;A String&quot;, # [TrustedTester] [Required] The end of range partitioning, exclusive.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001125 },
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07001126 &quot;field&quot;: &quot;A String&quot;, # [TrustedTester] [Required] The table is partitioned by this field. The field must be a top-level NULLABLE/REQUIRED field. The only supported type is INTEGER/INT64.
1127 },
1128 &quot;numBytes&quot;: &quot;A String&quot;, # [Output-only] The size of this table in bytes, excluding any data in the streaming buffer.
1129}
1130
1131
1132Returns:
1133 An object of the form:
1134
1135 {
1136 &quot;type&quot;: &quot;A String&quot;, # [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. SNAPSHOT: An immutable, read-only table that is a copy of another table. [TrustedTester] MATERIALIZED_VIEW: SQL query whose result is persisted. EXTERNAL: A table that references data stored in an external storage system, such as Google Cloud Storage. The default value is TABLE.
1137 &quot;encryptionConfiguration&quot;: { # Custom encryption configuration (e.g., Cloud KMS keys).
1138 &quot;kmsKeyName&quot;: &quot;A String&quot;, # [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.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001139 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001140 &quot;tableReference&quot;: { # [Required] Reference describing the ID of this table.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001141 &quot;datasetId&quot;: &quot;A String&quot;, # [Required] The ID of the dataset containing this table.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07001142 &quot;projectId&quot;: &quot;A String&quot;, # [Required] The ID of the project containing this table.
1143 &quot;tableId&quot;: &quot;A String&quot;, # [Required] The ID of the table. The ID must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_). The maximum length is 1,024 characters.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001144 },
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07001145 &quot;numLongTermBytes&quot;: &quot;A String&quot;, # [Output-only] The number of bytes in the table that are considered &quot;long-term storage&quot;.
1146 &quot;requirePartitionFilter&quot;: false, # [Optional] If set to true, queries over this table require a partition filter that can be used for partition elimination to be specified.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001147 &quot;etag&quot;: &quot;A String&quot;, # [Output-only] A hash of the table metadata. Used to ensure there were no concurrent modifications to the resource when attempting an update. Not guaranteed to change when the table contents or the fields numRows, numBytes, numLongTermBytes or lastModifiedTime change.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07001148 &quot;expirationTime&quot;: &quot;A String&quot;, # [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.
1149 &quot;location&quot;: &quot;A String&quot;, # [Output-only] The geographic location where the table resides. This value is inherited from the dataset.
1150 &quot;friendlyName&quot;: &quot;A String&quot;, # [Optional] A descriptive name for this table.
1151 &quot;numRows&quot;: &quot;A String&quot;, # [Output-only] The number of rows of data in this table, excluding any data in the streaming buffer.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001152 &quot;model&quot;: { # [Output-only, Beta] Present iff this table represents a ML model. Describes the training information for the model, and it is required to run &#x27;PREDICT&#x27; queries.
1153 &quot;modelOptions&quot;: { # [Output-only, Beta] Model options used for the first training run. These options are immutable for subsequent training runs. Default values are used for any options not specified in the input query.
1154 &quot;lossType&quot;: &quot;A String&quot;,
1155 &quot;labels&quot;: [
1156 &quot;A String&quot;,
1157 ],
1158 &quot;modelType&quot;: &quot;A String&quot;,
1159 },
1160 &quot;trainingRuns&quot;: [ # [Output-only, Beta] Information about ml training runs, each training run comprises of multiple iterations and there may be multiple training runs for the model if warm start is used or if a user decides to continue a previously cancelled query.
Bu Sun Kim65020912020-05-20 12:08:20 -07001161 {
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001162 &quot;state&quot;: &quot;A String&quot;, # [Output-only, Beta] Different state applicable for a training run. IN PROGRESS: Training run is in progress. FAILED: Training run ended due to a non-retryable failure. SUCCEEDED: Training run successfully completed. CANCELLED: Training run cancelled by the user.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07001163 &quot;startTime&quot;: &quot;A String&quot;, # [Output-only, Beta] Training run start time in milliseconds since the epoch.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001164 &quot;iterationResults&quot;: [ # [Output-only, Beta] List of each iteration results.
1165 {
1166 &quot;index&quot;: 42, # [Output-only, Beta] Index of the ML training iteration, starting from zero for each training run.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001167 &quot;learnRate&quot;: 3.14, # [Output-only, Beta] Learning rate used for this iteration, it varies for different training iterations if learn_rate_strategy option is not constant.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07001168 &quot;evalLoss&quot;: 3.14, # [Output-only, Beta] Eval loss computed on the eval data at the end of the iteration. The eval loss is used for early stopping to avoid overfitting. No eval loss if eval_split_method option is specified as no_split or auto_split with input data size less than 500 rows.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001169 &quot;durationMs&quot;: &quot;A String&quot;, # [Output-only, Beta] Time taken to run the training iteration in milliseconds.
1170 &quot;trainingLoss&quot;: 3.14, # [Output-only, Beta] Training loss computed on the training data at the end of the iteration. The training loss function is defined by model type.
1171 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001172 ],
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07001173 &quot;trainingOptions&quot;: { # [Output-only, Beta] Training options used by this training run. These options are mutable for subsequent training runs. Default values are explicitly stored for options not specified in the input query of the first training run. For subsequent training runs, any option not explicitly specified in the input query will be copied from the previous training run.
1174 &quot;lineSearchInitLearnRate&quot;: 3.14,
1175 &quot;maxIteration&quot;: &quot;A String&quot;,
1176 &quot;learnRate&quot;: 3.14,
1177 &quot;l1Reg&quot;: 3.14,
1178 &quot;l2Reg&quot;: 3.14,
1179 &quot;learnRateStrategy&quot;: &quot;A String&quot;,
1180 &quot;earlyStop&quot;: True or False,
1181 &quot;minRelProgress&quot;: 3.14,
1182 &quot;warmStart&quot;: True or False,
1183 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001184 },
1185 ],
1186 },
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07001187 &quot;numPhysicalBytes&quot;: &quot;A String&quot;, # [Output-only] [TrustedTester] The physical size of this table in bytes, excluding any data in the streaming buffer. This includes compression and storage used for time travel.
1188 &quot;creationTime&quot;: &quot;A String&quot;, # [Output-only] The time when this table was created, in milliseconds since the epoch.
1189 &quot;selfLink&quot;: &quot;A String&quot;, # [Output-only] A URL that can be used to access this resource again.
1190 &quot;id&quot;: &quot;A String&quot;, # [Output-only] An opaque ID uniquely identifying the table.
1191 &quot;description&quot;: &quot;A String&quot;, # [Optional] A user-friendly description of this table.
1192 &quot;snapshotDefinition&quot;: { # [Output-only] Snapshot definition.
1193 &quot;baseTableReference&quot;: { # [Required] Reference describing the ID of the table that is snapshotted.
1194 &quot;datasetId&quot;: &quot;A String&quot;, # [Required] The ID of the dataset containing this table.
1195 &quot;projectId&quot;: &quot;A String&quot;, # [Required] The ID of the project containing this table.
1196 &quot;tableId&quot;: &quot;A String&quot;, # [Required] The ID of the table. The ID must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_). The maximum length is 1,024 characters.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001197 },
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07001198 &quot;snapshotTime&quot;: &quot;A String&quot;, # [Required] The time at which the base table was snapshot.
1199 },
1200 &quot;view&quot;: { # [Optional] The view definition.
1201 &quot;useLegacySql&quot;: True or False, # Specifies whether to use BigQuery&#x27;s legacy SQL for this view. The default value is true. If set to false, the view will use BigQuery&#x27;s standard SQL: https://cloud.google.com/bigquery/sql-reference/ Queries and views that reference this view must use the same flag value.
1202 &quot;query&quot;: &quot;A String&quot;, # [Required] A query that BigQuery executes when the view is referenced.
1203 &quot;userDefinedFunctionResources&quot;: [ # Describes user-defined function resources used in the query.
1204 { # This is used for defining User Defined Function (UDF) resources only when using legacy SQL. Users of Standard SQL should leverage either DDL (e.g. CREATE [TEMPORARY] FUNCTION ... ) or the Routines API to define UDF resources. For additional information on migrating, see: https://cloud.google.com/bigquery/docs/reference/standard-sql/migrating-from-legacy-sql#differences_in_user-defined_javascript_functions
1205 &quot;resourceUri&quot;: &quot;A String&quot;, # [Pick one] A code resource to load from a Google Cloud Storage URI (gs://bucket/path).
1206 &quot;inlineCode&quot;: &quot;A String&quot;, # [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.
1207 },
1208 ],
1209 },
1210 &quot;externalDataConfiguration&quot;: { # [Optional] Describes the data format, location, and other properties of a table stored outside of BigQuery. By defining these properties, the data source can then be queried as if it were a standard BigQuery table.
1211 &quot;connectionId&quot;: &quot;A String&quot;, # [Optional, Trusted Tester] Connection for external data source.
1212 &quot;sourceFormat&quot;: &quot;A String&quot;, # [Required] The data format. For CSV files, specify &quot;CSV&quot;. For Google sheets, specify &quot;GOOGLE_SHEETS&quot;. For newline-delimited JSON, specify &quot;NEWLINE_DELIMITED_JSON&quot;. For Avro files, specify &quot;AVRO&quot;. For Google Cloud Datastore backups, specify &quot;DATASTORE_BACKUP&quot;. [Beta] For Google Cloud Bigtable, specify &quot;BIGTABLE&quot;.
1213 &quot;bigtableOptions&quot;: { # [Optional] Additional options if sourceFormat is set to BIGTABLE.
1214 &quot;columnFamilies&quot;: [ # [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 &#x27;type&#x27; 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.
1215 {
1216 &quot;columns&quot;: [ # [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 .Column field.
1217 {
1218 &quot;qualifierString&quot;: &quot;A String&quot;,
1219 &quot;qualifierEncoded&quot;: &quot;A String&quot;, # [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-zA-Z0-9_]*, a valid identifier must be provided as field_name.
1220 &quot;encoding&quot;: &quot;A String&quot;, # [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. &#x27;encoding&#x27; can also be set at the column family level. However, the setting at this level takes precedence if &#x27;encoding&#x27; is set at both levels.
1221 &quot;fieldName&quot;: &quot;A String&quot;, # [Optional] If the qualifier is not a valid BigQuery field identifier i.e. does not match [a-zA-Z][a-zA-Z0-9_]*, a valid identifier must be provided as the column field name and is used as field name in queries.
1222 &quot;onlyReadLatest&quot;: True or False, # [Optional] If this is set, only the latest version of value in this column are exposed. &#x27;onlyReadLatest&#x27; can also be set at the column family level. However, the setting at this level takes precedence if &#x27;onlyReadLatest&#x27; is set at both levels.
1223 &quot;type&quot;: &quot;A String&quot;, # [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 Default type is BYTES. &#x27;type&#x27; can also be set at the column family level. However, the setting at this level takes precedence if &#x27;type&#x27; is set at both levels.
1224 },
1225 ],
1226 &quot;type&quot;: &quot;A String&quot;, # [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 Default type is BYTES. This can be overridden for a specific column by listing that column in &#x27;columns&#x27; and specifying a type for it.
1227 &quot;encoding&quot;: &quot;A String&quot;, # [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. This can be overridden for a specific column by listing that column in &#x27;columns&#x27; and specifying an encoding for it.
1228 &quot;familyId&quot;: &quot;A String&quot;, # Identifier of the column family.
1229 &quot;onlyReadLatest&quot;: True or False, # [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 &#x27;columns&#x27; and specifying a different setting for that column.
1230 },
1231 ],
1232 &quot;ignoreUnspecifiedColumnFamilies&quot;: True or False, # [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.
1233 &quot;readRowkeyAsString&quot;: True or False, # [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.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001234 },
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07001235 &quot;schema&quot;: { # [Optional] The schema for the data. Schema is required for CSV and JSON formats. Schema is disallowed for Google Cloud Bigtable, Cloud Datastore backups, and Avro formats.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001236 &quot;fields&quot;: [ # Describes the fields in a table.
1237 {
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001238 &quot;description&quot;: &quot;A String&quot;, # [Optional] The field description. The maximum length is 1,024 characters.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001239 &quot;categories&quot;: { # [Optional] The categories attached to this field, used for field-level access control.
1240 &quot;names&quot;: [ # A list of category resource names. For example, &quot;projects/1/taxonomies/2/categories/3&quot;. At most 5 categories are allowed.
1241 &quot;A String&quot;,
1242 ],
1243 },
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07001244 &quot;type&quot;: &quot;A String&quot;, # [Required] The field data type. Possible values include STRING, BYTES, INTEGER, INT64 (same as INTEGER), FLOAT, FLOAT64 (same as FLOAT), BOOLEAN, BOOL (same as BOOLEAN), TIMESTAMP, DATE, TIME, DATETIME, RECORD (where RECORD indicates that the field contains a nested schema) or STRUCT (same as RECORD).
1245 &quot;fields&quot;: [ # [Optional] Describes the nested schema fields if the type property is set to RECORD.
1246 # Object with schema name: TableFieldSchema
1247 ],
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001248 &quot;policyTags&quot;: {
1249 &quot;names&quot;: [ # A list of category resource names. For example, &quot;projects/1/location/eu/taxonomies/2/policyTags/3&quot;. At most 1 policy tag is allowed.
1250 &quot;A String&quot;,
1251 ],
1252 },
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07001253 &quot;mode&quot;: &quot;A String&quot;, # [Optional] The field mode. Possible values include NULLABLE, REQUIRED and REPEATED. The default value is NULLABLE.
1254 &quot;name&quot;: &quot;A String&quot;, # [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 128 characters.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001255 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001256 ],
1257 },
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07001258 &quot;ignoreUnknownValues&quot;: True or False, # [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&#x27;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.
1259 &quot;hivePartitioningOptions&quot;: { # [Optional, Trusted Tester] Options to configure hive partitioning support.
1260 &quot;mode&quot;: &quot;A String&quot;, # [Optional] When set, what mode of hive partitioning to use when reading data. The following modes are supported. (1) AUTO: automatically infer partition key name(s) and type(s). (2) STRINGS: automatically infer partition key name(s). All types are interpreted as strings. (3) 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 types include: AVRO, CSV, JSON, ORC and Parquet.
1261 &quot;sourceUriPrefix&quot;: &quot;A String&quot;, # [Optional] When hive partition detection is requested, a common prefix for all source uris should be supplied. 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-01-01/country=BR/id=7/file.avro gs://bucket/path_to_table/dt=2018-12-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/ (trailing slash does not matter).
1262 &quot;requirePartitionFilter&quot;: True or False, # [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 requirePartitionFilter explicitly set to true will fail.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001263 },
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07001264 &quot;compression&quot;: &quot;A String&quot;, # [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 and Avro formats.
1265 &quot;maxBadRecords&quot;: 42, # [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. This is only valid for CSV, JSON, and Google Sheets. The default value is 0, which requires that all records are valid. This setting is ignored for Google Cloud Bigtable, Google Cloud Datastore backups and Avro formats.
1266 &quot;googleSheetsOptions&quot;: { # [Optional] Additional options if sourceFormat is set to GOOGLE_SHEETS.
1267 &quot;skipLeadingRows&quot;: &quot;A String&quot;, # [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, 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 &gt; 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.
1268 &quot;range&quot;: &quot;A String&quot;, # [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
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001269 },
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07001270 &quot;sourceUris&quot;: [ # [Required] The fully-qualified URIs that point to your data in Google Cloud. For Google Cloud Storage URIs: Each URI can contain one &#x27;*&#x27; wildcard character and it must come after the &#x27;bucket&#x27; 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 &#x27;*&#x27; wildcard character is not allowed.
1271 &quot;A String&quot;,
1272 ],
1273 &quot;csvOptions&quot;: { # Additional properties to set if sourceFormat is set to CSV.
1274 &quot;quote&quot;: &quot;&quot;&quot;, # [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 (&#x27;&quot;&#x27;). 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.
1275 &quot;skipLeadingRows&quot;: &quot;A String&quot;, # [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 &gt; 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.
1276 &quot;allowQuotedNewlines&quot;: True or False, # [Optional] Indicates if BigQuery should allow quoted data sections that contain newline characters in a CSV file. The default value is false.
1277 &quot;fieldDelimiter&quot;: &quot;A String&quot;, # [Optional] The separator for fields 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. BigQuery also supports the escape sequence &quot;\t&quot; to specify a tab separator. The default value is a comma (&#x27;,&#x27;).
1278 &quot;encoding&quot;: &quot;A String&quot;, # [Optional] The character encoding of the data. The supported values are UTF-8 or ISO-8859-1. 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.
1279 &quot;allowJaggedRows&quot;: True or False, # [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.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001280 },
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07001281 &quot;autodetect&quot;: True or False, # Try to detect schema and format options automatically. Any option specified explicitly will be honored.
1282 },
1283 &quot;labels&quot;: { # 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.
1284 &quot;a_key&quot;: &quot;A String&quot;,
1285 },
1286 &quot;lastModifiedTime&quot;: &quot;A String&quot;, # [Output-only] The time when this table was last modified, in milliseconds since the epoch.
1287 &quot;schema&quot;: { # [Optional] Describes the schema of this table.
1288 &quot;fields&quot;: [ # Describes the fields in a table.
1289 {
1290 &quot;description&quot;: &quot;A String&quot;, # [Optional] The field description. The maximum length is 1,024 characters.
1291 &quot;categories&quot;: { # [Optional] The categories attached to this field, used for field-level access control.
1292 &quot;names&quot;: [ # A list of category resource names. For example, &quot;projects/1/taxonomies/2/categories/3&quot;. At most 5 categories are allowed.
1293 &quot;A String&quot;,
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001294 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001295 },
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07001296 &quot;type&quot;: &quot;A String&quot;, # [Required] The field data type. Possible values include STRING, BYTES, INTEGER, INT64 (same as INTEGER), FLOAT, FLOAT64 (same as FLOAT), BOOLEAN, BOOL (same as BOOLEAN), TIMESTAMP, DATE, TIME, DATETIME, RECORD (where RECORD indicates that the field contains a nested schema) or STRUCT (same as RECORD).
1297 &quot;fields&quot;: [ # [Optional] Describes the nested schema fields if the type property is set to RECORD.
1298 # Object with schema name: TableFieldSchema
1299 ],
1300 &quot;policyTags&quot;: {
1301 &quot;names&quot;: [ # A list of category resource names. For example, &quot;projects/1/location/eu/taxonomies/2/policyTags/3&quot;. At most 1 policy tag is allowed.
1302 &quot;A String&quot;,
1303 ],
1304 },
1305 &quot;mode&quot;: &quot;A String&quot;, # [Optional] The field mode. Possible values include NULLABLE, REQUIRED and REPEATED. The default value is NULLABLE.
1306 &quot;name&quot;: &quot;A String&quot;, # [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 128 characters.
1307 },
1308 ],
1309 },
1310 &quot;timePartitioning&quot;: { # Time-based partitioning specification for this table. Only one of timePartitioning and rangePartitioning should be specified.
1311 &quot;field&quot;: &quot;A String&quot;, # [Beta] [Optional] If not set, the table is partitioned by pseudo column, referenced via either &#x27;_PARTITIONTIME&#x27; as TIMESTAMP type, or &#x27;_PARTITIONDATE&#x27; as DATE type. If field is specified, the table is instead partitioned by this field. The field must be a top-level TIMESTAMP or DATE field. Its mode must be NULLABLE or REQUIRED.
1312 &quot;expirationMs&quot;: &quot;A String&quot;, # [Optional] Number of milliseconds for which to keep the storage for partitions in the table. The storage in a partition will have an expiration time of its partition time plus this value.
1313 &quot;requirePartitionFilter&quot;: True or False,
1314 &quot;type&quot;: &quot;A String&quot;, # [Required] The supported types are DAY, HOUR, MONTH, and YEAR, which will generate one partition per day, hour, month, and year, respectively. When the type is not specified, the default behavior is DAY.
1315 },
1316 &quot;kind&quot;: &quot;bigquery#table&quot;, # [Output-only] The type of the resource.
1317 &quot;materializedView&quot;: { # [Optional] Materialized view definition.
1318 &quot;query&quot;: &quot;A String&quot;, # [Required] A query whose result is persisted.
1319 &quot;lastRefreshTime&quot;: &quot;A String&quot;, # [Output-only] [TrustedTester] The time when this materialized view was last modified, in milliseconds since the epoch.
1320 &quot;enableRefresh&quot;: True or False, # [Optional] [TrustedTester] Enable automatic refresh of the materialized view when the base table is updated. The default value is &quot;true&quot;.
1321 &quot;refreshIntervalMs&quot;: &quot;A String&quot;, # [Optional] [TrustedTester] The maximum frequency at which this materialized view will be refreshed. The default value is &quot;1800000&quot; (30 minutes).
1322 },
1323 &quot;streamingBuffer&quot;: { # [Output-only] Contains information regarding this table&#x27;s streaming buffer, if one is present. This field will be absent if the table is not being streamed to or if there is no data in the streaming buffer.
1324 &quot;oldestEntryTime&quot;: &quot;A String&quot;, # [Output-only] Contains the timestamp of the oldest entry in the streaming buffer, in milliseconds since the epoch, if the streaming buffer is available.
1325 &quot;estimatedRows&quot;: &quot;A String&quot;, # [Output-only] A lower-bound estimate of the number of rows currently in the streaming buffer.
1326 &quot;estimatedBytes&quot;: &quot;A String&quot;, # [Output-only] A lower-bound estimate of the number of bytes currently in the streaming buffer.
1327 },
1328 &quot;clustering&quot;: { # [Beta] Clustering specification for the table. Must be specified with partitioning, data in the table will be first partitioned and subsequently clustered.
1329 &quot;fields&quot;: [ # [Repeated] One or more fields on which data should be clustered. Only top-level, non-repeated, simple-type fields are supported. When you cluster a table using multiple columns, the order of columns you specify is important. The order of the specified columns determines the sort order of the data.
1330 &quot;A String&quot;,
1331 ],
1332 },
1333 &quot;rangePartitioning&quot;: { # [TrustedTester] Range partitioning specification for this table. Only one of timePartitioning and rangePartitioning should be specified.
1334 &quot;range&quot;: { # [TrustedTester] [Required] Defines the ranges for range partitioning.
1335 &quot;start&quot;: &quot;A String&quot;, # [TrustedTester] [Required] The start of range partitioning, inclusive.
1336 &quot;interval&quot;: &quot;A String&quot;, # [TrustedTester] [Required] The width of each interval.
1337 &quot;end&quot;: &quot;A String&quot;, # [TrustedTester] [Required] The end of range partitioning, exclusive.
Bu Sun Kim65020912020-05-20 12:08:20 -07001338 },
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07001339 &quot;field&quot;: &quot;A String&quot;, # [TrustedTester] [Required] The table is partitioned by this field. The field must be a top-level NULLABLE/REQUIRED field. The only supported type is INTEGER/INT64.
1340 },
1341 &quot;numBytes&quot;: &quot;A String&quot;, # [Output-only] The size of this table in bytes, excluding any data in the streaming buffer.
1342 }</pre>
John Asmuth614db982014-04-24 15:46:26 -04001343</div>
1344
1345<div class="method">
Bu Sun Kim65020912020-05-20 12:08:20 -07001346 <code class="details" id="setIamPolicy">setIamPolicy(resource, body=None)</code>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001347 <pre>Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.
Bu Sun Kim65020912020-05-20 12:08:20 -07001348
1349Args:
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001350 resource: string, REQUIRED: The resource for which the policy is being specified. See the operation documentation for the appropriate value for this field. (required)
Bu Sun Kim65020912020-05-20 12:08:20 -07001351 body: object, The request body.
1352 The object takes the form of:
1353
1354{ # Request message for `SetIamPolicy` method.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001355 &quot;policy&quot;: { # An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources. A `Policy` is a collection of `bindings`. A `binding` binds one or more `members` to a single `role`. Members can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role. For some types of Google Cloud resources, a `binding` can also specify a `condition`, which is a logical expression that allows access to a resource only if the expression evaluates to `true`. A condition can add constraints based on attributes of the request, the resource, or both. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). **JSON example:** { &quot;bindings&quot;: [ { &quot;role&quot;: &quot;roles/resourcemanager.organizationAdmin&quot;, &quot;members&quot;: [ &quot;user:mike@example.com&quot;, &quot;group:admins@example.com&quot;, &quot;domain:google.com&quot;, &quot;serviceAccount:my-project-id@appspot.gserviceaccount.com&quot; ] }, { &quot;role&quot;: &quot;roles/resourcemanager.organizationViewer&quot;, &quot;members&quot;: [ &quot;user:eve@example.com&quot; ], &quot;condition&quot;: { &quot;title&quot;: &quot;expirable access&quot;, &quot;description&quot;: &quot;Does not grant access after Sep 2020&quot;, &quot;expression&quot;: &quot;request.time &lt; timestamp(&#x27;2020-10-01T00:00:00.000Z&#x27;)&quot;, } } ], &quot;etag&quot;: &quot;BwWWja0YfJA=&quot;, &quot;version&quot;: 3 } **YAML example:** bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time &lt; timestamp(&#x27;2020-10-01T00:00:00.000Z&#x27;) - etag: BwWWja0YfJA= - version: 3 For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/). # REQUIRED: The complete policy to be applied to the `resource`. The size of the policy is limited to a few 10s of KB. An empty policy is a valid policy but certain Cloud Platform services (such as Projects) might reject them.
1356 &quot;version&quot;: 42, # Specifies the format of the policy. Valid values are `0`, `1`, and `3`. Requests that specify an invalid value are rejected. Any operation that affects conditional role bindings must specify version `3`. This requirement applies to the following operations: * Getting a policy that includes a conditional role binding * Adding a conditional role binding to a policy * Changing a conditional role binding in a policy * Removing any role binding, with or without a condition, from a policy that includes conditions **Important:** If you use IAM Conditions, you must include the `etag` field whenever you call `setIamPolicy`. If you omit this field, then IAM allows you to overwrite a version `3` policy with a version `1` policy, and all of the conditions in the version `3` policy are lost. If a policy does not include any conditions, operations on that policy may specify any valid version or leave the field unset. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
Bu Sun Kim65020912020-05-20 12:08:20 -07001357 &quot;auditConfigs&quot;: [ # Specifies cloud audit logging configuration for this policy.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001358 { # Specifies the audit configuration for a service. The configuration determines which permission types are logged, and what identities, if any, are exempted from logging. An AuditConfig must have one or more AuditLogConfigs. If there are AuditConfigs for both `allServices` and a specific service, the union of the two AuditConfigs is used for that service: the log_types specified in each AuditConfig are enabled, and the exempted_members in each AuditLogConfig are exempted. Example Policy with multiple AuditConfigs: { &quot;audit_configs&quot;: [ { &quot;service&quot;: &quot;allServices&quot;, &quot;audit_log_configs&quot;: [ { &quot;log_type&quot;: &quot;DATA_READ&quot;, &quot;exempted_members&quot;: [ &quot;user:jose@example.com&quot; ] }, { &quot;log_type&quot;: &quot;DATA_WRITE&quot; }, { &quot;log_type&quot;: &quot;ADMIN_READ&quot; } ] }, { &quot;service&quot;: &quot;sampleservice.googleapis.com&quot;, &quot;audit_log_configs&quot;: [ { &quot;log_type&quot;: &quot;DATA_READ&quot; }, { &quot;log_type&quot;: &quot;DATA_WRITE&quot;, &quot;exempted_members&quot;: [ &quot;user:aliya@example.com&quot; ] } ] } ] } For sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ logging. It also exempts jose@example.com from DATA_READ logging, and aliya@example.com from DATA_WRITE logging.
1359 &quot;service&quot;: &quot;A String&quot;, # Specifies a service that will be enabled for audit logging. For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. `allServices` is a special value that covers all services.
Bu Sun Kim65020912020-05-20 12:08:20 -07001360 &quot;auditLogConfigs&quot;: [ # The configuration for logging of each type of permission.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001361 { # Provides the configuration for logging a type of permissions. Example: { &quot;audit_log_configs&quot;: [ { &quot;log_type&quot;: &quot;DATA_READ&quot;, &quot;exempted_members&quot;: [ &quot;user:jose@example.com&quot; ] }, { &quot;log_type&quot;: &quot;DATA_WRITE&quot; } ] } This enables &#x27;DATA_READ&#x27; and &#x27;DATA_WRITE&#x27; logging, while exempting jose@example.com from DATA_READ logging.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001362 &quot;exemptedMembers&quot;: [ # Specifies the identities that do not cause logging for this type of permission. Follows the same format of Binding.members.
Bu Sun Kim65020912020-05-20 12:08:20 -07001363 &quot;A String&quot;,
1364 ],
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07001365 &quot;logType&quot;: &quot;A String&quot;, # The log type that this config enables.
Bu Sun Kim65020912020-05-20 12:08:20 -07001366 },
1367 ],
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001368 },
1369 ],
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001370 &quot;etag&quot;: &quot;A String&quot;, # `etag` is used for optimistic concurrency control as a way to help prevent simultaneous updates of a policy from overwriting each other. It is strongly suggested that systems make use of the `etag` in the read-modify-write cycle to perform policy updates in order to avoid race conditions: An `etag` is returned in the response to `getIamPolicy`, and systems are expected to put that etag in the request to `setIamPolicy` to ensure that their change will be applied to the same version of the policy. **Important:** If you use IAM Conditions, you must include the `etag` field whenever you call `setIamPolicy`. If you omit this field, then IAM allows you to overwrite a version `3` policy with a version `1` policy, and all of the conditions in the version `3` policy are lost.
1371 &quot;bindings&quot;: [ # Associates a list of `members` to a `role`. Optionally, may specify a `condition` that determines how and when the `bindings` are applied. Each of the `bindings` must contain at least one member.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001372 { # Associates `members` with a `role`.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001373 &quot;members&quot;: [ # Specifies the identities requesting access for a Cloud Platform resource. `members` can have the following values: * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account. * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account. * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` . * `serviceAccount:{emailid}`: An email address that represents a service account. For example, `my-other-app@appspot.gserviceaccount.com`. * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`. * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a user that has been recently deleted. For example, `alice@example.com?uid=123456789012345678901`. If the user is recovered, this value reverts to `user:{emailid}` and the recovered user retains the role in the binding. * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a service account that has been recently deleted. For example, `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. If the service account is undeleted, this value reverts to `serviceAccount:{emailid}` and the undeleted service account retains the role in the binding. * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a Google group that has been recently deleted. For example, `admins@example.com?uid=123456789012345678901`. If the group is recovered, this value reverts to `group:{emailid}` and the recovered group retains the role in the binding. * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001374 &quot;A String&quot;,
1375 ],
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07001376 &quot;role&quot;: &quot;A String&quot;, # Role that is assigned to `members`. For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
1377 &quot;bindingId&quot;: &quot;A String&quot;,
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001378 &quot;condition&quot;: { # Represents a textual expression in the Common Expression Language (CEL) syntax. CEL is a C-like expression language. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec. Example (Comparison): title: &quot;Summary size limit&quot; description: &quot;Determines if a summary is less than 100 chars&quot; expression: &quot;document.summary.size() &lt; 100&quot; Example (Equality): title: &quot;Requestor is owner&quot; description: &quot;Determines if requestor is the document owner&quot; expression: &quot;document.owner == request.auth.claims.email&quot; Example (Logic): title: &quot;Public documents&quot; description: &quot;Determine whether the document should be publicly visible&quot; expression: &quot;document.type != &#x27;private&#x27; &amp;&amp; document.type != &#x27;internal&#x27;&quot; Example (Data Manipulation): title: &quot;Notification string&quot; description: &quot;Create a notification string with a timestamp.&quot; expression: &quot;&#x27;New message received at &#x27; + string(document.create_time)&quot; The exact variables and functions that may be referenced within an expression are determined by the service that evaluates it. See the service documentation for additional information. # The condition that is associated with this binding. If the condition evaluates to `true`, then this binding applies to the current request. If the condition evaluates to `false`, then this binding does not apply to the current request. However, a different role binding might grant the same role to one or more of the members in this binding. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001379 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language syntax.
1380 &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07001381 &quot;location&quot;: &quot;A String&quot;, # Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001382 &quot;description&quot;: &quot;A String&quot;, # Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.
1383 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001384 },
1385 ],
1386 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001387 &quot;updateMask&quot;: &quot;A String&quot;, # OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only the fields in the mask will be modified. If no mask is provided, the following default mask is used: `paths: &quot;bindings, etag&quot;`
Bu Sun Kim65020912020-05-20 12:08:20 -07001388 }
1389
1390
1391Returns:
1392 An object of the form:
1393
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001394 { # An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources. A `Policy` is a collection of `bindings`. A `binding` binds one or more `members` to a single `role`. Members can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role. For some types of Google Cloud resources, a `binding` can also specify a `condition`, which is a logical expression that allows access to a resource only if the expression evaluates to `true`. A condition can add constraints based on attributes of the request, the resource, or both. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). **JSON example:** { &quot;bindings&quot;: [ { &quot;role&quot;: &quot;roles/resourcemanager.organizationAdmin&quot;, &quot;members&quot;: [ &quot;user:mike@example.com&quot;, &quot;group:admins@example.com&quot;, &quot;domain:google.com&quot;, &quot;serviceAccount:my-project-id@appspot.gserviceaccount.com&quot; ] }, { &quot;role&quot;: &quot;roles/resourcemanager.organizationViewer&quot;, &quot;members&quot;: [ &quot;user:eve@example.com&quot; ], &quot;condition&quot;: { &quot;title&quot;: &quot;expirable access&quot;, &quot;description&quot;: &quot;Does not grant access after Sep 2020&quot;, &quot;expression&quot;: &quot;request.time &lt; timestamp(&#x27;2020-10-01T00:00:00.000Z&#x27;)&quot;, } } ], &quot;etag&quot;: &quot;BwWWja0YfJA=&quot;, &quot;version&quot;: 3 } **YAML example:** bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time &lt; timestamp(&#x27;2020-10-01T00:00:00.000Z&#x27;) - etag: BwWWja0YfJA= - version: 3 For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/).
1395 &quot;version&quot;: 42, # Specifies the format of the policy. Valid values are `0`, `1`, and `3`. Requests that specify an invalid value are rejected. Any operation that affects conditional role bindings must specify version `3`. This requirement applies to the following operations: * Getting a policy that includes a conditional role binding * Adding a conditional role binding to a policy * Changing a conditional role binding in a policy * Removing any role binding, with or without a condition, from a policy that includes conditions **Important:** If you use IAM Conditions, you must include the `etag` field whenever you call `setIamPolicy`. If you omit this field, then IAM allows you to overwrite a version `3` policy with a version `1` policy, and all of the conditions in the version `3` policy are lost. If a policy does not include any conditions, operations on that policy may specify any valid version or leave the field unset. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
Bu Sun Kim65020912020-05-20 12:08:20 -07001396 &quot;auditConfigs&quot;: [ # Specifies cloud audit logging configuration for this policy.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001397 { # Specifies the audit configuration for a service. The configuration determines which permission types are logged, and what identities, if any, are exempted from logging. An AuditConfig must have one or more AuditLogConfigs. If there are AuditConfigs for both `allServices` and a specific service, the union of the two AuditConfigs is used for that service: the log_types specified in each AuditConfig are enabled, and the exempted_members in each AuditLogConfig are exempted. Example Policy with multiple AuditConfigs: { &quot;audit_configs&quot;: [ { &quot;service&quot;: &quot;allServices&quot;, &quot;audit_log_configs&quot;: [ { &quot;log_type&quot;: &quot;DATA_READ&quot;, &quot;exempted_members&quot;: [ &quot;user:jose@example.com&quot; ] }, { &quot;log_type&quot;: &quot;DATA_WRITE&quot; }, { &quot;log_type&quot;: &quot;ADMIN_READ&quot; } ] }, { &quot;service&quot;: &quot;sampleservice.googleapis.com&quot;, &quot;audit_log_configs&quot;: [ { &quot;log_type&quot;: &quot;DATA_READ&quot; }, { &quot;log_type&quot;: &quot;DATA_WRITE&quot;, &quot;exempted_members&quot;: [ &quot;user:aliya@example.com&quot; ] } ] } ] } For sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ logging. It also exempts jose@example.com from DATA_READ logging, and aliya@example.com from DATA_WRITE logging.
1398 &quot;service&quot;: &quot;A String&quot;, # Specifies a service that will be enabled for audit logging. For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. `allServices` is a special value that covers all services.
Bu Sun Kim65020912020-05-20 12:08:20 -07001399 &quot;auditLogConfigs&quot;: [ # The configuration for logging of each type of permission.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001400 { # Provides the configuration for logging a type of permissions. Example: { &quot;audit_log_configs&quot;: [ { &quot;log_type&quot;: &quot;DATA_READ&quot;, &quot;exempted_members&quot;: [ &quot;user:jose@example.com&quot; ] }, { &quot;log_type&quot;: &quot;DATA_WRITE&quot; } ] } This enables &#x27;DATA_READ&#x27; and &#x27;DATA_WRITE&#x27; logging, while exempting jose@example.com from DATA_READ logging.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001401 &quot;exemptedMembers&quot;: [ # Specifies the identities that do not cause logging for this type of permission. Follows the same format of Binding.members.
Bu Sun Kim65020912020-05-20 12:08:20 -07001402 &quot;A String&quot;,
1403 ],
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07001404 &quot;logType&quot;: &quot;A String&quot;, # The log type that this config enables.
Bu Sun Kim65020912020-05-20 12:08:20 -07001405 },
1406 ],
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001407 },
1408 ],
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001409 &quot;etag&quot;: &quot;A String&quot;, # `etag` is used for optimistic concurrency control as a way to help prevent simultaneous updates of a policy from overwriting each other. It is strongly suggested that systems make use of the `etag` in the read-modify-write cycle to perform policy updates in order to avoid race conditions: An `etag` is returned in the response to `getIamPolicy`, and systems are expected to put that etag in the request to `setIamPolicy` to ensure that their change will be applied to the same version of the policy. **Important:** If you use IAM Conditions, you must include the `etag` field whenever you call `setIamPolicy`. If you omit this field, then IAM allows you to overwrite a version `3` policy with a version `1` policy, and all of the conditions in the version `3` policy are lost.
1410 &quot;bindings&quot;: [ # Associates a list of `members` to a `role`. Optionally, may specify a `condition` that determines how and when the `bindings` are applied. Each of the `bindings` must contain at least one member.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001411 { # Associates `members` with a `role`.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001412 &quot;members&quot;: [ # Specifies the identities requesting access for a Cloud Platform resource. `members` can have the following values: * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account. * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account. * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` . * `serviceAccount:{emailid}`: An email address that represents a service account. For example, `my-other-app@appspot.gserviceaccount.com`. * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`. * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a user that has been recently deleted. For example, `alice@example.com?uid=123456789012345678901`. If the user is recovered, this value reverts to `user:{emailid}` and the recovered user retains the role in the binding. * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a service account that has been recently deleted. For example, `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. If the service account is undeleted, this value reverts to `serviceAccount:{emailid}` and the undeleted service account retains the role in the binding. * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a Google group that has been recently deleted. For example, `admins@example.com?uid=123456789012345678901`. If the group is recovered, this value reverts to `group:{emailid}` and the recovered group retains the role in the binding. * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001413 &quot;A String&quot;,
1414 ],
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07001415 &quot;role&quot;: &quot;A String&quot;, # Role that is assigned to `members`. For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
1416 &quot;bindingId&quot;: &quot;A String&quot;,
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001417 &quot;condition&quot;: { # Represents a textual expression in the Common Expression Language (CEL) syntax. CEL is a C-like expression language. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec. Example (Comparison): title: &quot;Summary size limit&quot; description: &quot;Determines if a summary is less than 100 chars&quot; expression: &quot;document.summary.size() &lt; 100&quot; Example (Equality): title: &quot;Requestor is owner&quot; description: &quot;Determines if requestor is the document owner&quot; expression: &quot;document.owner == request.auth.claims.email&quot; Example (Logic): title: &quot;Public documents&quot; description: &quot;Determine whether the document should be publicly visible&quot; expression: &quot;document.type != &#x27;private&#x27; &amp;&amp; document.type != &#x27;internal&#x27;&quot; Example (Data Manipulation): title: &quot;Notification string&quot; description: &quot;Create a notification string with a timestamp.&quot; expression: &quot;&#x27;New message received at &#x27; + string(document.create_time)&quot; The exact variables and functions that may be referenced within an expression are determined by the service that evaluates it. See the service documentation for additional information. # The condition that is associated with this binding. If the condition evaluates to `true`, then this binding applies to the current request. If the condition evaluates to `false`, then this binding does not apply to the current request. However, a different role binding might grant the same role to one or more of the members in this binding. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001418 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language syntax.
1419 &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07001420 &quot;location&quot;: &quot;A String&quot;, # Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001421 &quot;description&quot;: &quot;A String&quot;, # Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.
1422 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001423 },
1424 ],
1425 }</pre>
1426</div>
1427
1428<div class="method">
1429 <code class="details" id="testIamPermissions">testIamPermissions(resource, body=None)</code>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001430 <pre>Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may &quot;fail open&quot; without warning.
Bu Sun Kim65020912020-05-20 12:08:20 -07001431
1432Args:
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001433 resource: string, REQUIRED: The resource for which the policy detail is being requested. See the operation documentation for the appropriate value for this field. (required)
Bu Sun Kim65020912020-05-20 12:08:20 -07001434 body: object, The request body.
1435 The object takes the form of:
1436
1437{ # Request message for `TestIamPermissions` method.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001438 &quot;permissions&quot;: [ # The set of permissions to check for the `resource`. Permissions with wildcards (such as &#x27;*&#x27; or &#x27;storage.*&#x27;) are not allowed. For more information see [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions).
Bu Sun Kim65020912020-05-20 12:08:20 -07001439 &quot;A String&quot;,
1440 ],
1441 }
1442
1443
1444Returns:
1445 An object of the form:
1446
1447 { # Response message for `TestIamPermissions` method.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001448 &quot;permissions&quot;: [ # A subset of `TestPermissionsRequest.permissions` that the caller is allowed.
Bu Sun Kim65020912020-05-20 12:08:20 -07001449 &quot;A String&quot;,
1450 ],
1451 }</pre>
1452</div>
1453
1454<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07001455 <code class="details" id="update">update(projectId, datasetId, tableId, body=None)</code>
John Asmuth614db982014-04-24 15:46:26 -04001456 <pre>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.
1457
1458Args:
1459 projectId: string, Project ID of the table to update (required)
1460 datasetId: string, Dataset ID of the table to update (required)
1461 tableId: string, Table ID of the table to update (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07001462 body: object, The request body.
John Asmuth614db982014-04-24 15:46:26 -04001463 The object takes the form of:
1464
1465{
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07001466 &quot;type&quot;: &quot;A String&quot;, # [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. SNAPSHOT: An immutable, read-only table that is a copy of another table. [TrustedTester] MATERIALIZED_VIEW: SQL query whose result is persisted. EXTERNAL: A table that references data stored in an external storage system, such as Google Cloud Storage. The default value is TABLE.
1467 &quot;encryptionConfiguration&quot;: { # Custom encryption configuration (e.g., Cloud KMS keys).
1468 &quot;kmsKeyName&quot;: &quot;A String&quot;, # [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.
1469 },
1470 &quot;tableReference&quot;: { # [Required] Reference describing the ID of this table.
1471 &quot;datasetId&quot;: &quot;A String&quot;, # [Required] The ID of the dataset containing this table.
1472 &quot;projectId&quot;: &quot;A String&quot;, # [Required] The ID of the project containing this table.
1473 &quot;tableId&quot;: &quot;A String&quot;, # [Required] The ID of the table. The ID must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_). The maximum length is 1,024 characters.
1474 },
1475 &quot;numLongTermBytes&quot;: &quot;A String&quot;, # [Output-only] The number of bytes in the table that are considered &quot;long-term storage&quot;.
1476 &quot;requirePartitionFilter&quot;: false, # [Optional] If set to true, queries over this table require a partition filter that can be used for partition elimination to be specified.
1477 &quot;etag&quot;: &quot;A String&quot;, # [Output-only] A hash of the table metadata. Used to ensure there were no concurrent modifications to the resource when attempting an update. Not guaranteed to change when the table contents or the fields numRows, numBytes, numLongTermBytes or lastModifiedTime change.
1478 &quot;expirationTime&quot;: &quot;A String&quot;, # [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.
1479 &quot;location&quot;: &quot;A String&quot;, # [Output-only] The geographic location where the table resides. This value is inherited from the dataset.
1480 &quot;friendlyName&quot;: &quot;A String&quot;, # [Optional] A descriptive name for this table.
1481 &quot;numRows&quot;: &quot;A String&quot;, # [Output-only] The number of rows of data in this table, excluding any data in the streaming buffer.
1482 &quot;model&quot;: { # [Output-only, Beta] Present iff this table represents a ML model. Describes the training information for the model, and it is required to run &#x27;PREDICT&#x27; queries.
1483 &quot;modelOptions&quot;: { # [Output-only, Beta] Model options used for the first training run. These options are immutable for subsequent training runs. Default values are used for any options not specified in the input query.
1484 &quot;lossType&quot;: &quot;A String&quot;,
1485 &quot;labels&quot;: [
1486 &quot;A String&quot;,
1487 ],
1488 &quot;modelType&quot;: &quot;A String&quot;,
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001489 },
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07001490 &quot;trainingRuns&quot;: [ # [Output-only, Beta] Information about ml training runs, each training run comprises of multiple iterations and there may be multiple training runs for the model if warm start is used or if a user decides to continue a previously cancelled query.
1491 {
1492 &quot;state&quot;: &quot;A String&quot;, # [Output-only, Beta] Different state applicable for a training run. IN PROGRESS: Training run is in progress. FAILED: Training run ended due to a non-retryable failure. SUCCEEDED: Training run successfully completed. CANCELLED: Training run cancelled by the user.
1493 &quot;startTime&quot;: &quot;A String&quot;, # [Output-only, Beta] Training run start time in milliseconds since the epoch.
1494 &quot;iterationResults&quot;: [ # [Output-only, Beta] List of each iteration results.
1495 {
1496 &quot;index&quot;: 42, # [Output-only, Beta] Index of the ML training iteration, starting from zero for each training run.
1497 &quot;learnRate&quot;: 3.14, # [Output-only, Beta] Learning rate used for this iteration, it varies for different training iterations if learn_rate_strategy option is not constant.
1498 &quot;evalLoss&quot;: 3.14, # [Output-only, Beta] Eval loss computed on the eval data at the end of the iteration. The eval loss is used for early stopping to avoid overfitting. No eval loss if eval_split_method option is specified as no_split or auto_split with input data size less than 500 rows.
1499 &quot;durationMs&quot;: &quot;A String&quot;, # [Output-only, Beta] Time taken to run the training iteration in milliseconds.
1500 &quot;trainingLoss&quot;: 3.14, # [Output-only, Beta] Training loss computed on the training data at the end of the iteration. The training loss function is defined by model type.
1501 },
1502 ],
1503 &quot;trainingOptions&quot;: { # [Output-only, Beta] Training options used by this training run. These options are mutable for subsequent training runs. Default values are explicitly stored for options not specified in the input query of the first training run. For subsequent training runs, any option not explicitly specified in the input query will be copied from the previous training run.
1504 &quot;lineSearchInitLearnRate&quot;: 3.14,
1505 &quot;maxIteration&quot;: &quot;A String&quot;,
1506 &quot;learnRate&quot;: 3.14,
1507 &quot;l1Reg&quot;: 3.14,
1508 &quot;l2Reg&quot;: 3.14,
1509 &quot;learnRateStrategy&quot;: &quot;A String&quot;,
1510 &quot;earlyStop&quot;: True or False,
1511 &quot;minRelProgress&quot;: 3.14,
1512 &quot;warmStart&quot;: True or False,
1513 },
1514 },
1515 ],
1516 },
1517 &quot;numPhysicalBytes&quot;: &quot;A String&quot;, # [Output-only] [TrustedTester] The physical size of this table in bytes, excluding any data in the streaming buffer. This includes compression and storage used for time travel.
1518 &quot;creationTime&quot;: &quot;A String&quot;, # [Output-only] The time when this table was created, in milliseconds since the epoch.
1519 &quot;selfLink&quot;: &quot;A String&quot;, # [Output-only] A URL that can be used to access this resource again.
1520 &quot;id&quot;: &quot;A String&quot;, # [Output-only] An opaque ID uniquely identifying the table.
1521 &quot;description&quot;: &quot;A String&quot;, # [Optional] A user-friendly description of this table.
1522 &quot;snapshotDefinition&quot;: { # [Output-only] Snapshot definition.
1523 &quot;baseTableReference&quot;: { # [Required] Reference describing the ID of the table that is snapshotted.
1524 &quot;datasetId&quot;: &quot;A String&quot;, # [Required] The ID of the dataset containing this table.
1525 &quot;projectId&quot;: &quot;A String&quot;, # [Required] The ID of the project containing this table.
1526 &quot;tableId&quot;: &quot;A String&quot;, # [Required] The ID of the table. The ID must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_). The maximum length is 1,024 characters.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001527 },
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07001528 &quot;snapshotTime&quot;: &quot;A String&quot;, # [Required] The time at which the base table was snapshot.
1529 },
1530 &quot;view&quot;: { # [Optional] The view definition.
1531 &quot;useLegacySql&quot;: True or False, # Specifies whether to use BigQuery&#x27;s legacy SQL for this view. The default value is true. If set to false, the view will use BigQuery&#x27;s standard SQL: https://cloud.google.com/bigquery/sql-reference/ Queries and views that reference this view must use the same flag value.
1532 &quot;query&quot;: &quot;A String&quot;, # [Required] A query that BigQuery executes when the view is referenced.
1533 &quot;userDefinedFunctionResources&quot;: [ # Describes user-defined function resources used in the query.
1534 { # This is used for defining User Defined Function (UDF) resources only when using legacy SQL. Users of Standard SQL should leverage either DDL (e.g. CREATE [TEMPORARY] FUNCTION ... ) or the Routines API to define UDF resources. For additional information on migrating, see: https://cloud.google.com/bigquery/docs/reference/standard-sql/migrating-from-legacy-sql#differences_in_user-defined_javascript_functions
1535 &quot;resourceUri&quot;: &quot;A String&quot;, # [Pick one] A code resource to load from a Google Cloud Storage URI (gs://bucket/path).
1536 &quot;inlineCode&quot;: &quot;A String&quot;, # [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.
1537 },
1538 ],
1539 },
1540 &quot;externalDataConfiguration&quot;: { # [Optional] Describes the data format, location, and other properties of a table stored outside of BigQuery. By defining these properties, the data source can then be queried as if it were a standard BigQuery table.
1541 &quot;connectionId&quot;: &quot;A String&quot;, # [Optional, Trusted Tester] Connection for external data source.
1542 &quot;sourceFormat&quot;: &quot;A String&quot;, # [Required] The data format. For CSV files, specify &quot;CSV&quot;. For Google sheets, specify &quot;GOOGLE_SHEETS&quot;. For newline-delimited JSON, specify &quot;NEWLINE_DELIMITED_JSON&quot;. For Avro files, specify &quot;AVRO&quot;. For Google Cloud Datastore backups, specify &quot;DATASTORE_BACKUP&quot;. [Beta] For Google Cloud Bigtable, specify &quot;BIGTABLE&quot;.
1543 &quot;bigtableOptions&quot;: { # [Optional] Additional options if sourceFormat is set to BIGTABLE.
1544 &quot;columnFamilies&quot;: [ # [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 &#x27;type&#x27; 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.
1545 {
1546 &quot;columns&quot;: [ # [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 .Column field.
1547 {
1548 &quot;qualifierString&quot;: &quot;A String&quot;,
1549 &quot;qualifierEncoded&quot;: &quot;A String&quot;, # [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-zA-Z0-9_]*, a valid identifier must be provided as field_name.
1550 &quot;encoding&quot;: &quot;A String&quot;, # [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. &#x27;encoding&#x27; can also be set at the column family level. However, the setting at this level takes precedence if &#x27;encoding&#x27; is set at both levels.
1551 &quot;fieldName&quot;: &quot;A String&quot;, # [Optional] If the qualifier is not a valid BigQuery field identifier i.e. does not match [a-zA-Z][a-zA-Z0-9_]*, a valid identifier must be provided as the column field name and is used as field name in queries.
1552 &quot;onlyReadLatest&quot;: True or False, # [Optional] If this is set, only the latest version of value in this column are exposed. &#x27;onlyReadLatest&#x27; can also be set at the column family level. However, the setting at this level takes precedence if &#x27;onlyReadLatest&#x27; is set at both levels.
1553 &quot;type&quot;: &quot;A String&quot;, # [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 Default type is BYTES. &#x27;type&#x27; can also be set at the column family level. However, the setting at this level takes precedence if &#x27;type&#x27; is set at both levels.
1554 },
1555 ],
1556 &quot;type&quot;: &quot;A String&quot;, # [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 Default type is BYTES. This can be overridden for a specific column by listing that column in &#x27;columns&#x27; and specifying a type for it.
1557 &quot;encoding&quot;: &quot;A String&quot;, # [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. This can be overridden for a specific column by listing that column in &#x27;columns&#x27; and specifying an encoding for it.
1558 &quot;familyId&quot;: &quot;A String&quot;, # Identifier of the column family.
1559 &quot;onlyReadLatest&quot;: True or False, # [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 &#x27;columns&#x27; and specifying a different setting for that column.
1560 },
1561 ],
1562 &quot;ignoreUnspecifiedColumnFamilies&quot;: True or False, # [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.
1563 &quot;readRowkeyAsString&quot;: True or False, # [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.
1564 },
1565 &quot;schema&quot;: { # [Optional] The schema for the data. Schema is required for CSV and JSON formats. Schema is disallowed for Google Cloud Bigtable, Cloud Datastore backups, and Avro formats.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001566 &quot;fields&quot;: [ # Describes the fields in a table.
1567 {
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001568 &quot;description&quot;: &quot;A String&quot;, # [Optional] The field description. The maximum length is 1,024 characters.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001569 &quot;categories&quot;: { # [Optional] The categories attached to this field, used for field-level access control.
1570 &quot;names&quot;: [ # A list of category resource names. For example, &quot;projects/1/taxonomies/2/categories/3&quot;. At most 5 categories are allowed.
1571 &quot;A String&quot;,
1572 ],
1573 },
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07001574 &quot;type&quot;: &quot;A String&quot;, # [Required] The field data type. Possible values include STRING, BYTES, INTEGER, INT64 (same as INTEGER), FLOAT, FLOAT64 (same as FLOAT), BOOLEAN, BOOL (same as BOOLEAN), TIMESTAMP, DATE, TIME, DATETIME, RECORD (where RECORD indicates that the field contains a nested schema) or STRUCT (same as RECORD).
1575 &quot;fields&quot;: [ # [Optional] Describes the nested schema fields if the type property is set to RECORD.
1576 # Object with schema name: TableFieldSchema
1577 ],
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001578 &quot;policyTags&quot;: {
1579 &quot;names&quot;: [ # A list of category resource names. For example, &quot;projects/1/location/eu/taxonomies/2/policyTags/3&quot;. At most 1 policy tag is allowed.
1580 &quot;A String&quot;,
1581 ],
1582 },
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07001583 &quot;mode&quot;: &quot;A String&quot;, # [Optional] The field mode. Possible values include NULLABLE, REQUIRED and REPEATED. The default value is NULLABLE.
1584 &quot;name&quot;: &quot;A String&quot;, # [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 128 characters.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001585 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001586 ],
1587 },
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07001588 &quot;ignoreUnknownValues&quot;: True or False, # [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&#x27;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.
1589 &quot;hivePartitioningOptions&quot;: { # [Optional, Trusted Tester] Options to configure hive partitioning support.
1590 &quot;mode&quot;: &quot;A String&quot;, # [Optional] When set, what mode of hive partitioning to use when reading data. The following modes are supported. (1) AUTO: automatically infer partition key name(s) and type(s). (2) STRINGS: automatically infer partition key name(s). All types are interpreted as strings. (3) 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 types include: AVRO, CSV, JSON, ORC and Parquet.
1591 &quot;sourceUriPrefix&quot;: &quot;A String&quot;, # [Optional] When hive partition detection is requested, a common prefix for all source uris should be supplied. 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-01-01/country=BR/id=7/file.avro gs://bucket/path_to_table/dt=2018-12-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/ (trailing slash does not matter).
1592 &quot;requirePartitionFilter&quot;: True or False, # [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 requirePartitionFilter explicitly set to true will fail.
1593 },
1594 &quot;compression&quot;: &quot;A String&quot;, # [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 and Avro formats.
1595 &quot;maxBadRecords&quot;: 42, # [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. This is only valid for CSV, JSON, and Google Sheets. The default value is 0, which requires that all records are valid. This setting is ignored for Google Cloud Bigtable, Google Cloud Datastore backups and Avro formats.
1596 &quot;googleSheetsOptions&quot;: { # [Optional] Additional options if sourceFormat is set to GOOGLE_SHEETS.
1597 &quot;skipLeadingRows&quot;: &quot;A String&quot;, # [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, 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 &gt; 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.
1598 &quot;range&quot;: &quot;A String&quot;, # [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
1599 },
1600 &quot;sourceUris&quot;: [ # [Required] The fully-qualified URIs that point to your data in Google Cloud. For Google Cloud Storage URIs: Each URI can contain one &#x27;*&#x27; wildcard character and it must come after the &#x27;bucket&#x27; 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 &#x27;*&#x27; wildcard character is not allowed.
1601 &quot;A String&quot;,
1602 ],
1603 &quot;csvOptions&quot;: { # Additional properties to set if sourceFormat is set to CSV.
1604 &quot;quote&quot;: &quot;&quot;&quot;, # [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 (&#x27;&quot;&#x27;). 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.
1605 &quot;skipLeadingRows&quot;: &quot;A String&quot;, # [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 &gt; 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.
1606 &quot;allowQuotedNewlines&quot;: True or False, # [Optional] Indicates if BigQuery should allow quoted data sections that contain newline characters in a CSV file. The default value is false.
1607 &quot;fieldDelimiter&quot;: &quot;A String&quot;, # [Optional] The separator for fields 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. BigQuery also supports the escape sequence &quot;\t&quot; to specify a tab separator. The default value is a comma (&#x27;,&#x27;).
1608 &quot;encoding&quot;: &quot;A String&quot;, # [Optional] The character encoding of the data. The supported values are UTF-8 or ISO-8859-1. 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.
1609 &quot;allowJaggedRows&quot;: True or False, # [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.
1610 },
1611 &quot;autodetect&quot;: True or False, # Try to detect schema and format options automatically. Any option specified explicitly will be honored.
1612 },
1613 &quot;labels&quot;: { # 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.
1614 &quot;a_key&quot;: &quot;A String&quot;,
1615 },
1616 &quot;lastModifiedTime&quot;: &quot;A String&quot;, # [Output-only] The time when this table was last modified, in milliseconds since the epoch.
1617 &quot;schema&quot;: { # [Optional] Describes the schema of this table.
1618 &quot;fields&quot;: [ # Describes the fields in a table.
1619 {
1620 &quot;description&quot;: &quot;A String&quot;, # [Optional] The field description. The maximum length is 1,024 characters.
1621 &quot;categories&quot;: { # [Optional] The categories attached to this field, used for field-level access control.
1622 &quot;names&quot;: [ # A list of category resource names. For example, &quot;projects/1/taxonomies/2/categories/3&quot;. At most 5 categories are allowed.
1623 &quot;A String&quot;,
1624 ],
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001625 },
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07001626 &quot;type&quot;: &quot;A String&quot;, # [Required] The field data type. Possible values include STRING, BYTES, INTEGER, INT64 (same as INTEGER), FLOAT, FLOAT64 (same as FLOAT), BOOLEAN, BOOL (same as BOOLEAN), TIMESTAMP, DATE, TIME, DATETIME, RECORD (where RECORD indicates that the field contains a nested schema) or STRUCT (same as RECORD).
1627 &quot;fields&quot;: [ # [Optional] Describes the nested schema fields if the type property is set to RECORD.
1628 # Object with schema name: TableFieldSchema
1629 ],
1630 &quot;policyTags&quot;: {
1631 &quot;names&quot;: [ # A list of category resource names. For example, &quot;projects/1/location/eu/taxonomies/2/policyTags/3&quot;. At most 1 policy tag is allowed.
1632 &quot;A String&quot;,
1633 ],
1634 },
1635 &quot;mode&quot;: &quot;A String&quot;, # [Optional] The field mode. Possible values include NULLABLE, REQUIRED and REPEATED. The default value is NULLABLE.
1636 &quot;name&quot;: &quot;A String&quot;, # [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 128 characters.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001637 },
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07001638 ],
1639 },
1640 &quot;timePartitioning&quot;: { # Time-based partitioning specification for this table. Only one of timePartitioning and rangePartitioning should be specified.
1641 &quot;field&quot;: &quot;A String&quot;, # [Beta] [Optional] If not set, the table is partitioned by pseudo column, referenced via either &#x27;_PARTITIONTIME&#x27; as TIMESTAMP type, or &#x27;_PARTITIONDATE&#x27; as DATE type. If field is specified, the table is instead partitioned by this field. The field must be a top-level TIMESTAMP or DATE field. Its mode must be NULLABLE or REQUIRED.
1642 &quot;expirationMs&quot;: &quot;A String&quot;, # [Optional] Number of milliseconds for which to keep the storage for partitions in the table. The storage in a partition will have an expiration time of its partition time plus this value.
1643 &quot;requirePartitionFilter&quot;: True or False,
1644 &quot;type&quot;: &quot;A String&quot;, # [Required] The supported types are DAY, HOUR, MONTH, and YEAR, which will generate one partition per day, hour, month, and year, respectively. When the type is not specified, the default behavior is DAY.
1645 },
1646 &quot;kind&quot;: &quot;bigquery#table&quot;, # [Output-only] The type of the resource.
1647 &quot;materializedView&quot;: { # [Optional] Materialized view definition.
1648 &quot;query&quot;: &quot;A String&quot;, # [Required] A query whose result is persisted.
1649 &quot;lastRefreshTime&quot;: &quot;A String&quot;, # [Output-only] [TrustedTester] The time when this materialized view was last modified, in milliseconds since the epoch.
1650 &quot;enableRefresh&quot;: True or False, # [Optional] [TrustedTester] Enable automatic refresh of the materialized view when the base table is updated. The default value is &quot;true&quot;.
1651 &quot;refreshIntervalMs&quot;: &quot;A String&quot;, # [Optional] [TrustedTester] The maximum frequency at which this materialized view will be refreshed. The default value is &quot;1800000&quot; (30 minutes).
1652 },
1653 &quot;streamingBuffer&quot;: { # [Output-only] Contains information regarding this table&#x27;s streaming buffer, if one is present. This field will be absent if the table is not being streamed to or if there is no data in the streaming buffer.
1654 &quot;oldestEntryTime&quot;: &quot;A String&quot;, # [Output-only] Contains the timestamp of the oldest entry in the streaming buffer, in milliseconds since the epoch, if the streaming buffer is available.
1655 &quot;estimatedRows&quot;: &quot;A String&quot;, # [Output-only] A lower-bound estimate of the number of rows currently in the streaming buffer.
1656 &quot;estimatedBytes&quot;: &quot;A String&quot;, # [Output-only] A lower-bound estimate of the number of bytes currently in the streaming buffer.
1657 },
1658 &quot;clustering&quot;: { # [Beta] Clustering specification for the table. Must be specified with partitioning, data in the table will be first partitioned and subsequently clustered.
1659 &quot;fields&quot;: [ # [Repeated] One or more fields on which data should be clustered. Only top-level, non-repeated, simple-type fields are supported. When you cluster a table using multiple columns, the order of columns you specify is important. The order of the specified columns determines the sort order of the data.
1660 &quot;A String&quot;,
1661 ],
1662 },
1663 &quot;rangePartitioning&quot;: { # [TrustedTester] Range partitioning specification for this table. Only one of timePartitioning and rangePartitioning should be specified.
1664 &quot;range&quot;: { # [TrustedTester] [Required] Defines the ranges for range partitioning.
1665 &quot;start&quot;: &quot;A String&quot;, # [TrustedTester] [Required] The start of range partitioning, inclusive.
1666 &quot;interval&quot;: &quot;A String&quot;, # [TrustedTester] [Required] The width of each interval.
1667 &quot;end&quot;: &quot;A String&quot;, # [TrustedTester] [Required] The end of range partitioning, exclusive.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001668 },
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07001669 &quot;field&quot;: &quot;A String&quot;, # [TrustedTester] [Required] The table is partitioned by this field. The field must be a top-level NULLABLE/REQUIRED field. The only supported type is INTEGER/INT64.
1670 },
1671 &quot;numBytes&quot;: &quot;A String&quot;, # [Output-only] The size of this table in bytes, excluding any data in the streaming buffer.
1672}
1673
1674
1675Returns:
1676 An object of the form:
1677
1678 {
1679 &quot;type&quot;: &quot;A String&quot;, # [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. SNAPSHOT: An immutable, read-only table that is a copy of another table. [TrustedTester] MATERIALIZED_VIEW: SQL query whose result is persisted. EXTERNAL: A table that references data stored in an external storage system, such as Google Cloud Storage. The default value is TABLE.
1680 &quot;encryptionConfiguration&quot;: { # Custom encryption configuration (e.g., Cloud KMS keys).
1681 &quot;kmsKeyName&quot;: &quot;A String&quot;, # [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.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001682 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001683 &quot;tableReference&quot;: { # [Required] Reference describing the ID of this table.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001684 &quot;datasetId&quot;: &quot;A String&quot;, # [Required] The ID of the dataset containing this table.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07001685 &quot;projectId&quot;: &quot;A String&quot;, # [Required] The ID of the project containing this table.
1686 &quot;tableId&quot;: &quot;A String&quot;, # [Required] The ID of the table. The ID must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_). The maximum length is 1,024 characters.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001687 },
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07001688 &quot;numLongTermBytes&quot;: &quot;A String&quot;, # [Output-only] The number of bytes in the table that are considered &quot;long-term storage&quot;.
1689 &quot;requirePartitionFilter&quot;: false, # [Optional] If set to true, queries over this table require a partition filter that can be used for partition elimination to be specified.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001690 &quot;etag&quot;: &quot;A String&quot;, # [Output-only] A hash of the table metadata. Used to ensure there were no concurrent modifications to the resource when attempting an update. Not guaranteed to change when the table contents or the fields numRows, numBytes, numLongTermBytes or lastModifiedTime change.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07001691 &quot;expirationTime&quot;: &quot;A String&quot;, # [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.
1692 &quot;location&quot;: &quot;A String&quot;, # [Output-only] The geographic location where the table resides. This value is inherited from the dataset.
1693 &quot;friendlyName&quot;: &quot;A String&quot;, # [Optional] A descriptive name for this table.
1694 &quot;numRows&quot;: &quot;A String&quot;, # [Output-only] The number of rows of data in this table, excluding any data in the streaming buffer.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001695 &quot;model&quot;: { # [Output-only, Beta] Present iff this table represents a ML model. Describes the training information for the model, and it is required to run &#x27;PREDICT&#x27; queries.
1696 &quot;modelOptions&quot;: { # [Output-only, Beta] Model options used for the first training run. These options are immutable for subsequent training runs. Default values are used for any options not specified in the input query.
1697 &quot;lossType&quot;: &quot;A String&quot;,
1698 &quot;labels&quot;: [
1699 &quot;A String&quot;,
1700 ],
1701 &quot;modelType&quot;: &quot;A String&quot;,
1702 },
1703 &quot;trainingRuns&quot;: [ # [Output-only, Beta] Information about ml training runs, each training run comprises of multiple iterations and there may be multiple training runs for the model if warm start is used or if a user decides to continue a previously cancelled query.
Bu Sun Kim65020912020-05-20 12:08:20 -07001704 {
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001705 &quot;state&quot;: &quot;A String&quot;, # [Output-only, Beta] Different state applicable for a training run. IN PROGRESS: Training run is in progress. FAILED: Training run ended due to a non-retryable failure. SUCCEEDED: Training run successfully completed. CANCELLED: Training run cancelled by the user.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07001706 &quot;startTime&quot;: &quot;A String&quot;, # [Output-only, Beta] Training run start time in milliseconds since the epoch.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001707 &quot;iterationResults&quot;: [ # [Output-only, Beta] List of each iteration results.
1708 {
1709 &quot;index&quot;: 42, # [Output-only, Beta] Index of the ML training iteration, starting from zero for each training run.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001710 &quot;learnRate&quot;: 3.14, # [Output-only, Beta] Learning rate used for this iteration, it varies for different training iterations if learn_rate_strategy option is not constant.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07001711 &quot;evalLoss&quot;: 3.14, # [Output-only, Beta] Eval loss computed on the eval data at the end of the iteration. The eval loss is used for early stopping to avoid overfitting. No eval loss if eval_split_method option is specified as no_split or auto_split with input data size less than 500 rows.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001712 &quot;durationMs&quot;: &quot;A String&quot;, # [Output-only, Beta] Time taken to run the training iteration in milliseconds.
1713 &quot;trainingLoss&quot;: 3.14, # [Output-only, Beta] Training loss computed on the training data at the end of the iteration. The training loss function is defined by model type.
1714 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001715 ],
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07001716 &quot;trainingOptions&quot;: { # [Output-only, Beta] Training options used by this training run. These options are mutable for subsequent training runs. Default values are explicitly stored for options not specified in the input query of the first training run. For subsequent training runs, any option not explicitly specified in the input query will be copied from the previous training run.
1717 &quot;lineSearchInitLearnRate&quot;: 3.14,
1718 &quot;maxIteration&quot;: &quot;A String&quot;,
1719 &quot;learnRate&quot;: 3.14,
1720 &quot;l1Reg&quot;: 3.14,
1721 &quot;l2Reg&quot;: 3.14,
1722 &quot;learnRateStrategy&quot;: &quot;A String&quot;,
1723 &quot;earlyStop&quot;: True or False,
1724 &quot;minRelProgress&quot;: 3.14,
1725 &quot;warmStart&quot;: True or False,
1726 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001727 },
1728 ],
1729 },
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07001730 &quot;numPhysicalBytes&quot;: &quot;A String&quot;, # [Output-only] [TrustedTester] The physical size of this table in bytes, excluding any data in the streaming buffer. This includes compression and storage used for time travel.
1731 &quot;creationTime&quot;: &quot;A String&quot;, # [Output-only] The time when this table was created, in milliseconds since the epoch.
1732 &quot;selfLink&quot;: &quot;A String&quot;, # [Output-only] A URL that can be used to access this resource again.
1733 &quot;id&quot;: &quot;A String&quot;, # [Output-only] An opaque ID uniquely identifying the table.
1734 &quot;description&quot;: &quot;A String&quot;, # [Optional] A user-friendly description of this table.
1735 &quot;snapshotDefinition&quot;: { # [Output-only] Snapshot definition.
1736 &quot;baseTableReference&quot;: { # [Required] Reference describing the ID of the table that is snapshotted.
1737 &quot;datasetId&quot;: &quot;A String&quot;, # [Required] The ID of the dataset containing this table.
1738 &quot;projectId&quot;: &quot;A String&quot;, # [Required] The ID of the project containing this table.
1739 &quot;tableId&quot;: &quot;A String&quot;, # [Required] The ID of the table. The ID must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_). The maximum length is 1,024 characters.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001740 },
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07001741 &quot;snapshotTime&quot;: &quot;A String&quot;, # [Required] The time at which the base table was snapshot.
1742 },
1743 &quot;view&quot;: { # [Optional] The view definition.
1744 &quot;useLegacySql&quot;: True or False, # Specifies whether to use BigQuery&#x27;s legacy SQL for this view. The default value is true. If set to false, the view will use BigQuery&#x27;s standard SQL: https://cloud.google.com/bigquery/sql-reference/ Queries and views that reference this view must use the same flag value.
1745 &quot;query&quot;: &quot;A String&quot;, # [Required] A query that BigQuery executes when the view is referenced.
1746 &quot;userDefinedFunctionResources&quot;: [ # Describes user-defined function resources used in the query.
1747 { # This is used for defining User Defined Function (UDF) resources only when using legacy SQL. Users of Standard SQL should leverage either DDL (e.g. CREATE [TEMPORARY] FUNCTION ... ) or the Routines API to define UDF resources. For additional information on migrating, see: https://cloud.google.com/bigquery/docs/reference/standard-sql/migrating-from-legacy-sql#differences_in_user-defined_javascript_functions
1748 &quot;resourceUri&quot;: &quot;A String&quot;, # [Pick one] A code resource to load from a Google Cloud Storage URI (gs://bucket/path).
1749 &quot;inlineCode&quot;: &quot;A String&quot;, # [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.
1750 },
1751 ],
1752 },
1753 &quot;externalDataConfiguration&quot;: { # [Optional] Describes the data format, location, and other properties of a table stored outside of BigQuery. By defining these properties, the data source can then be queried as if it were a standard BigQuery table.
1754 &quot;connectionId&quot;: &quot;A String&quot;, # [Optional, Trusted Tester] Connection for external data source.
1755 &quot;sourceFormat&quot;: &quot;A String&quot;, # [Required] The data format. For CSV files, specify &quot;CSV&quot;. For Google sheets, specify &quot;GOOGLE_SHEETS&quot;. For newline-delimited JSON, specify &quot;NEWLINE_DELIMITED_JSON&quot;. For Avro files, specify &quot;AVRO&quot;. For Google Cloud Datastore backups, specify &quot;DATASTORE_BACKUP&quot;. [Beta] For Google Cloud Bigtable, specify &quot;BIGTABLE&quot;.
1756 &quot;bigtableOptions&quot;: { # [Optional] Additional options if sourceFormat is set to BIGTABLE.
1757 &quot;columnFamilies&quot;: [ # [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 &#x27;type&#x27; 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.
1758 {
1759 &quot;columns&quot;: [ # [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 .Column field.
1760 {
1761 &quot;qualifierString&quot;: &quot;A String&quot;,
1762 &quot;qualifierEncoded&quot;: &quot;A String&quot;, # [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-zA-Z0-9_]*, a valid identifier must be provided as field_name.
1763 &quot;encoding&quot;: &quot;A String&quot;, # [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. &#x27;encoding&#x27; can also be set at the column family level. However, the setting at this level takes precedence if &#x27;encoding&#x27; is set at both levels.
1764 &quot;fieldName&quot;: &quot;A String&quot;, # [Optional] If the qualifier is not a valid BigQuery field identifier i.e. does not match [a-zA-Z][a-zA-Z0-9_]*, a valid identifier must be provided as the column field name and is used as field name in queries.
1765 &quot;onlyReadLatest&quot;: True or False, # [Optional] If this is set, only the latest version of value in this column are exposed. &#x27;onlyReadLatest&#x27; can also be set at the column family level. However, the setting at this level takes precedence if &#x27;onlyReadLatest&#x27; is set at both levels.
1766 &quot;type&quot;: &quot;A String&quot;, # [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 Default type is BYTES. &#x27;type&#x27; can also be set at the column family level. However, the setting at this level takes precedence if &#x27;type&#x27; is set at both levels.
1767 },
1768 ],
1769 &quot;type&quot;: &quot;A String&quot;, # [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 Default type is BYTES. This can be overridden for a specific column by listing that column in &#x27;columns&#x27; and specifying a type for it.
1770 &quot;encoding&quot;: &quot;A String&quot;, # [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. This can be overridden for a specific column by listing that column in &#x27;columns&#x27; and specifying an encoding for it.
1771 &quot;familyId&quot;: &quot;A String&quot;, # Identifier of the column family.
1772 &quot;onlyReadLatest&quot;: True or False, # [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 &#x27;columns&#x27; and specifying a different setting for that column.
1773 },
1774 ],
1775 &quot;ignoreUnspecifiedColumnFamilies&quot;: True or False, # [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.
1776 &quot;readRowkeyAsString&quot;: True or False, # [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.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001777 },
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07001778 &quot;schema&quot;: { # [Optional] The schema for the data. Schema is required for CSV and JSON formats. Schema is disallowed for Google Cloud Bigtable, Cloud Datastore backups, and Avro formats.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001779 &quot;fields&quot;: [ # Describes the fields in a table.
1780 {
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001781 &quot;description&quot;: &quot;A String&quot;, # [Optional] The field description. The maximum length is 1,024 characters.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001782 &quot;categories&quot;: { # [Optional] The categories attached to this field, used for field-level access control.
1783 &quot;names&quot;: [ # A list of category resource names. For example, &quot;projects/1/taxonomies/2/categories/3&quot;. At most 5 categories are allowed.
1784 &quot;A String&quot;,
1785 ],
1786 },
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07001787 &quot;type&quot;: &quot;A String&quot;, # [Required] The field data type. Possible values include STRING, BYTES, INTEGER, INT64 (same as INTEGER), FLOAT, FLOAT64 (same as FLOAT), BOOLEAN, BOOL (same as BOOLEAN), TIMESTAMP, DATE, TIME, DATETIME, RECORD (where RECORD indicates that the field contains a nested schema) or STRUCT (same as RECORD).
1788 &quot;fields&quot;: [ # [Optional] Describes the nested schema fields if the type property is set to RECORD.
1789 # Object with schema name: TableFieldSchema
1790 ],
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001791 &quot;policyTags&quot;: {
1792 &quot;names&quot;: [ # A list of category resource names. For example, &quot;projects/1/location/eu/taxonomies/2/policyTags/3&quot;. At most 1 policy tag is allowed.
1793 &quot;A String&quot;,
1794 ],
1795 },
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07001796 &quot;mode&quot;: &quot;A String&quot;, # [Optional] The field mode. Possible values include NULLABLE, REQUIRED and REPEATED. The default value is NULLABLE.
1797 &quot;name&quot;: &quot;A String&quot;, # [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 128 characters.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001798 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001799 ],
1800 },
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07001801 &quot;ignoreUnknownValues&quot;: True or False, # [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&#x27;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.
1802 &quot;hivePartitioningOptions&quot;: { # [Optional, Trusted Tester] Options to configure hive partitioning support.
1803 &quot;mode&quot;: &quot;A String&quot;, # [Optional] When set, what mode of hive partitioning to use when reading data. The following modes are supported. (1) AUTO: automatically infer partition key name(s) and type(s). (2) STRINGS: automatically infer partition key name(s). All types are interpreted as strings. (3) 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 types include: AVRO, CSV, JSON, ORC and Parquet.
1804 &quot;sourceUriPrefix&quot;: &quot;A String&quot;, # [Optional] When hive partition detection is requested, a common prefix for all source uris should be supplied. 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-01-01/country=BR/id=7/file.avro gs://bucket/path_to_table/dt=2018-12-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/ (trailing slash does not matter).
1805 &quot;requirePartitionFilter&quot;: True or False, # [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 requirePartitionFilter explicitly set to true will fail.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001806 },
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07001807 &quot;compression&quot;: &quot;A String&quot;, # [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 and Avro formats.
1808 &quot;maxBadRecords&quot;: 42, # [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. This is only valid for CSV, JSON, and Google Sheets. The default value is 0, which requires that all records are valid. This setting is ignored for Google Cloud Bigtable, Google Cloud Datastore backups and Avro formats.
1809 &quot;googleSheetsOptions&quot;: { # [Optional] Additional options if sourceFormat is set to GOOGLE_SHEETS.
1810 &quot;skipLeadingRows&quot;: &quot;A String&quot;, # [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, 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 &gt; 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.
1811 &quot;range&quot;: &quot;A String&quot;, # [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
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001812 },
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07001813 &quot;sourceUris&quot;: [ # [Required] The fully-qualified URIs that point to your data in Google Cloud. For Google Cloud Storage URIs: Each URI can contain one &#x27;*&#x27; wildcard character and it must come after the &#x27;bucket&#x27; 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 &#x27;*&#x27; wildcard character is not allowed.
1814 &quot;A String&quot;,
1815 ],
1816 &quot;csvOptions&quot;: { # Additional properties to set if sourceFormat is set to CSV.
1817 &quot;quote&quot;: &quot;&quot;&quot;, # [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 (&#x27;&quot;&#x27;). 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.
1818 &quot;skipLeadingRows&quot;: &quot;A String&quot;, # [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 &gt; 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.
1819 &quot;allowQuotedNewlines&quot;: True or False, # [Optional] Indicates if BigQuery should allow quoted data sections that contain newline characters in a CSV file. The default value is false.
1820 &quot;fieldDelimiter&quot;: &quot;A String&quot;, # [Optional] The separator for fields 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. BigQuery also supports the escape sequence &quot;\t&quot; to specify a tab separator. The default value is a comma (&#x27;,&#x27;).
1821 &quot;encoding&quot;: &quot;A String&quot;, # [Optional] The character encoding of the data. The supported values are UTF-8 or ISO-8859-1. 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.
1822 &quot;allowJaggedRows&quot;: True or False, # [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.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001823 },
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07001824 &quot;autodetect&quot;: True or False, # Try to detect schema and format options automatically. Any option specified explicitly will be honored.
1825 },
1826 &quot;labels&quot;: { # 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.
1827 &quot;a_key&quot;: &quot;A String&quot;,
1828 },
1829 &quot;lastModifiedTime&quot;: &quot;A String&quot;, # [Output-only] The time when this table was last modified, in milliseconds since the epoch.
1830 &quot;schema&quot;: { # [Optional] Describes the schema of this table.
1831 &quot;fields&quot;: [ # Describes the fields in a table.
1832 {
1833 &quot;description&quot;: &quot;A String&quot;, # [Optional] The field description. The maximum length is 1,024 characters.
1834 &quot;categories&quot;: { # [Optional] The categories attached to this field, used for field-level access control.
1835 &quot;names&quot;: [ # A list of category resource names. For example, &quot;projects/1/taxonomies/2/categories/3&quot;. At most 5 categories are allowed.
1836 &quot;A String&quot;,
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001837 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001838 },
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07001839 &quot;type&quot;: &quot;A String&quot;, # [Required] The field data type. Possible values include STRING, BYTES, INTEGER, INT64 (same as INTEGER), FLOAT, FLOAT64 (same as FLOAT), BOOLEAN, BOOL (same as BOOLEAN), TIMESTAMP, DATE, TIME, DATETIME, RECORD (where RECORD indicates that the field contains a nested schema) or STRUCT (same as RECORD).
1840 &quot;fields&quot;: [ # [Optional] Describes the nested schema fields if the type property is set to RECORD.
1841 # Object with schema name: TableFieldSchema
1842 ],
1843 &quot;policyTags&quot;: {
1844 &quot;names&quot;: [ # A list of category resource names. For example, &quot;projects/1/location/eu/taxonomies/2/policyTags/3&quot;. At most 1 policy tag is allowed.
1845 &quot;A String&quot;,
1846 ],
1847 },
1848 &quot;mode&quot;: &quot;A String&quot;, # [Optional] The field mode. Possible values include NULLABLE, REQUIRED and REPEATED. The default value is NULLABLE.
1849 &quot;name&quot;: &quot;A String&quot;, # [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 128 characters.
1850 },
1851 ],
1852 },
1853 &quot;timePartitioning&quot;: { # Time-based partitioning specification for this table. Only one of timePartitioning and rangePartitioning should be specified.
1854 &quot;field&quot;: &quot;A String&quot;, # [Beta] [Optional] If not set, the table is partitioned by pseudo column, referenced via either &#x27;_PARTITIONTIME&#x27; as TIMESTAMP type, or &#x27;_PARTITIONDATE&#x27; as DATE type. If field is specified, the table is instead partitioned by this field. The field must be a top-level TIMESTAMP or DATE field. Its mode must be NULLABLE or REQUIRED.
1855 &quot;expirationMs&quot;: &quot;A String&quot;, # [Optional] Number of milliseconds for which to keep the storage for partitions in the table. The storage in a partition will have an expiration time of its partition time plus this value.
1856 &quot;requirePartitionFilter&quot;: True or False,
1857 &quot;type&quot;: &quot;A String&quot;, # [Required] The supported types are DAY, HOUR, MONTH, and YEAR, which will generate one partition per day, hour, month, and year, respectively. When the type is not specified, the default behavior is DAY.
1858 },
1859 &quot;kind&quot;: &quot;bigquery#table&quot;, # [Output-only] The type of the resource.
1860 &quot;materializedView&quot;: { # [Optional] Materialized view definition.
1861 &quot;query&quot;: &quot;A String&quot;, # [Required] A query whose result is persisted.
1862 &quot;lastRefreshTime&quot;: &quot;A String&quot;, # [Output-only] [TrustedTester] The time when this materialized view was last modified, in milliseconds since the epoch.
1863 &quot;enableRefresh&quot;: True or False, # [Optional] [TrustedTester] Enable automatic refresh of the materialized view when the base table is updated. The default value is &quot;true&quot;.
1864 &quot;refreshIntervalMs&quot;: &quot;A String&quot;, # [Optional] [TrustedTester] The maximum frequency at which this materialized view will be refreshed. The default value is &quot;1800000&quot; (30 minutes).
1865 },
1866 &quot;streamingBuffer&quot;: { # [Output-only] Contains information regarding this table&#x27;s streaming buffer, if one is present. This field will be absent if the table is not being streamed to or if there is no data in the streaming buffer.
1867 &quot;oldestEntryTime&quot;: &quot;A String&quot;, # [Output-only] Contains the timestamp of the oldest entry in the streaming buffer, in milliseconds since the epoch, if the streaming buffer is available.
1868 &quot;estimatedRows&quot;: &quot;A String&quot;, # [Output-only] A lower-bound estimate of the number of rows currently in the streaming buffer.
1869 &quot;estimatedBytes&quot;: &quot;A String&quot;, # [Output-only] A lower-bound estimate of the number of bytes currently in the streaming buffer.
1870 },
1871 &quot;clustering&quot;: { # [Beta] Clustering specification for the table. Must be specified with partitioning, data in the table will be first partitioned and subsequently clustered.
1872 &quot;fields&quot;: [ # [Repeated] One or more fields on which data should be clustered. Only top-level, non-repeated, simple-type fields are supported. When you cluster a table using multiple columns, the order of columns you specify is important. The order of the specified columns determines the sort order of the data.
1873 &quot;A String&quot;,
1874 ],
1875 },
1876 &quot;rangePartitioning&quot;: { # [TrustedTester] Range partitioning specification for this table. Only one of timePartitioning and rangePartitioning should be specified.
1877 &quot;range&quot;: { # [TrustedTester] [Required] Defines the ranges for range partitioning.
1878 &quot;start&quot;: &quot;A String&quot;, # [TrustedTester] [Required] The start of range partitioning, inclusive.
1879 &quot;interval&quot;: &quot;A String&quot;, # [TrustedTester] [Required] The width of each interval.
1880 &quot;end&quot;: &quot;A String&quot;, # [TrustedTester] [Required] The end of range partitioning, exclusive.
Bu Sun Kim65020912020-05-20 12:08:20 -07001881 },
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07001882 &quot;field&quot;: &quot;A String&quot;, # [TrustedTester] [Required] The table is partitioned by this field. The field must be a top-level NULLABLE/REQUIRED field. The only supported type is INTEGER/INT64.
1883 },
1884 &quot;numBytes&quot;: &quot;A String&quot;, # [Output-only] The size of this table in bytes, excluding any data in the streaming buffer.
1885 }</pre>
John Asmuth614db982014-04-24 15:46:26 -04001886</div>
1887
1888</body></html>