blob: 4f7f612b687c0e368ceaee3db5043c6c0e539dc9 [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">
78 <code><a href="#delete">delete(projectId, datasetId, tableId)</a></code></p>
79<p class="firstline">Deletes the table specified by tableId from the dataset. If the table contains data, all the data will be deleted.</p>
80<p class="toc_element">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070081 <code><a href="#get">get(projectId, datasetId, tableId, selectedFields=None)</a></code></p>
John Asmuth614db982014-04-24 15:46:26 -040082<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>
83<p class="toc_element">
Bu Sun Kim65020912020-05-20 12:08:20 -070084 <code><a href="#getIamPolicy">getIamPolicy(resource, body=None)</a></code></p>
85<p class="firstline">Gets the access control policy for a resource.</p>
86<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070087 <code><a href="#insert">insert(projectId, datasetId, body=None)</a></code></p>
John Asmuth614db982014-04-24 15:46:26 -040088<p class="firstline">Creates a new, empty table in the dataset.</p>
89<p class="toc_element">
90 <code><a href="#list">list(projectId, datasetId, pageToken=None, maxResults=None)</a></code></p>
Nathaniel Manista4f877e52015-06-15 16:44:50 +000091<p class="firstline">Lists all tables in the specified dataset. Requires the READER dataset role.</p>
John Asmuth614db982014-04-24 15:46:26 -040092<p class="toc_element">
93 <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p>
94<p class="firstline">Retrieves the next page of results.</p>
95<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070096 <code><a href="#patch">patch(projectId, datasetId, tableId, body=None)</a></code></p>
John Asmuth614db982014-04-24 15:46:26 -040097<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>
98<p class="toc_element">
Bu Sun Kim65020912020-05-20 12:08:20 -070099 <code><a href="#setIamPolicy">setIamPolicy(resource, body=None)</a></code></p>
100<p class="firstline">Sets the access control policy on the specified resource. Replaces any</p>
101<p class="toc_element">
102 <code><a href="#testIamPermissions">testIamPermissions(resource, body=None)</a></code></p>
103<p class="firstline">Returns permissions that a caller has on the specified resource.</p>
104<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700105 <code><a href="#update">update(projectId, datasetId, tableId, body=None)</a></code></p>
John Asmuth614db982014-04-24 15:46:26 -0400106<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>
107<h3>Method Details</h3>
108<div class="method">
109 <code class="details" id="delete">delete(projectId, datasetId, tableId)</code>
110 <pre>Deletes the table specified by tableId from the dataset. If the table contains data, all the data will be deleted.
111
112Args:
113 projectId: string, Project ID of the table to delete (required)
114 datasetId: string, Dataset ID of the table to delete (required)
115 tableId: string, Table ID of the table to delete (required)
116</pre>
117</div>
118
119<div class="method">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700120 <code class="details" id="get">get(projectId, datasetId, tableId, selectedFields=None)</code>
John Asmuth614db982014-04-24 15:46:26 -0400121 <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.
122
123Args:
124 projectId: string, Project ID of the requested table (required)
125 datasetId: string, Dataset ID of the requested table (required)
126 tableId: string, Table ID of the requested table (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700127 selectedFields: string, List of fields to return (comma-separated). If unspecified, all fields are returned
John Asmuth614db982014-04-24 15:46:26 -0400128
129Returns:
130 An object of the form:
131
132 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700133 &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.
134 &quot;googleSheetsOptions&quot;: { # [Optional] Additional options if sourceFormat is set to GOOGLE_SHEETS.
135 &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
136 &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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700137 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700138 &quot;autodetect&quot;: True or False, # Try to detect schema and format options automatically. Any option specified explicitly will be honored.
139 &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.
140 &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;.
141 &quot;csvOptions&quot;: { # Additional properties to set if sourceFormat is set to CSV.
142 &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.
143 &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.
144 &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.
145 &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.
146 &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.
147 &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;).
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700148 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700149 &quot;bigtableOptions&quot;: { # [Optional] Additional options if sourceFormat is set to BIGTABLE.
150 &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.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700151 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700152 &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.
153 &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.
154 &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.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700155 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700156 &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.
157 &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.
158 &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.
159 &quot;qualifierString&quot;: &quot;A String&quot;,
160 &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.
161 &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.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700162 },
163 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700164 &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.
165 &quot;familyId&quot;: &quot;A String&quot;, # Identifier of the column family.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700166 },
167 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700168 &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.
169 &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.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700170 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700171 &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.
172 &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.
173 &quot;fields&quot;: [ # Describes the fields in a table.
Takashi Matsuo06694102015-09-11 13:55:40 -0700174 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700175 &quot;fields&quot;: [ # [Optional] Describes the nested schema fields if the type property is set to RECORD.
Takashi Matsuo06694102015-09-11 13:55:40 -0700176 # Object with schema name: TableFieldSchema
177 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700178 &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.
179 &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).
180 &quot;categories&quot;: { # [Optional] The categories attached to this field, used for field-level access control.
181 &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.
182 &quot;A String&quot;,
Dan O'Mearadd494642020-05-01 07:42:23 -0700183 ],
184 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700185 &quot;mode&quot;: &quot;A String&quot;, # [Optional] The field mode. Possible values include NULLABLE, REQUIRED and REPEATED. The default value is NULLABLE.
186 &quot;description&quot;: &quot;A String&quot;, # [Optional] The field description. The maximum length is 1,024 characters.
187 &quot;policyTags&quot;: {
188 &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.
189 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700190 ],
191 },
Takashi Matsuo06694102015-09-11 13:55:40 -0700192 },
193 ],
194 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700195 &quot;hivePartitioningOptions&quot;: { # [Optional, Trusted Tester] Options to configure hive partitioning support.
196 &quot;sourceUriPrefix&quot;: &quot;A String&quot;, # [Optional, Trusted Tester] 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).
197 &quot;mode&quot;: &quot;A String&quot;, # [Optional, Trusted Tester] When set, what mode of hive partitioning to use when reading data. Two 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. 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.
198 },
199 &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.
200 &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.
201 &quot;A String&quot;,
202 ],
Takashi Matsuo06694102015-09-11 13:55:40 -0700203 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700204 &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.
205 &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.
206 &quot;labels&quot;: [
207 &quot;A String&quot;,
208 ],
209 &quot;lossType&quot;: &quot;A String&quot;,
210 &quot;modelType&quot;: &quot;A String&quot;,
211 },
212 &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.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800213 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700214 &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.
215 &quot;minRelProgress&quot;: 3.14,
216 &quot;l2Reg&quot;: 3.14,
217 &quot;learnRateStrategy&quot;: &quot;A String&quot;,
218 &quot;warmStart&quot;: True or False,
219 &quot;lineSearchInitLearnRate&quot;: 3.14,
220 &quot;earlyStop&quot;: True or False,
221 &quot;l1Reg&quot;: 3.14,
222 &quot;maxIteration&quot;: &quot;A String&quot;,
223 &quot;learnRate&quot;: 3.14,
224 },
225 &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.
226 &quot;iterationResults&quot;: [ # [Output-only, Beta] List of each iteration results.
227 {
228 &quot;durationMs&quot;: &quot;A String&quot;, # [Output-only, Beta] Time taken to run the training iteration in milliseconds.
229 &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.
230 &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.
231 &quot;index&quot;: 42, # [Output-only, Beta] Index of the ML training iteration, starting from zero for each training run.
232 &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.
233 },
234 ],
235 &quot;startTime&quot;: &quot;A String&quot;, # [Output-only, Beta] Training run start time in milliseconds since the epoch.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800236 },
237 ],
238 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700239 &quot;selfLink&quot;: &quot;A String&quot;, # [Output-only] A URL that can be used to access this resource again.
240 &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.
241 &quot;kind&quot;: &quot;bigquery#table&quot;, # [Output-only] The type of the resource.
242 &quot;description&quot;: &quot;A String&quot;, # [Optional] A user-friendly description of this table.
243 &quot;creationTime&quot;: &quot;A String&quot;, # [Output-only] The time when this table was created, in milliseconds since the epoch.
244 &quot;rangePartitioning&quot;: { # [TrustedTester] Range partitioning specification for this table. Only one of timePartitioning and rangePartitioning should be specified.
245 &quot;range&quot;: { # [TrustedTester] [Required] Defines the ranges for range partitioning.
246 &quot;interval&quot;: &quot;A String&quot;, # [TrustedTester] [Required] The width of each interval.
247 &quot;start&quot;: &quot;A String&quot;, # [TrustedTester] [Required] The start of range partitioning, inclusive.
248 &quot;end&quot;: &quot;A String&quot;, # [TrustedTester] [Required] The end of range partitioning, exclusive.
249 },
250 &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.
251 },
252 &quot;schema&quot;: { # [Optional] Describes the schema of this table.
253 &quot;fields&quot;: [ # Describes the fields in a table.
254 {
255 &quot;fields&quot;: [ # [Optional] Describes the nested schema fields if the type property is set to RECORD.
256 # Object with schema name: TableFieldSchema
257 ],
258 &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.
259 &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).
260 &quot;categories&quot;: { # [Optional] The categories attached to this field, used for field-level access control.
261 &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.
262 &quot;A String&quot;,
263 ],
264 },
265 &quot;mode&quot;: &quot;A String&quot;, # [Optional] The field mode. Possible values include NULLABLE, REQUIRED and REPEATED. The default value is NULLABLE.
266 &quot;description&quot;: &quot;A String&quot;, # [Optional] The field description. The maximum length is 1,024 characters.
267 &quot;policyTags&quot;: {
268 &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.
269 &quot;A String&quot;,
270 ],
271 },
272 },
273 ],
274 },
275 &quot;id&quot;: &quot;A String&quot;, # [Output-only] An opaque ID uniquely identifying the table.
276 &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.
277 &quot;materializedView&quot;: { # [Optional] Materialized view definition.
278 &quot;query&quot;: &quot;A String&quot;, # [Required] A query whose result is persisted.
279 &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;.
280 &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).
281 &quot;lastRefreshTime&quot;: &quot;A String&quot;, # [Output-only] [TrustedTester] The time when this materialized view was last modified, in milliseconds since the epoch.
282 },
283 &quot;tableReference&quot;: { # [Required] Reference describing the ID of this table.
284 &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.
285 &quot;projectId&quot;: &quot;A String&quot;, # [Required] The ID of the project containing this table.
286 &quot;datasetId&quot;: &quot;A String&quot;, # [Required] The ID of the dataset containing this table.
287 },
288 &quot;lastModifiedTime&quot;: &quot;A String&quot;, # [Output-only] The time when this table was last modified, in milliseconds since the epoch.
289 &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.
290 &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.
291 &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.
292 &quot;A String&quot;,
293 ],
294 },
295 &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. [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.
296 &quot;view&quot;: { # [Optional] The view definition.
297 &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.
298 &quot;query&quot;: &quot;A String&quot;, # [Required] A query that BigQuery executes when the view is referenced.
299 &quot;userDefinedFunctionResources&quot;: [ # Describes user-defined function resources used in the query.
300 {
301 &quot;resourceUri&quot;: &quot;A String&quot;, # [Pick one] A code resource to load from a Google Cloud Storage URI (gs://bucket/path).
302 &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.
303 },
304 ],
305 },
306 &quot;numLongTermBytes&quot;: &quot;A String&quot;, # [Output-only] The number of bytes in the table that are considered &quot;long-term storage&quot;.
307 &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.
308 &quot;encryptionConfiguration&quot;: { # Custom encryption configuration (e.g., Cloud KMS keys).
309 &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.
310 },
311 &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.
312 &quot;estimatedBytes&quot;: &quot;A String&quot;, # [Output-only] A lower-bound estimate of the number of bytes currently in the streaming buffer.
313 &quot;estimatedRows&quot;: &quot;A String&quot;, # [Output-only] A lower-bound estimate of the number of rows currently in the streaming buffer.
314 &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.
315 },
316 &quot;numBytes&quot;: &quot;A String&quot;, # [Output-only] The size of this table in bytes, excluding any data in the streaming buffer.
317 &quot;location&quot;: &quot;A String&quot;, # [Output-only] The geographic location where the table resides. This value is inherited from the dataset.
318 &quot;friendlyName&quot;: &quot;A String&quot;, # [Optional] A descriptive name for this table.
319 &quot;timePartitioning&quot;: { # Time-based partitioning specification for this table. Only one of timePartitioning and rangePartitioning should be specified.
320 &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.
321 &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.
322 &quot;type&quot;: &quot;A String&quot;, # [Required] The only type supported is DAY, which will generate one partition per day.
323 &quot;requirePartitionFilter&quot;: True or False,
324 },
325 &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.
326 &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.
327 &quot;a_key&quot;: &quot;A String&quot;,
328 },
John Asmuth614db982014-04-24 15:46:26 -0400329 }</pre>
330</div>
331
332<div class="method">
Bu Sun Kim65020912020-05-20 12:08:20 -0700333 <code class="details" id="getIamPolicy">getIamPolicy(resource, body=None)</code>
334 <pre>Gets the access control policy for a resource.
335Returns an empty policy if the resource exists and does not have a policy
336set.
337
338Args:
339 resource: string, REQUIRED: The resource for which the policy is being requested.
340See the operation documentation for the appropriate value for this field. (required)
341 body: object, The request body.
342 The object takes the form of:
343
344{ # Request message for `GetIamPolicy` method.
345 &quot;options&quot;: { # Encapsulates settings provided to GetIamPolicy. # OPTIONAL: A `GetPolicyOptions` object for specifying options to
346 # `GetIamPolicy`.
347 &quot;requestedPolicyVersion&quot;: 42, # Optional. The policy format version to be returned.
348 #
349 # Valid values are 0, 1, and 3. Requests specifying an invalid value will be
350 # rejected.
351 #
352 # Requests for policies with any conditional bindings must specify version 3.
353 # Policies without any conditional bindings may specify any valid value or
354 # leave the field unset.
355 #
356 # To learn which resources support conditions in their IAM policies, see the
357 # [IAM
358 # documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
359 },
360 }
361
362
363Returns:
364 An object of the form:
365
366 { # An Identity and Access Management (IAM) policy, which specifies access
367 # controls for Google Cloud resources.
368 #
369 #
370 # A `Policy` is a collection of `bindings`. A `binding` binds one or more
371 # `members` to a single `role`. Members can be user accounts, service accounts,
372 # Google groups, and domains (such as G Suite). A `role` is a named list of
373 # permissions; each `role` can be an IAM predefined role or a user-created
374 # custom role.
375 #
376 # For some types of Google Cloud resources, a `binding` can also specify a
377 # `condition`, which is a logical expression that allows access to a resource
378 # only if the expression evaluates to `true`. A condition can add constraints
379 # based on attributes of the request, the resource, or both. To learn which
380 # resources support conditions in their IAM policies, see the
381 # [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
382 #
383 # **JSON example:**
384 #
385 # {
386 # &quot;bindings&quot;: [
387 # {
388 # &quot;role&quot;: &quot;roles/resourcemanager.organizationAdmin&quot;,
389 # &quot;members&quot;: [
390 # &quot;user:mike@example.com&quot;,
391 # &quot;group:admins@example.com&quot;,
392 # &quot;domain:google.com&quot;,
393 # &quot;serviceAccount:my-project-id@appspot.gserviceaccount.com&quot;
394 # ]
395 # },
396 # {
397 # &quot;role&quot;: &quot;roles/resourcemanager.organizationViewer&quot;,
398 # &quot;members&quot;: [
399 # &quot;user:eve@example.com&quot;
400 # ],
401 # &quot;condition&quot;: {
402 # &quot;title&quot;: &quot;expirable access&quot;,
403 # &quot;description&quot;: &quot;Does not grant access after Sep 2020&quot;,
404 # &quot;expression&quot;: &quot;request.time &lt; timestamp(&#x27;2020-10-01T00:00:00.000Z&#x27;)&quot;,
405 # }
406 # }
407 # ],
408 # &quot;etag&quot;: &quot;BwWWja0YfJA=&quot;,
409 # &quot;version&quot;: 3
410 # }
411 #
412 # **YAML example:**
413 #
414 # bindings:
415 # - members:
416 # - user:mike@example.com
417 # - group:admins@example.com
418 # - domain:google.com
419 # - serviceAccount:my-project-id@appspot.gserviceaccount.com
420 # role: roles/resourcemanager.organizationAdmin
421 # - members:
422 # - user:eve@example.com
423 # role: roles/resourcemanager.organizationViewer
424 # condition:
425 # title: expirable access
426 # description: Does not grant access after Sep 2020
427 # expression: request.time &lt; timestamp(&#x27;2020-10-01T00:00:00.000Z&#x27;)
428 # - etag: BwWWja0YfJA=
429 # - version: 3
430 #
431 # For a description of IAM and its features, see the
432 # [IAM documentation](https://cloud.google.com/iam/docs/).
433 &quot;bindings&quot;: [ # Associates a list of `members` to a `role`. Optionally, may specify a
434 # `condition` that determines how and when the `bindings` are applied. Each
435 # of the `bindings` must contain at least one member.
436 { # Associates `members` with a `role`.
437 &quot;condition&quot;: { # Represents a textual expression in the Common Expression Language (CEL) # The condition that is associated with this binding.
438 #
439 # If the condition evaluates to `true`, then this binding applies to the
440 # current request.
441 #
442 # If the condition evaluates to `false`, then this binding does not apply to
443 # the current request. However, a different role binding might grant the same
444 # role to one or more of the members in this binding.
445 #
446 # To learn which resources support conditions in their IAM policies, see the
447 # [IAM
448 # documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
449 # syntax. CEL is a C-like expression language. The syntax and semantics of CEL
450 # are documented at https://github.com/google/cel-spec.
451 #
452 # Example (Comparison):
453 #
454 # title: &quot;Summary size limit&quot;
455 # description: &quot;Determines if a summary is less than 100 chars&quot;
456 # expression: &quot;document.summary.size() &lt; 100&quot;
457 #
458 # Example (Equality):
459 #
460 # title: &quot;Requestor is owner&quot;
461 # description: &quot;Determines if requestor is the document owner&quot;
462 # expression: &quot;document.owner == request.auth.claims.email&quot;
463 #
464 # Example (Logic):
465 #
466 # title: &quot;Public documents&quot;
467 # description: &quot;Determine whether the document should be publicly visible&quot;
468 # expression: &quot;document.type != &#x27;private&#x27; &amp;&amp; document.type != &#x27;internal&#x27;&quot;
469 #
470 # Example (Data Manipulation):
471 #
472 # title: &quot;Notification string&quot;
473 # description: &quot;Create a notification string with a timestamp.&quot;
474 # expression: &quot;&#x27;New message received at &#x27; + string(document.create_time)&quot;
475 #
476 # The exact variables and functions that may be referenced within an expression
477 # are determined by the service that evaluates it. See the service
478 # documentation for additional information.
479 &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the expression, i.e. a short string describing
480 # its purpose. This can be used e.g. in UIs which allow to enter the
481 # expression.
482 &quot;location&quot;: &quot;A String&quot;, # Optional. String indicating the location of the expression for error
483 # reporting, e.g. a file name and a position in the file.
484 &quot;description&quot;: &quot;A String&quot;, # Optional. Description of the expression. This is a longer text which
485 # describes the expression, e.g. when hovered over it in a UI.
486 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language
487 # syntax.
488 },
489 &quot;members&quot;: [ # Specifies the identities requesting access for a Cloud Platform resource.
490 # `members` can have the following values:
491 #
492 # * `allUsers`: A special identifier that represents anyone who is
493 # on the internet; with or without a Google account.
494 #
495 # * `allAuthenticatedUsers`: A special identifier that represents anyone
496 # who is authenticated with a Google account or a service account.
497 #
498 # * `user:{emailid}`: An email address that represents a specific Google
499 # account. For example, `alice@example.com` .
500 #
501 #
502 # * `serviceAccount:{emailid}`: An email address that represents a service
503 # account. For example, `my-other-app@appspot.gserviceaccount.com`.
504 #
505 # * `group:{emailid}`: An email address that represents a Google group.
506 # For example, `admins@example.com`.
507 #
508 # * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique
509 # identifier) representing a user that has been recently deleted. For
510 # example, `alice@example.com?uid=123456789012345678901`. If the user is
511 # recovered, this value reverts to `user:{emailid}` and the recovered user
512 # retains the role in the binding.
513 #
514 # * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus
515 # unique identifier) representing a service account that has been recently
516 # deleted. For example,
517 # `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`.
518 # If the service account is undeleted, this value reverts to
519 # `serviceAccount:{emailid}` and the undeleted service account retains the
520 # role in the binding.
521 #
522 # * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique
523 # identifier) representing a Google group that has been recently
524 # deleted. For example, `admins@example.com?uid=123456789012345678901`. If
525 # the group is recovered, this value reverts to `group:{emailid}` and the
526 # recovered group retains the role in the binding.
527 #
528 #
529 # * `domain:{domain}`: The G Suite domain (primary) that represents all the
530 # users of that domain. For example, `google.com` or `example.com`.
531 #
532 &quot;A String&quot;,
533 ],
534 &quot;role&quot;: &quot;A String&quot;, # Role that is assigned to `members`.
535 # For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
536 },
537 ],
538 &quot;etag&quot;: &quot;A String&quot;, # `etag` is used for optimistic concurrency control as a way to help
539 # prevent simultaneous updates of a policy from overwriting each other.
540 # It is strongly suggested that systems make use of the `etag` in the
541 # read-modify-write cycle to perform policy updates in order to avoid race
542 # conditions: An `etag` is returned in the response to `getIamPolicy`, and
543 # systems are expected to put that etag in the request to `setIamPolicy` to
544 # ensure that their change will be applied to the same version of the policy.
545 #
546 # **Important:** If you use IAM Conditions, you must include the `etag` field
547 # whenever you call `setIamPolicy`. If you omit this field, then IAM allows
548 # you to overwrite a version `3` policy with a version `1` policy, and all of
549 # the conditions in the version `3` policy are lost.
550 &quot;version&quot;: 42, # Specifies the format of the policy.
551 #
552 # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value
553 # are rejected.
554 #
555 # Any operation that affects conditional role bindings must specify version
556 # `3`. This requirement applies to the following operations:
557 #
558 # * Getting a policy that includes a conditional role binding
559 # * Adding a conditional role binding to a policy
560 # * Changing a conditional role binding in a policy
561 # * Removing any role binding, with or without a condition, from a policy
562 # that includes conditions
563 #
564 # **Important:** If you use IAM Conditions, you must include the `etag` field
565 # whenever you call `setIamPolicy`. If you omit this field, then IAM allows
566 # you to overwrite a version `3` policy with a version `1` policy, and all of
567 # the conditions in the version `3` policy are lost.
568 #
569 # If a policy does not include any conditions, operations on that policy may
570 # specify any valid version or leave the field unset.
571 #
572 # To learn which resources support conditions in their IAM policies, see the
573 # [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
574 &quot;auditConfigs&quot;: [ # Specifies cloud audit logging configuration for this policy.
575 { # Specifies the audit configuration for a service.
576 # The configuration determines which permission types are logged, and what
577 # identities, if any, are exempted from logging.
578 # An AuditConfig must have one or more AuditLogConfigs.
579 #
580 # If there are AuditConfigs for both `allServices` and a specific service,
581 # the union of the two AuditConfigs is used for that service: the log_types
582 # specified in each AuditConfig are enabled, and the exempted_members in each
583 # AuditLogConfig are exempted.
584 #
585 # Example Policy with multiple AuditConfigs:
586 #
587 # {
588 # &quot;audit_configs&quot;: [
589 # {
590 # &quot;service&quot;: &quot;allServices&quot;
591 # &quot;audit_log_configs&quot;: [
592 # {
593 # &quot;log_type&quot;: &quot;DATA_READ&quot;,
594 # &quot;exempted_members&quot;: [
595 # &quot;user:jose@example.com&quot;
596 # ]
597 # },
598 # {
599 # &quot;log_type&quot;: &quot;DATA_WRITE&quot;,
600 # },
601 # {
602 # &quot;log_type&quot;: &quot;ADMIN_READ&quot;,
603 # }
604 # ]
605 # },
606 # {
607 # &quot;service&quot;: &quot;sampleservice.googleapis.com&quot;
608 # &quot;audit_log_configs&quot;: [
609 # {
610 # &quot;log_type&quot;: &quot;DATA_READ&quot;,
611 # },
612 # {
613 # &quot;log_type&quot;: &quot;DATA_WRITE&quot;,
614 # &quot;exempted_members&quot;: [
615 # &quot;user:aliya@example.com&quot;
616 # ]
617 # }
618 # ]
619 # }
620 # ]
621 # }
622 #
623 # For sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ
624 # logging. It also exempts jose@example.com from DATA_READ logging, and
625 # aliya@example.com from DATA_WRITE logging.
626 &quot;auditLogConfigs&quot;: [ # The configuration for logging of each type of permission.
627 { # Provides the configuration for logging a type of permissions.
628 # Example:
629 #
630 # {
631 # &quot;audit_log_configs&quot;: [
632 # {
633 # &quot;log_type&quot;: &quot;DATA_READ&quot;,
634 # &quot;exempted_members&quot;: [
635 # &quot;user:jose@example.com&quot;
636 # ]
637 # },
638 # {
639 # &quot;log_type&quot;: &quot;DATA_WRITE&quot;,
640 # }
641 # ]
642 # }
643 #
644 # This enables &#x27;DATA_READ&#x27; and &#x27;DATA_WRITE&#x27; logging, while exempting
645 # jose@example.com from DATA_READ logging.
646 &quot;exemptedMembers&quot;: [ # Specifies the identities that do not cause logging for this type of
647 # permission.
648 # Follows the same format of Binding.members.
649 &quot;A String&quot;,
650 ],
651 &quot;logType&quot;: &quot;A String&quot;, # The log type that this config enables.
652 },
653 ],
654 &quot;service&quot;: &quot;A String&quot;, # Specifies a service that will be enabled for audit logging.
655 # For example, `storage.googleapis.com`, `cloudsql.googleapis.com`.
656 # `allServices` is a special value that covers all services.
657 },
658 ],
659 }</pre>
660</div>
661
662<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700663 <code class="details" id="insert">insert(projectId, datasetId, body=None)</code>
John Asmuth614db982014-04-24 15:46:26 -0400664 <pre>Creates a new, empty table in the dataset.
665
666Args:
667 projectId: string, Project ID of the new table (required)
668 datasetId: string, Dataset ID of the new table (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700669 body: object, The request body.
John Asmuth614db982014-04-24 15:46:26 -0400670 The object takes the form of:
671
672{
Bu Sun Kim65020912020-05-20 12:08:20 -0700673 &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.
674 &quot;googleSheetsOptions&quot;: { # [Optional] Additional options if sourceFormat is set to GOOGLE_SHEETS.
675 &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
676 &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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700677 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700678 &quot;autodetect&quot;: True or False, # Try to detect schema and format options automatically. Any option specified explicitly will be honored.
679 &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.
680 &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;.
681 &quot;csvOptions&quot;: { # Additional properties to set if sourceFormat is set to CSV.
682 &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.
683 &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.
684 &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.
685 &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.
686 &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.
687 &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;).
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700688 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700689 &quot;bigtableOptions&quot;: { # [Optional] Additional options if sourceFormat is set to BIGTABLE.
690 &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.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700691 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700692 &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.
693 &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.
694 &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.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700695 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700696 &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.
697 &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.
698 &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.
699 &quot;qualifierString&quot;: &quot;A String&quot;,
700 &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.
701 &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.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700702 },
703 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700704 &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.
705 &quot;familyId&quot;: &quot;A String&quot;, # Identifier of the column family.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700706 },
707 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700708 &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.
709 &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.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700710 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700711 &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.
712 &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.
713 &quot;fields&quot;: [ # Describes the fields in a table.
Takashi Matsuo06694102015-09-11 13:55:40 -0700714 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700715 &quot;fields&quot;: [ # [Optional] Describes the nested schema fields if the type property is set to RECORD.
Takashi Matsuo06694102015-09-11 13:55:40 -0700716 # Object with schema name: TableFieldSchema
717 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700718 &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.
719 &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).
720 &quot;categories&quot;: { # [Optional] The categories attached to this field, used for field-level access control.
721 &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.
722 &quot;A String&quot;,
Dan O'Mearadd494642020-05-01 07:42:23 -0700723 ],
724 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700725 &quot;mode&quot;: &quot;A String&quot;, # [Optional] The field mode. Possible values include NULLABLE, REQUIRED and REPEATED. The default value is NULLABLE.
726 &quot;description&quot;: &quot;A String&quot;, # [Optional] The field description. The maximum length is 1,024 characters.
727 &quot;policyTags&quot;: {
728 &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.
729 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700730 ],
731 },
Takashi Matsuo06694102015-09-11 13:55:40 -0700732 },
733 ],
734 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700735 &quot;hivePartitioningOptions&quot;: { # [Optional, Trusted Tester] Options to configure hive partitioning support.
736 &quot;sourceUriPrefix&quot;: &quot;A String&quot;, # [Optional, Trusted Tester] 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).
737 &quot;mode&quot;: &quot;A String&quot;, # [Optional, Trusted Tester] When set, what mode of hive partitioning to use when reading data. Two 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. 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.
738 },
739 &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.
740 &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.
741 &quot;A String&quot;,
742 ],
Takashi Matsuo06694102015-09-11 13:55:40 -0700743 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700744 &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.
745 &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.
746 &quot;labels&quot;: [
747 &quot;A String&quot;,
748 ],
749 &quot;lossType&quot;: &quot;A String&quot;,
750 &quot;modelType&quot;: &quot;A String&quot;,
751 },
752 &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.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800753 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700754 &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.
755 &quot;minRelProgress&quot;: 3.14,
756 &quot;l2Reg&quot;: 3.14,
757 &quot;learnRateStrategy&quot;: &quot;A String&quot;,
758 &quot;warmStart&quot;: True or False,
759 &quot;lineSearchInitLearnRate&quot;: 3.14,
760 &quot;earlyStop&quot;: True or False,
761 &quot;l1Reg&quot;: 3.14,
762 &quot;maxIteration&quot;: &quot;A String&quot;,
763 &quot;learnRate&quot;: 3.14,
764 },
765 &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.
766 &quot;iterationResults&quot;: [ # [Output-only, Beta] List of each iteration results.
767 {
768 &quot;durationMs&quot;: &quot;A String&quot;, # [Output-only, Beta] Time taken to run the training iteration in milliseconds.
769 &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.
770 &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.
771 &quot;index&quot;: 42, # [Output-only, Beta] Index of the ML training iteration, starting from zero for each training run.
772 &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.
773 },
774 ],
775 &quot;startTime&quot;: &quot;A String&quot;, # [Output-only, Beta] Training run start time in milliseconds since the epoch.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800776 },
777 ],
778 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700779 &quot;selfLink&quot;: &quot;A String&quot;, # [Output-only] A URL that can be used to access this resource again.
780 &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.
781 &quot;kind&quot;: &quot;bigquery#table&quot;, # [Output-only] The type of the resource.
782 &quot;description&quot;: &quot;A String&quot;, # [Optional] A user-friendly description of this table.
783 &quot;creationTime&quot;: &quot;A String&quot;, # [Output-only] The time when this table was created, in milliseconds since the epoch.
784 &quot;rangePartitioning&quot;: { # [TrustedTester] Range partitioning specification for this table. Only one of timePartitioning and rangePartitioning should be specified.
785 &quot;range&quot;: { # [TrustedTester] [Required] Defines the ranges for range partitioning.
786 &quot;interval&quot;: &quot;A String&quot;, # [TrustedTester] [Required] The width of each interval.
787 &quot;start&quot;: &quot;A String&quot;, # [TrustedTester] [Required] The start of range partitioning, inclusive.
788 &quot;end&quot;: &quot;A String&quot;, # [TrustedTester] [Required] The end of range partitioning, exclusive.
789 },
790 &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.
791 },
792 &quot;schema&quot;: { # [Optional] Describes the schema of this table.
793 &quot;fields&quot;: [ # Describes the fields in a table.
794 {
795 &quot;fields&quot;: [ # [Optional] Describes the nested schema fields if the type property is set to RECORD.
796 # Object with schema name: TableFieldSchema
797 ],
798 &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.
799 &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).
800 &quot;categories&quot;: { # [Optional] The categories attached to this field, used for field-level access control.
801 &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.
802 &quot;A String&quot;,
803 ],
804 },
805 &quot;mode&quot;: &quot;A String&quot;, # [Optional] The field mode. Possible values include NULLABLE, REQUIRED and REPEATED. The default value is NULLABLE.
806 &quot;description&quot;: &quot;A String&quot;, # [Optional] The field description. The maximum length is 1,024 characters.
807 &quot;policyTags&quot;: {
808 &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.
809 &quot;A String&quot;,
810 ],
811 },
812 },
813 ],
814 },
815 &quot;id&quot;: &quot;A String&quot;, # [Output-only] An opaque ID uniquely identifying the table.
816 &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.
817 &quot;materializedView&quot;: { # [Optional] Materialized view definition.
818 &quot;query&quot;: &quot;A String&quot;, # [Required] A query whose result is persisted.
819 &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;.
820 &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).
821 &quot;lastRefreshTime&quot;: &quot;A String&quot;, # [Output-only] [TrustedTester] The time when this materialized view was last modified, in milliseconds since the epoch.
822 },
823 &quot;tableReference&quot;: { # [Required] Reference describing the ID of this table.
824 &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.
825 &quot;projectId&quot;: &quot;A String&quot;, # [Required] The ID of the project containing this table.
826 &quot;datasetId&quot;: &quot;A String&quot;, # [Required] The ID of the dataset containing this table.
827 },
828 &quot;lastModifiedTime&quot;: &quot;A String&quot;, # [Output-only] The time when this table was last modified, in milliseconds since the epoch.
829 &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.
830 &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.
831 &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.
832 &quot;A String&quot;,
833 ],
834 },
835 &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. [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.
836 &quot;view&quot;: { # [Optional] The view definition.
837 &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.
838 &quot;query&quot;: &quot;A String&quot;, # [Required] A query that BigQuery executes when the view is referenced.
839 &quot;userDefinedFunctionResources&quot;: [ # Describes user-defined function resources used in the query.
840 {
841 &quot;resourceUri&quot;: &quot;A String&quot;, # [Pick one] A code resource to load from a Google Cloud Storage URI (gs://bucket/path).
842 &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.
843 },
844 ],
845 },
846 &quot;numLongTermBytes&quot;: &quot;A String&quot;, # [Output-only] The number of bytes in the table that are considered &quot;long-term storage&quot;.
847 &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.
848 &quot;encryptionConfiguration&quot;: { # Custom encryption configuration (e.g., Cloud KMS keys).
849 &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.
850 },
851 &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.
852 &quot;estimatedBytes&quot;: &quot;A String&quot;, # [Output-only] A lower-bound estimate of the number of bytes currently in the streaming buffer.
853 &quot;estimatedRows&quot;: &quot;A String&quot;, # [Output-only] A lower-bound estimate of the number of rows currently in the streaming buffer.
854 &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.
855 },
856 &quot;numBytes&quot;: &quot;A String&quot;, # [Output-only] The size of this table in bytes, excluding any data in the streaming buffer.
857 &quot;location&quot;: &quot;A String&quot;, # [Output-only] The geographic location where the table resides. This value is inherited from the dataset.
858 &quot;friendlyName&quot;: &quot;A String&quot;, # [Optional] A descriptive name for this table.
859 &quot;timePartitioning&quot;: { # Time-based partitioning specification for this table. Only one of timePartitioning and rangePartitioning should be specified.
860 &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.
861 &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.
862 &quot;type&quot;: &quot;A String&quot;, # [Required] The only type supported is DAY, which will generate one partition per day.
863 &quot;requirePartitionFilter&quot;: True or False,
864 },
865 &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.
866 &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.
867 &quot;a_key&quot;: &quot;A String&quot;,
868 },
John Asmuth614db982014-04-24 15:46:26 -0400869 }
870
871
872Returns:
873 An object of the form:
874
875 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700876 &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.
877 &quot;googleSheetsOptions&quot;: { # [Optional] Additional options if sourceFormat is set to GOOGLE_SHEETS.
878 &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
879 &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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700880 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700881 &quot;autodetect&quot;: True or False, # Try to detect schema and format options automatically. Any option specified explicitly will be honored.
882 &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.
883 &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;.
884 &quot;csvOptions&quot;: { # Additional properties to set if sourceFormat is set to CSV.
885 &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.
886 &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.
887 &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.
888 &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.
889 &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.
890 &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;).
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700891 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700892 &quot;bigtableOptions&quot;: { # [Optional] Additional options if sourceFormat is set to BIGTABLE.
893 &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.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700894 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700895 &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.
896 &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.
897 &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.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700898 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700899 &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.
900 &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.
901 &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.
902 &quot;qualifierString&quot;: &quot;A String&quot;,
903 &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.
904 &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.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700905 },
906 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700907 &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.
908 &quot;familyId&quot;: &quot;A String&quot;, # Identifier of the column family.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700909 },
910 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700911 &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.
912 &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.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700913 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700914 &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.
915 &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.
916 &quot;fields&quot;: [ # Describes the fields in a table.
Takashi Matsuo06694102015-09-11 13:55:40 -0700917 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700918 &quot;fields&quot;: [ # [Optional] Describes the nested schema fields if the type property is set to RECORD.
Takashi Matsuo06694102015-09-11 13:55:40 -0700919 # Object with schema name: TableFieldSchema
920 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700921 &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.
922 &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).
923 &quot;categories&quot;: { # [Optional] The categories attached to this field, used for field-level access control.
924 &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.
925 &quot;A String&quot;,
Dan O'Mearadd494642020-05-01 07:42:23 -0700926 ],
927 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700928 &quot;mode&quot;: &quot;A String&quot;, # [Optional] The field mode. Possible values include NULLABLE, REQUIRED and REPEATED. The default value is NULLABLE.
929 &quot;description&quot;: &quot;A String&quot;, # [Optional] The field description. The maximum length is 1,024 characters.
930 &quot;policyTags&quot;: {
931 &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.
932 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700933 ],
934 },
Takashi Matsuo06694102015-09-11 13:55:40 -0700935 },
936 ],
937 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700938 &quot;hivePartitioningOptions&quot;: { # [Optional, Trusted Tester] Options to configure hive partitioning support.
939 &quot;sourceUriPrefix&quot;: &quot;A String&quot;, # [Optional, Trusted Tester] 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).
940 &quot;mode&quot;: &quot;A String&quot;, # [Optional, Trusted Tester] When set, what mode of hive partitioning to use when reading data. Two 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. 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.
941 },
942 &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.
943 &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.
944 &quot;A String&quot;,
945 ],
Takashi Matsuo06694102015-09-11 13:55:40 -0700946 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700947 &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.
948 &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.
949 &quot;labels&quot;: [
950 &quot;A String&quot;,
951 ],
952 &quot;lossType&quot;: &quot;A String&quot;,
953 &quot;modelType&quot;: &quot;A String&quot;,
954 },
955 &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.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800956 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700957 &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.
958 &quot;minRelProgress&quot;: 3.14,
959 &quot;l2Reg&quot;: 3.14,
960 &quot;learnRateStrategy&quot;: &quot;A String&quot;,
961 &quot;warmStart&quot;: True or False,
962 &quot;lineSearchInitLearnRate&quot;: 3.14,
963 &quot;earlyStop&quot;: True or False,
964 &quot;l1Reg&quot;: 3.14,
965 &quot;maxIteration&quot;: &quot;A String&quot;,
966 &quot;learnRate&quot;: 3.14,
967 },
968 &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.
969 &quot;iterationResults&quot;: [ # [Output-only, Beta] List of each iteration results.
970 {
971 &quot;durationMs&quot;: &quot;A String&quot;, # [Output-only, Beta] Time taken to run the training iteration in milliseconds.
972 &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.
973 &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.
974 &quot;index&quot;: 42, # [Output-only, Beta] Index of the ML training iteration, starting from zero for each training run.
975 &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.
976 },
977 ],
978 &quot;startTime&quot;: &quot;A String&quot;, # [Output-only, Beta] Training run start time in milliseconds since the epoch.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800979 },
980 ],
981 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700982 &quot;selfLink&quot;: &quot;A String&quot;, # [Output-only] A URL that can be used to access this resource again.
983 &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.
984 &quot;kind&quot;: &quot;bigquery#table&quot;, # [Output-only] The type of the resource.
985 &quot;description&quot;: &quot;A String&quot;, # [Optional] A user-friendly description of this table.
986 &quot;creationTime&quot;: &quot;A String&quot;, # [Output-only] The time when this table was created, in milliseconds since the epoch.
987 &quot;rangePartitioning&quot;: { # [TrustedTester] Range partitioning specification for this table. Only one of timePartitioning and rangePartitioning should be specified.
988 &quot;range&quot;: { # [TrustedTester] [Required] Defines the ranges for range partitioning.
989 &quot;interval&quot;: &quot;A String&quot;, # [TrustedTester] [Required] The width of each interval.
990 &quot;start&quot;: &quot;A String&quot;, # [TrustedTester] [Required] The start of range partitioning, inclusive.
991 &quot;end&quot;: &quot;A String&quot;, # [TrustedTester] [Required] The end of range partitioning, exclusive.
992 },
993 &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.
994 },
995 &quot;schema&quot;: { # [Optional] Describes the schema of this table.
996 &quot;fields&quot;: [ # Describes the fields in a table.
997 {
998 &quot;fields&quot;: [ # [Optional] Describes the nested schema fields if the type property is set to RECORD.
999 # Object with schema name: TableFieldSchema
1000 ],
1001 &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.
1002 &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).
1003 &quot;categories&quot;: { # [Optional] The categories attached to this field, used for field-level access control.
1004 &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.
1005 &quot;A String&quot;,
1006 ],
1007 },
1008 &quot;mode&quot;: &quot;A String&quot;, # [Optional] The field mode. Possible values include NULLABLE, REQUIRED and REPEATED. The default value is NULLABLE.
1009 &quot;description&quot;: &quot;A String&quot;, # [Optional] The field description. The maximum length is 1,024 characters.
1010 &quot;policyTags&quot;: {
1011 &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.
1012 &quot;A String&quot;,
1013 ],
1014 },
1015 },
1016 ],
1017 },
1018 &quot;id&quot;: &quot;A String&quot;, # [Output-only] An opaque ID uniquely identifying the table.
1019 &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.
1020 &quot;materializedView&quot;: { # [Optional] Materialized view definition.
1021 &quot;query&quot;: &quot;A String&quot;, # [Required] A query whose result is persisted.
1022 &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;.
1023 &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).
1024 &quot;lastRefreshTime&quot;: &quot;A String&quot;, # [Output-only] [TrustedTester] The time when this materialized view was last modified, in milliseconds since the epoch.
1025 },
1026 &quot;tableReference&quot;: { # [Required] Reference describing the ID of this table.
1027 &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.
1028 &quot;projectId&quot;: &quot;A String&quot;, # [Required] The ID of the project containing this table.
1029 &quot;datasetId&quot;: &quot;A String&quot;, # [Required] The ID of the dataset containing this table.
1030 },
1031 &quot;lastModifiedTime&quot;: &quot;A String&quot;, # [Output-only] The time when this table was last modified, in milliseconds since the epoch.
1032 &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.
1033 &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.
1034 &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.
1035 &quot;A String&quot;,
1036 ],
1037 },
1038 &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. [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.
1039 &quot;view&quot;: { # [Optional] The view definition.
1040 &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.
1041 &quot;query&quot;: &quot;A String&quot;, # [Required] A query that BigQuery executes when the view is referenced.
1042 &quot;userDefinedFunctionResources&quot;: [ # Describes user-defined function resources used in the query.
1043 {
1044 &quot;resourceUri&quot;: &quot;A String&quot;, # [Pick one] A code resource to load from a Google Cloud Storage URI (gs://bucket/path).
1045 &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.
1046 },
1047 ],
1048 },
1049 &quot;numLongTermBytes&quot;: &quot;A String&quot;, # [Output-only] The number of bytes in the table that are considered &quot;long-term storage&quot;.
1050 &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.
1051 &quot;encryptionConfiguration&quot;: { # Custom encryption configuration (e.g., Cloud KMS keys).
1052 &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.
1053 },
1054 &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.
1055 &quot;estimatedBytes&quot;: &quot;A String&quot;, # [Output-only] A lower-bound estimate of the number of bytes currently in the streaming buffer.
1056 &quot;estimatedRows&quot;: &quot;A String&quot;, # [Output-only] A lower-bound estimate of the number of rows currently in the streaming buffer.
1057 &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.
1058 },
1059 &quot;numBytes&quot;: &quot;A String&quot;, # [Output-only] The size of this table in bytes, excluding any data in the streaming buffer.
1060 &quot;location&quot;: &quot;A String&quot;, # [Output-only] The geographic location where the table resides. This value is inherited from the dataset.
1061 &quot;friendlyName&quot;: &quot;A String&quot;, # [Optional] A descriptive name for this table.
1062 &quot;timePartitioning&quot;: { # Time-based partitioning specification for this table. Only one of timePartitioning and rangePartitioning should be specified.
1063 &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.
1064 &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.
1065 &quot;type&quot;: &quot;A String&quot;, # [Required] The only type supported is DAY, which will generate one partition per day.
1066 &quot;requirePartitionFilter&quot;: True or False,
1067 },
1068 &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.
1069 &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.
1070 &quot;a_key&quot;: &quot;A String&quot;,
1071 },
John Asmuth614db982014-04-24 15:46:26 -04001072 }</pre>
1073</div>
1074
1075<div class="method">
1076 <code class="details" id="list">list(projectId, datasetId, pageToken=None, maxResults=None)</code>
Nathaniel Manista4f877e52015-06-15 16:44:50 +00001077 <pre>Lists all tables in the specified dataset. Requires the READER dataset role.
John Asmuth614db982014-04-24 15:46:26 -04001078
1079Args:
1080 projectId: string, Project ID of the tables to list (required)
1081 datasetId: string, Dataset ID of the tables to list (required)
1082 pageToken: string, Page token, returned by a previous call, to request the next page of results
1083 maxResults: integer, Maximum number of results to return
1084
1085Returns:
1086 An object of the form:
1087
1088 {
Bu Sun Kim65020912020-05-20 12:08:20 -07001089 &quot;nextPageToken&quot;: &quot;A String&quot;, # A token to request the next page of results.
1090 &quot;totalItems&quot;: 42, # The total number of tables in the dataset.
1091 &quot;kind&quot;: &quot;bigquery#tableList&quot;, # The type of list.
1092 &quot;tables&quot;: [ # Tables in the requested dataset.
John Asmuth614db982014-04-24 15:46:26 -04001093 {
Bu Sun Kim65020912020-05-20 12:08:20 -07001094 &quot;type&quot;: &quot;A String&quot;, # The type of table. Possible values are: TABLE, VIEW.
1095 &quot;clustering&quot;: { # [Beta] Clustering specification for this table, if configured.
1096 &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.
1097 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001098 ],
1099 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001100 &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.
1101 &quot;kind&quot;: &quot;bigquery#table&quot;, # The resource type.
1102 &quot;view&quot;: { # Additional details for a view.
1103 &quot;useLegacySql&quot;: True or False, # True if view is defined in legacy SQL dialect, false if in standard SQL.
1104 },
1105 &quot;creationTime&quot;: &quot;A String&quot;, # The time when this table was created, in milliseconds since the epoch.
1106 &quot;rangePartitioning&quot;: { # The range partitioning specification for this table, if configured.
1107 &quot;range&quot;: { # [TrustedTester] [Required] Defines the ranges for range partitioning.
1108 &quot;interval&quot;: &quot;A String&quot;, # [TrustedTester] [Required] The width of each interval.
1109 &quot;start&quot;: &quot;A String&quot;, # [TrustedTester] [Required] The start of range partitioning, inclusive.
1110 &quot;end&quot;: &quot;A String&quot;, # [TrustedTester] [Required] The end of range partitioning, exclusive.
Dan O'Mearadd494642020-05-01 07:42:23 -07001111 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001112 &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 -07001113 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001114 &quot;id&quot;: &quot;A String&quot;, # An opaque ID of the table
1115 &quot;tableReference&quot;: { # A reference uniquely identifying the table.
1116 &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.
1117 &quot;projectId&quot;: &quot;A String&quot;, # [Required] The ID of the project containing this table.
1118 &quot;datasetId&quot;: &quot;A String&quot;, # [Required] The ID of the dataset containing this table.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001119 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001120 &quot;friendlyName&quot;: &quot;A String&quot;, # The user-friendly name for this table.
1121 &quot;timePartitioning&quot;: { # The time-based partitioning specification for this table, if configured.
1122 &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.
1123 &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.
1124 &quot;type&quot;: &quot;A String&quot;, # [Required] The only type supported is DAY, which will generate one partition per day.
1125 &quot;requirePartitionFilter&quot;: True or False,
John Asmuth614db982014-04-24 15:46:26 -04001126 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001127 &quot;labels&quot;: { # The labels associated with this table. You can use these to organize and group your tables.
1128 &quot;a_key&quot;: &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001129 },
John Asmuth614db982014-04-24 15:46:26 -04001130 },
1131 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001132 &quot;etag&quot;: &quot;A String&quot;, # A hash of this page of results.
John Asmuth614db982014-04-24 15:46:26 -04001133 }</pre>
1134</div>
1135
1136<div class="method">
1137 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
1138 <pre>Retrieves the next page of results.
1139
1140Args:
1141 previous_request: The request for the previous page. (required)
1142 previous_response: The response from the request for the previous page. (required)
1143
1144Returns:
Bu Sun Kim65020912020-05-20 12:08:20 -07001145 A request object that you can call &#x27;execute()&#x27; on to request the next
John Asmuth614db982014-04-24 15:46:26 -04001146 page. Returns None if there are no more items in the collection.
1147 </pre>
1148</div>
1149
1150<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07001151 <code class="details" id="patch">patch(projectId, datasetId, tableId, body=None)</code>
John Asmuth614db982014-04-24 15:46:26 -04001152 <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.
1153
1154Args:
1155 projectId: string, Project ID of the table to update (required)
1156 datasetId: string, Dataset ID of the table to update (required)
1157 tableId: string, Table ID of the table to update (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07001158 body: object, The request body.
John Asmuth614db982014-04-24 15:46:26 -04001159 The object takes the form of:
1160
1161{
Bu Sun Kim65020912020-05-20 12:08:20 -07001162 &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.
1163 &quot;googleSheetsOptions&quot;: { # [Optional] Additional options if sourceFormat is set to GOOGLE_SHEETS.
1164 &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
1165 &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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001166 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001167 &quot;autodetect&quot;: True or False, # Try to detect schema and format options automatically. Any option specified explicitly will be honored.
1168 &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.
1169 &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;.
1170 &quot;csvOptions&quot;: { # Additional properties to set if sourceFormat is set to CSV.
1171 &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.
1172 &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.
1173 &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.
1174 &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.
1175 &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.
1176 &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;).
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001177 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001178 &quot;bigtableOptions&quot;: { # [Optional] Additional options if sourceFormat is set to BIGTABLE.
1179 &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.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001180 {
Bu Sun Kim65020912020-05-20 12:08:20 -07001181 &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.
1182 &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.
1183 &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.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001184 {
Bu Sun Kim65020912020-05-20 12:08:20 -07001185 &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.
1186 &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.
1187 &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.
1188 &quot;qualifierString&quot;: &quot;A String&quot;,
1189 &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.
1190 &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.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001191 },
1192 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001193 &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.
1194 &quot;familyId&quot;: &quot;A String&quot;, # Identifier of the column family.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001195 },
1196 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001197 &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.
1198 &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.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001199 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001200 &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.
1201 &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.
1202 &quot;fields&quot;: [ # Describes the fields in a table.
Takashi Matsuo06694102015-09-11 13:55:40 -07001203 {
Bu Sun Kim65020912020-05-20 12:08:20 -07001204 &quot;fields&quot;: [ # [Optional] Describes the nested schema fields if the type property is set to RECORD.
Takashi Matsuo06694102015-09-11 13:55:40 -07001205 # Object with schema name: TableFieldSchema
1206 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001207 &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.
1208 &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).
1209 &quot;categories&quot;: { # [Optional] The categories attached to this field, used for field-level access control.
1210 &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.
1211 &quot;A String&quot;,
Dan O'Mearadd494642020-05-01 07:42:23 -07001212 ],
1213 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001214 &quot;mode&quot;: &quot;A String&quot;, # [Optional] The field mode. Possible values include NULLABLE, REQUIRED and REPEATED. The default value is NULLABLE.
1215 &quot;description&quot;: &quot;A String&quot;, # [Optional] The field description. The maximum length is 1,024 characters.
1216 &quot;policyTags&quot;: {
1217 &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.
1218 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001219 ],
1220 },
Takashi Matsuo06694102015-09-11 13:55:40 -07001221 },
1222 ],
1223 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001224 &quot;hivePartitioningOptions&quot;: { # [Optional, Trusted Tester] Options to configure hive partitioning support.
1225 &quot;sourceUriPrefix&quot;: &quot;A String&quot;, # [Optional, Trusted Tester] 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).
1226 &quot;mode&quot;: &quot;A String&quot;, # [Optional, Trusted Tester] When set, what mode of hive partitioning to use when reading data. Two 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. 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.
1227 },
1228 &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.
1229 &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.
1230 &quot;A String&quot;,
1231 ],
Takashi Matsuo06694102015-09-11 13:55:40 -07001232 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001233 &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.
1234 &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.
1235 &quot;labels&quot;: [
1236 &quot;A String&quot;,
1237 ],
1238 &quot;lossType&quot;: &quot;A String&quot;,
1239 &quot;modelType&quot;: &quot;A String&quot;,
1240 },
1241 &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.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001242 {
Bu Sun Kim65020912020-05-20 12:08:20 -07001243 &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.
1244 &quot;minRelProgress&quot;: 3.14,
1245 &quot;l2Reg&quot;: 3.14,
1246 &quot;learnRateStrategy&quot;: &quot;A String&quot;,
1247 &quot;warmStart&quot;: True or False,
1248 &quot;lineSearchInitLearnRate&quot;: 3.14,
1249 &quot;earlyStop&quot;: True or False,
1250 &quot;l1Reg&quot;: 3.14,
1251 &quot;maxIteration&quot;: &quot;A String&quot;,
1252 &quot;learnRate&quot;: 3.14,
1253 },
1254 &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.
1255 &quot;iterationResults&quot;: [ # [Output-only, Beta] List of each iteration results.
1256 {
1257 &quot;durationMs&quot;: &quot;A String&quot;, # [Output-only, Beta] Time taken to run the training iteration in milliseconds.
1258 &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.
1259 &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.
1260 &quot;index&quot;: 42, # [Output-only, Beta] Index of the ML training iteration, starting from zero for each training run.
1261 &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.
1262 },
1263 ],
1264 &quot;startTime&quot;: &quot;A String&quot;, # [Output-only, Beta] Training run start time in milliseconds since the epoch.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001265 },
1266 ],
1267 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001268 &quot;selfLink&quot;: &quot;A String&quot;, # [Output-only] A URL that can be used to access this resource again.
1269 &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.
1270 &quot;kind&quot;: &quot;bigquery#table&quot;, # [Output-only] The type of the resource.
1271 &quot;description&quot;: &quot;A String&quot;, # [Optional] A user-friendly description of this table.
1272 &quot;creationTime&quot;: &quot;A String&quot;, # [Output-only] The time when this table was created, in milliseconds since the epoch.
1273 &quot;rangePartitioning&quot;: { # [TrustedTester] Range partitioning specification for this table. Only one of timePartitioning and rangePartitioning should be specified.
1274 &quot;range&quot;: { # [TrustedTester] [Required] Defines the ranges for range partitioning.
1275 &quot;interval&quot;: &quot;A String&quot;, # [TrustedTester] [Required] The width of each interval.
1276 &quot;start&quot;: &quot;A String&quot;, # [TrustedTester] [Required] The start of range partitioning, inclusive.
1277 &quot;end&quot;: &quot;A String&quot;, # [TrustedTester] [Required] The end of range partitioning, exclusive.
1278 },
1279 &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.
1280 },
1281 &quot;schema&quot;: { # [Optional] Describes the schema of this table.
1282 &quot;fields&quot;: [ # Describes the fields in a table.
1283 {
1284 &quot;fields&quot;: [ # [Optional] Describes the nested schema fields if the type property is set to RECORD.
1285 # Object with schema name: TableFieldSchema
1286 ],
1287 &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.
1288 &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).
1289 &quot;categories&quot;: { # [Optional] The categories attached to this field, used for field-level access control.
1290 &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.
1291 &quot;A String&quot;,
1292 ],
1293 },
1294 &quot;mode&quot;: &quot;A String&quot;, # [Optional] The field mode. Possible values include NULLABLE, REQUIRED and REPEATED. The default value is NULLABLE.
1295 &quot;description&quot;: &quot;A String&quot;, # [Optional] The field description. The maximum length is 1,024 characters.
1296 &quot;policyTags&quot;: {
1297 &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.
1298 &quot;A String&quot;,
1299 ],
1300 },
1301 },
1302 ],
1303 },
1304 &quot;id&quot;: &quot;A String&quot;, # [Output-only] An opaque ID uniquely identifying the table.
1305 &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.
1306 &quot;materializedView&quot;: { # [Optional] Materialized view definition.
1307 &quot;query&quot;: &quot;A String&quot;, # [Required] A query whose result is persisted.
1308 &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;.
1309 &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).
1310 &quot;lastRefreshTime&quot;: &quot;A String&quot;, # [Output-only] [TrustedTester] The time when this materialized view was last modified, in milliseconds since the epoch.
1311 },
1312 &quot;tableReference&quot;: { # [Required] Reference describing the ID of this table.
1313 &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.
1314 &quot;projectId&quot;: &quot;A String&quot;, # [Required] The ID of the project containing this table.
1315 &quot;datasetId&quot;: &quot;A String&quot;, # [Required] The ID of the dataset containing this table.
1316 },
1317 &quot;lastModifiedTime&quot;: &quot;A String&quot;, # [Output-only] The time when this table was last modified, in milliseconds since the epoch.
1318 &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.
1319 &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.
1320 &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.
1321 &quot;A String&quot;,
1322 ],
1323 },
1324 &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. [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.
1325 &quot;view&quot;: { # [Optional] The view definition.
1326 &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.
1327 &quot;query&quot;: &quot;A String&quot;, # [Required] A query that BigQuery executes when the view is referenced.
1328 &quot;userDefinedFunctionResources&quot;: [ # Describes user-defined function resources used in the query.
1329 {
1330 &quot;resourceUri&quot;: &quot;A String&quot;, # [Pick one] A code resource to load from a Google Cloud Storage URI (gs://bucket/path).
1331 &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.
1332 },
1333 ],
1334 },
1335 &quot;numLongTermBytes&quot;: &quot;A String&quot;, # [Output-only] The number of bytes in the table that are considered &quot;long-term storage&quot;.
1336 &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.
1337 &quot;encryptionConfiguration&quot;: { # Custom encryption configuration (e.g., Cloud KMS keys).
1338 &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.
1339 },
1340 &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.
1341 &quot;estimatedBytes&quot;: &quot;A String&quot;, # [Output-only] A lower-bound estimate of the number of bytes currently in the streaming buffer.
1342 &quot;estimatedRows&quot;: &quot;A String&quot;, # [Output-only] A lower-bound estimate of the number of rows currently in the streaming buffer.
1343 &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.
1344 },
1345 &quot;numBytes&quot;: &quot;A String&quot;, # [Output-only] The size of this table in bytes, excluding any data in the streaming buffer.
1346 &quot;location&quot;: &quot;A String&quot;, # [Output-only] The geographic location where the table resides. This value is inherited from the dataset.
1347 &quot;friendlyName&quot;: &quot;A String&quot;, # [Optional] A descriptive name for this table.
1348 &quot;timePartitioning&quot;: { # Time-based partitioning specification for this table. Only one of timePartitioning and rangePartitioning should be specified.
1349 &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.
1350 &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.
1351 &quot;type&quot;: &quot;A String&quot;, # [Required] The only type supported is DAY, which will generate one partition per day.
1352 &quot;requirePartitionFilter&quot;: True or False,
1353 },
1354 &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.
1355 &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.
1356 &quot;a_key&quot;: &quot;A String&quot;,
1357 },
John Asmuth614db982014-04-24 15:46:26 -04001358 }
1359
1360
1361Returns:
1362 An object of the form:
1363
1364 {
Bu Sun Kim65020912020-05-20 12:08:20 -07001365 &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.
1366 &quot;googleSheetsOptions&quot;: { # [Optional] Additional options if sourceFormat is set to GOOGLE_SHEETS.
1367 &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
1368 &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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001369 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001370 &quot;autodetect&quot;: True or False, # Try to detect schema and format options automatically. Any option specified explicitly will be honored.
1371 &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.
1372 &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;.
1373 &quot;csvOptions&quot;: { # Additional properties to set if sourceFormat is set to CSV.
1374 &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.
1375 &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.
1376 &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.
1377 &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.
1378 &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.
1379 &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;).
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001380 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001381 &quot;bigtableOptions&quot;: { # [Optional] Additional options if sourceFormat is set to BIGTABLE.
1382 &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.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001383 {
Bu Sun Kim65020912020-05-20 12:08:20 -07001384 &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.
1385 &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.
1386 &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.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001387 {
Bu Sun Kim65020912020-05-20 12:08:20 -07001388 &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.
1389 &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.
1390 &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.
1391 &quot;qualifierString&quot;: &quot;A String&quot;,
1392 &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.
1393 &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.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001394 },
1395 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001396 &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.
1397 &quot;familyId&quot;: &quot;A String&quot;, # Identifier of the column family.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001398 },
1399 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001400 &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.
1401 &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.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001402 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001403 &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.
1404 &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.
1405 &quot;fields&quot;: [ # Describes the fields in a table.
Takashi Matsuo06694102015-09-11 13:55:40 -07001406 {
Bu Sun Kim65020912020-05-20 12:08:20 -07001407 &quot;fields&quot;: [ # [Optional] Describes the nested schema fields if the type property is set to RECORD.
Takashi Matsuo06694102015-09-11 13:55:40 -07001408 # Object with schema name: TableFieldSchema
1409 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001410 &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.
1411 &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).
1412 &quot;categories&quot;: { # [Optional] The categories attached to this field, used for field-level access control.
1413 &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.
1414 &quot;A String&quot;,
Dan O'Mearadd494642020-05-01 07:42:23 -07001415 ],
1416 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001417 &quot;mode&quot;: &quot;A String&quot;, # [Optional] The field mode. Possible values include NULLABLE, REQUIRED and REPEATED. The default value is NULLABLE.
1418 &quot;description&quot;: &quot;A String&quot;, # [Optional] The field description. The maximum length is 1,024 characters.
1419 &quot;policyTags&quot;: {
1420 &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.
1421 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001422 ],
1423 },
Takashi Matsuo06694102015-09-11 13:55:40 -07001424 },
1425 ],
1426 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001427 &quot;hivePartitioningOptions&quot;: { # [Optional, Trusted Tester] Options to configure hive partitioning support.
1428 &quot;sourceUriPrefix&quot;: &quot;A String&quot;, # [Optional, Trusted Tester] 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).
1429 &quot;mode&quot;: &quot;A String&quot;, # [Optional, Trusted Tester] When set, what mode of hive partitioning to use when reading data. Two 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. 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.
1430 },
1431 &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.
1432 &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.
1433 &quot;A String&quot;,
1434 ],
Takashi Matsuo06694102015-09-11 13:55:40 -07001435 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001436 &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.
1437 &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.
1438 &quot;labels&quot;: [
1439 &quot;A String&quot;,
1440 ],
1441 &quot;lossType&quot;: &quot;A String&quot;,
1442 &quot;modelType&quot;: &quot;A String&quot;,
1443 },
1444 &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.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001445 {
Bu Sun Kim65020912020-05-20 12:08:20 -07001446 &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.
1447 &quot;minRelProgress&quot;: 3.14,
1448 &quot;l2Reg&quot;: 3.14,
1449 &quot;learnRateStrategy&quot;: &quot;A String&quot;,
1450 &quot;warmStart&quot;: True or False,
1451 &quot;lineSearchInitLearnRate&quot;: 3.14,
1452 &quot;earlyStop&quot;: True or False,
1453 &quot;l1Reg&quot;: 3.14,
1454 &quot;maxIteration&quot;: &quot;A String&quot;,
1455 &quot;learnRate&quot;: 3.14,
1456 },
1457 &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.
1458 &quot;iterationResults&quot;: [ # [Output-only, Beta] List of each iteration results.
1459 {
1460 &quot;durationMs&quot;: &quot;A String&quot;, # [Output-only, Beta] Time taken to run the training iteration in milliseconds.
1461 &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.
1462 &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.
1463 &quot;index&quot;: 42, # [Output-only, Beta] Index of the ML training iteration, starting from zero for each training run.
1464 &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.
1465 },
1466 ],
1467 &quot;startTime&quot;: &quot;A String&quot;, # [Output-only, Beta] Training run start time in milliseconds since the epoch.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001468 },
1469 ],
1470 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001471 &quot;selfLink&quot;: &quot;A String&quot;, # [Output-only] A URL that can be used to access this resource again.
1472 &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.
1473 &quot;kind&quot;: &quot;bigquery#table&quot;, # [Output-only] The type of the resource.
1474 &quot;description&quot;: &quot;A String&quot;, # [Optional] A user-friendly description of this table.
1475 &quot;creationTime&quot;: &quot;A String&quot;, # [Output-only] The time when this table was created, in milliseconds since the epoch.
1476 &quot;rangePartitioning&quot;: { # [TrustedTester] Range partitioning specification for this table. Only one of timePartitioning and rangePartitioning should be specified.
1477 &quot;range&quot;: { # [TrustedTester] [Required] Defines the ranges for range partitioning.
1478 &quot;interval&quot;: &quot;A String&quot;, # [TrustedTester] [Required] The width of each interval.
1479 &quot;start&quot;: &quot;A String&quot;, # [TrustedTester] [Required] The start of range partitioning, inclusive.
1480 &quot;end&quot;: &quot;A String&quot;, # [TrustedTester] [Required] The end of range partitioning, exclusive.
1481 },
1482 &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.
1483 },
1484 &quot;schema&quot;: { # [Optional] Describes the schema of this table.
1485 &quot;fields&quot;: [ # Describes the fields in a table.
1486 {
1487 &quot;fields&quot;: [ # [Optional] Describes the nested schema fields if the type property is set to RECORD.
1488 # Object with schema name: TableFieldSchema
1489 ],
1490 &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.
1491 &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).
1492 &quot;categories&quot;: { # [Optional] The categories attached to this field, used for field-level access control.
1493 &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.
1494 &quot;A String&quot;,
1495 ],
1496 },
1497 &quot;mode&quot;: &quot;A String&quot;, # [Optional] The field mode. Possible values include NULLABLE, REQUIRED and REPEATED. The default value is NULLABLE.
1498 &quot;description&quot;: &quot;A String&quot;, # [Optional] The field description. The maximum length is 1,024 characters.
1499 &quot;policyTags&quot;: {
1500 &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.
1501 &quot;A String&quot;,
1502 ],
1503 },
1504 },
1505 ],
1506 },
1507 &quot;id&quot;: &quot;A String&quot;, # [Output-only] An opaque ID uniquely identifying the table.
1508 &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.
1509 &quot;materializedView&quot;: { # [Optional] Materialized view definition.
1510 &quot;query&quot;: &quot;A String&quot;, # [Required] A query whose result is persisted.
1511 &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;.
1512 &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).
1513 &quot;lastRefreshTime&quot;: &quot;A String&quot;, # [Output-only] [TrustedTester] The time when this materialized view was last modified, in milliseconds since the epoch.
1514 },
1515 &quot;tableReference&quot;: { # [Required] Reference describing the ID of this table.
1516 &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.
1517 &quot;projectId&quot;: &quot;A String&quot;, # [Required] The ID of the project containing this table.
1518 &quot;datasetId&quot;: &quot;A String&quot;, # [Required] The ID of the dataset containing this table.
1519 },
1520 &quot;lastModifiedTime&quot;: &quot;A String&quot;, # [Output-only] The time when this table was last modified, in milliseconds since the epoch.
1521 &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.
1522 &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.
1523 &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.
1524 &quot;A String&quot;,
1525 ],
1526 },
1527 &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. [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.
1528 &quot;view&quot;: { # [Optional] The view definition.
1529 &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.
1530 &quot;query&quot;: &quot;A String&quot;, # [Required] A query that BigQuery executes when the view is referenced.
1531 &quot;userDefinedFunctionResources&quot;: [ # Describes user-defined function resources used in the query.
1532 {
1533 &quot;resourceUri&quot;: &quot;A String&quot;, # [Pick one] A code resource to load from a Google Cloud Storage URI (gs://bucket/path).
1534 &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.
1535 },
1536 ],
1537 },
1538 &quot;numLongTermBytes&quot;: &quot;A String&quot;, # [Output-only] The number of bytes in the table that are considered &quot;long-term storage&quot;.
1539 &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.
1540 &quot;encryptionConfiguration&quot;: { # Custom encryption configuration (e.g., Cloud KMS keys).
1541 &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.
1542 },
1543 &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.
1544 &quot;estimatedBytes&quot;: &quot;A String&quot;, # [Output-only] A lower-bound estimate of the number of bytes currently in the streaming buffer.
1545 &quot;estimatedRows&quot;: &quot;A String&quot;, # [Output-only] A lower-bound estimate of the number of rows currently in the streaming buffer.
1546 &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.
1547 },
1548 &quot;numBytes&quot;: &quot;A String&quot;, # [Output-only] The size of this table in bytes, excluding any data in the streaming buffer.
1549 &quot;location&quot;: &quot;A String&quot;, # [Output-only] The geographic location where the table resides. This value is inherited from the dataset.
1550 &quot;friendlyName&quot;: &quot;A String&quot;, # [Optional] A descriptive name for this table.
1551 &quot;timePartitioning&quot;: { # Time-based partitioning specification for this table. Only one of timePartitioning and rangePartitioning should be specified.
1552 &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.
1553 &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.
1554 &quot;type&quot;: &quot;A String&quot;, # [Required] The only type supported is DAY, which will generate one partition per day.
1555 &quot;requirePartitionFilter&quot;: True or False,
1556 },
1557 &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.
1558 &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.
1559 &quot;a_key&quot;: &quot;A String&quot;,
1560 },
John Asmuth614db982014-04-24 15:46:26 -04001561 }</pre>
1562</div>
1563
1564<div class="method">
Bu Sun Kim65020912020-05-20 12:08:20 -07001565 <code class="details" id="setIamPolicy">setIamPolicy(resource, body=None)</code>
1566 <pre>Sets the access control policy on the specified resource. Replaces any
1567existing policy.
1568
1569Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.
1570
1571Args:
1572 resource: string, REQUIRED: The resource for which the policy is being specified.
1573See the operation documentation for the appropriate value for this field. (required)
1574 body: object, The request body.
1575 The object takes the form of:
1576
1577{ # Request message for `SetIamPolicy` method.
1578 &quot;policy&quot;: { # An Identity and Access Management (IAM) policy, which specifies access # REQUIRED: The complete policy to be applied to the `resource`. The size of
1579 # the policy is limited to a few 10s of KB. An empty policy is a
1580 # valid policy but certain Cloud Platform services (such as Projects)
1581 # might reject them.
1582 # controls for Google Cloud resources.
1583 #
1584 #
1585 # A `Policy` is a collection of `bindings`. A `binding` binds one or more
1586 # `members` to a single `role`. Members can be user accounts, service accounts,
1587 # Google groups, and domains (such as G Suite). A `role` is a named list of
1588 # permissions; each `role` can be an IAM predefined role or a user-created
1589 # custom role.
1590 #
1591 # For some types of Google Cloud resources, a `binding` can also specify a
1592 # `condition`, which is a logical expression that allows access to a resource
1593 # only if the expression evaluates to `true`. A condition can add constraints
1594 # based on attributes of the request, the resource, or both. To learn which
1595 # resources support conditions in their IAM policies, see the
1596 # [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
1597 #
1598 # **JSON example:**
1599 #
1600 # {
1601 # &quot;bindings&quot;: [
1602 # {
1603 # &quot;role&quot;: &quot;roles/resourcemanager.organizationAdmin&quot;,
1604 # &quot;members&quot;: [
1605 # &quot;user:mike@example.com&quot;,
1606 # &quot;group:admins@example.com&quot;,
1607 # &quot;domain:google.com&quot;,
1608 # &quot;serviceAccount:my-project-id@appspot.gserviceaccount.com&quot;
1609 # ]
1610 # },
1611 # {
1612 # &quot;role&quot;: &quot;roles/resourcemanager.organizationViewer&quot;,
1613 # &quot;members&quot;: [
1614 # &quot;user:eve@example.com&quot;
1615 # ],
1616 # &quot;condition&quot;: {
1617 # &quot;title&quot;: &quot;expirable access&quot;,
1618 # &quot;description&quot;: &quot;Does not grant access after Sep 2020&quot;,
1619 # &quot;expression&quot;: &quot;request.time &lt; timestamp(&#x27;2020-10-01T00:00:00.000Z&#x27;)&quot;,
1620 # }
1621 # }
1622 # ],
1623 # &quot;etag&quot;: &quot;BwWWja0YfJA=&quot;,
1624 # &quot;version&quot;: 3
1625 # }
1626 #
1627 # **YAML example:**
1628 #
1629 # bindings:
1630 # - members:
1631 # - user:mike@example.com
1632 # - group:admins@example.com
1633 # - domain:google.com
1634 # - serviceAccount:my-project-id@appspot.gserviceaccount.com
1635 # role: roles/resourcemanager.organizationAdmin
1636 # - members:
1637 # - user:eve@example.com
1638 # role: roles/resourcemanager.organizationViewer
1639 # condition:
1640 # title: expirable access
1641 # description: Does not grant access after Sep 2020
1642 # expression: request.time &lt; timestamp(&#x27;2020-10-01T00:00:00.000Z&#x27;)
1643 # - etag: BwWWja0YfJA=
1644 # - version: 3
1645 #
1646 # For a description of IAM and its features, see the
1647 # [IAM documentation](https://cloud.google.com/iam/docs/).
1648 &quot;bindings&quot;: [ # Associates a list of `members` to a `role`. Optionally, may specify a
1649 # `condition` that determines how and when the `bindings` are applied. Each
1650 # of the `bindings` must contain at least one member.
1651 { # Associates `members` with a `role`.
1652 &quot;condition&quot;: { # Represents a textual expression in the Common Expression Language (CEL) # The condition that is associated with this binding.
1653 #
1654 # If the condition evaluates to `true`, then this binding applies to the
1655 # current request.
1656 #
1657 # If the condition evaluates to `false`, then this binding does not apply to
1658 # the current request. However, a different role binding might grant the same
1659 # role to one or more of the members in this binding.
1660 #
1661 # To learn which resources support conditions in their IAM policies, see the
1662 # [IAM
1663 # documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
1664 # syntax. CEL is a C-like expression language. The syntax and semantics of CEL
1665 # are documented at https://github.com/google/cel-spec.
1666 #
1667 # Example (Comparison):
1668 #
1669 # title: &quot;Summary size limit&quot;
1670 # description: &quot;Determines if a summary is less than 100 chars&quot;
1671 # expression: &quot;document.summary.size() &lt; 100&quot;
1672 #
1673 # Example (Equality):
1674 #
1675 # title: &quot;Requestor is owner&quot;
1676 # description: &quot;Determines if requestor is the document owner&quot;
1677 # expression: &quot;document.owner == request.auth.claims.email&quot;
1678 #
1679 # Example (Logic):
1680 #
1681 # title: &quot;Public documents&quot;
1682 # description: &quot;Determine whether the document should be publicly visible&quot;
1683 # expression: &quot;document.type != &#x27;private&#x27; &amp;&amp; document.type != &#x27;internal&#x27;&quot;
1684 #
1685 # Example (Data Manipulation):
1686 #
1687 # title: &quot;Notification string&quot;
1688 # description: &quot;Create a notification string with a timestamp.&quot;
1689 # expression: &quot;&#x27;New message received at &#x27; + string(document.create_time)&quot;
1690 #
1691 # The exact variables and functions that may be referenced within an expression
1692 # are determined by the service that evaluates it. See the service
1693 # documentation for additional information.
1694 &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the expression, i.e. a short string describing
1695 # its purpose. This can be used e.g. in UIs which allow to enter the
1696 # expression.
1697 &quot;location&quot;: &quot;A String&quot;, # Optional. String indicating the location of the expression for error
1698 # reporting, e.g. a file name and a position in the file.
1699 &quot;description&quot;: &quot;A String&quot;, # Optional. Description of the expression. This is a longer text which
1700 # describes the expression, e.g. when hovered over it in a UI.
1701 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language
1702 # syntax.
1703 },
1704 &quot;members&quot;: [ # Specifies the identities requesting access for a Cloud Platform resource.
1705 # `members` can have the following values:
1706 #
1707 # * `allUsers`: A special identifier that represents anyone who is
1708 # on the internet; with or without a Google account.
1709 #
1710 # * `allAuthenticatedUsers`: A special identifier that represents anyone
1711 # who is authenticated with a Google account or a service account.
1712 #
1713 # * `user:{emailid}`: An email address that represents a specific Google
1714 # account. For example, `alice@example.com` .
1715 #
1716 #
1717 # * `serviceAccount:{emailid}`: An email address that represents a service
1718 # account. For example, `my-other-app@appspot.gserviceaccount.com`.
1719 #
1720 # * `group:{emailid}`: An email address that represents a Google group.
1721 # For example, `admins@example.com`.
1722 #
1723 # * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique
1724 # identifier) representing a user that has been recently deleted. For
1725 # example, `alice@example.com?uid=123456789012345678901`. If the user is
1726 # recovered, this value reverts to `user:{emailid}` and the recovered user
1727 # retains the role in the binding.
1728 #
1729 # * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus
1730 # unique identifier) representing a service account that has been recently
1731 # deleted. For example,
1732 # `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`.
1733 # If the service account is undeleted, this value reverts to
1734 # `serviceAccount:{emailid}` and the undeleted service account retains the
1735 # role in the binding.
1736 #
1737 # * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique
1738 # identifier) representing a Google group that has been recently
1739 # deleted. For example, `admins@example.com?uid=123456789012345678901`. If
1740 # the group is recovered, this value reverts to `group:{emailid}` and the
1741 # recovered group retains the role in the binding.
1742 #
1743 #
1744 # * `domain:{domain}`: The G Suite domain (primary) that represents all the
1745 # users of that domain. For example, `google.com` or `example.com`.
1746 #
1747 &quot;A String&quot;,
1748 ],
1749 &quot;role&quot;: &quot;A String&quot;, # Role that is assigned to `members`.
1750 # For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
1751 },
1752 ],
1753 &quot;etag&quot;: &quot;A String&quot;, # `etag` is used for optimistic concurrency control as a way to help
1754 # prevent simultaneous updates of a policy from overwriting each other.
1755 # It is strongly suggested that systems make use of the `etag` in the
1756 # read-modify-write cycle to perform policy updates in order to avoid race
1757 # conditions: An `etag` is returned in the response to `getIamPolicy`, and
1758 # systems are expected to put that etag in the request to `setIamPolicy` to
1759 # ensure that their change will be applied to the same version of the policy.
1760 #
1761 # **Important:** If you use IAM Conditions, you must include the `etag` field
1762 # whenever you call `setIamPolicy`. If you omit this field, then IAM allows
1763 # you to overwrite a version `3` policy with a version `1` policy, and all of
1764 # the conditions in the version `3` policy are lost.
1765 &quot;version&quot;: 42, # Specifies the format of the policy.
1766 #
1767 # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value
1768 # are rejected.
1769 #
1770 # Any operation that affects conditional role bindings must specify version
1771 # `3`. This requirement applies to the following operations:
1772 #
1773 # * Getting a policy that includes a conditional role binding
1774 # * Adding a conditional role binding to a policy
1775 # * Changing a conditional role binding in a policy
1776 # * Removing any role binding, with or without a condition, from a policy
1777 # that includes conditions
1778 #
1779 # **Important:** If you use IAM Conditions, you must include the `etag` field
1780 # whenever you call `setIamPolicy`. If you omit this field, then IAM allows
1781 # you to overwrite a version `3` policy with a version `1` policy, and all of
1782 # the conditions in the version `3` policy are lost.
1783 #
1784 # If a policy does not include any conditions, operations on that policy may
1785 # specify any valid version or leave the field unset.
1786 #
1787 # To learn which resources support conditions in their IAM policies, see the
1788 # [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
1789 &quot;auditConfigs&quot;: [ # Specifies cloud audit logging configuration for this policy.
1790 { # Specifies the audit configuration for a service.
1791 # The configuration determines which permission types are logged, and what
1792 # identities, if any, are exempted from logging.
1793 # An AuditConfig must have one or more AuditLogConfigs.
1794 #
1795 # If there are AuditConfigs for both `allServices` and a specific service,
1796 # the union of the two AuditConfigs is used for that service: the log_types
1797 # specified in each AuditConfig are enabled, and the exempted_members in each
1798 # AuditLogConfig are exempted.
1799 #
1800 # Example Policy with multiple AuditConfigs:
1801 #
1802 # {
1803 # &quot;audit_configs&quot;: [
1804 # {
1805 # &quot;service&quot;: &quot;allServices&quot;
1806 # &quot;audit_log_configs&quot;: [
1807 # {
1808 # &quot;log_type&quot;: &quot;DATA_READ&quot;,
1809 # &quot;exempted_members&quot;: [
1810 # &quot;user:jose@example.com&quot;
1811 # ]
1812 # },
1813 # {
1814 # &quot;log_type&quot;: &quot;DATA_WRITE&quot;,
1815 # },
1816 # {
1817 # &quot;log_type&quot;: &quot;ADMIN_READ&quot;,
1818 # }
1819 # ]
1820 # },
1821 # {
1822 # &quot;service&quot;: &quot;sampleservice.googleapis.com&quot;
1823 # &quot;audit_log_configs&quot;: [
1824 # {
1825 # &quot;log_type&quot;: &quot;DATA_READ&quot;,
1826 # },
1827 # {
1828 # &quot;log_type&quot;: &quot;DATA_WRITE&quot;,
1829 # &quot;exempted_members&quot;: [
1830 # &quot;user:aliya@example.com&quot;
1831 # ]
1832 # }
1833 # ]
1834 # }
1835 # ]
1836 # }
1837 #
1838 # For sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ
1839 # logging. It also exempts jose@example.com from DATA_READ logging, and
1840 # aliya@example.com from DATA_WRITE logging.
1841 &quot;auditLogConfigs&quot;: [ # The configuration for logging of each type of permission.
1842 { # Provides the configuration for logging a type of permissions.
1843 # Example:
1844 #
1845 # {
1846 # &quot;audit_log_configs&quot;: [
1847 # {
1848 # &quot;log_type&quot;: &quot;DATA_READ&quot;,
1849 # &quot;exempted_members&quot;: [
1850 # &quot;user:jose@example.com&quot;
1851 # ]
1852 # },
1853 # {
1854 # &quot;log_type&quot;: &quot;DATA_WRITE&quot;,
1855 # }
1856 # ]
1857 # }
1858 #
1859 # This enables &#x27;DATA_READ&#x27; and &#x27;DATA_WRITE&#x27; logging, while exempting
1860 # jose@example.com from DATA_READ logging.
1861 &quot;exemptedMembers&quot;: [ # Specifies the identities that do not cause logging for this type of
1862 # permission.
1863 # Follows the same format of Binding.members.
1864 &quot;A String&quot;,
1865 ],
1866 &quot;logType&quot;: &quot;A String&quot;, # The log type that this config enables.
1867 },
1868 ],
1869 &quot;service&quot;: &quot;A String&quot;, # Specifies a service that will be enabled for audit logging.
1870 # For example, `storage.googleapis.com`, `cloudsql.googleapis.com`.
1871 # `allServices` is a special value that covers all services.
1872 },
1873 ],
1874 },
1875 &quot;updateMask&quot;: &quot;A String&quot;, # OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only
1876 # the fields in the mask will be modified. If no mask is provided, the
1877 # following default mask is used:
1878 #
1879 # `paths: &quot;bindings, etag&quot;`
1880 }
1881
1882
1883Returns:
1884 An object of the form:
1885
1886 { # An Identity and Access Management (IAM) policy, which specifies access
1887 # controls for Google Cloud resources.
1888 #
1889 #
1890 # A `Policy` is a collection of `bindings`. A `binding` binds one or more
1891 # `members` to a single `role`. Members can be user accounts, service accounts,
1892 # Google groups, and domains (such as G Suite). A `role` is a named list of
1893 # permissions; each `role` can be an IAM predefined role or a user-created
1894 # custom role.
1895 #
1896 # For some types of Google Cloud resources, a `binding` can also specify a
1897 # `condition`, which is a logical expression that allows access to a resource
1898 # only if the expression evaluates to `true`. A condition can add constraints
1899 # based on attributes of the request, the resource, or both. To learn which
1900 # resources support conditions in their IAM policies, see the
1901 # [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
1902 #
1903 # **JSON example:**
1904 #
1905 # {
1906 # &quot;bindings&quot;: [
1907 # {
1908 # &quot;role&quot;: &quot;roles/resourcemanager.organizationAdmin&quot;,
1909 # &quot;members&quot;: [
1910 # &quot;user:mike@example.com&quot;,
1911 # &quot;group:admins@example.com&quot;,
1912 # &quot;domain:google.com&quot;,
1913 # &quot;serviceAccount:my-project-id@appspot.gserviceaccount.com&quot;
1914 # ]
1915 # },
1916 # {
1917 # &quot;role&quot;: &quot;roles/resourcemanager.organizationViewer&quot;,
1918 # &quot;members&quot;: [
1919 # &quot;user:eve@example.com&quot;
1920 # ],
1921 # &quot;condition&quot;: {
1922 # &quot;title&quot;: &quot;expirable access&quot;,
1923 # &quot;description&quot;: &quot;Does not grant access after Sep 2020&quot;,
1924 # &quot;expression&quot;: &quot;request.time &lt; timestamp(&#x27;2020-10-01T00:00:00.000Z&#x27;)&quot;,
1925 # }
1926 # }
1927 # ],
1928 # &quot;etag&quot;: &quot;BwWWja0YfJA=&quot;,
1929 # &quot;version&quot;: 3
1930 # }
1931 #
1932 # **YAML example:**
1933 #
1934 # bindings:
1935 # - members:
1936 # - user:mike@example.com
1937 # - group:admins@example.com
1938 # - domain:google.com
1939 # - serviceAccount:my-project-id@appspot.gserviceaccount.com
1940 # role: roles/resourcemanager.organizationAdmin
1941 # - members:
1942 # - user:eve@example.com
1943 # role: roles/resourcemanager.organizationViewer
1944 # condition:
1945 # title: expirable access
1946 # description: Does not grant access after Sep 2020
1947 # expression: request.time &lt; timestamp(&#x27;2020-10-01T00:00:00.000Z&#x27;)
1948 # - etag: BwWWja0YfJA=
1949 # - version: 3
1950 #
1951 # For a description of IAM and its features, see the
1952 # [IAM documentation](https://cloud.google.com/iam/docs/).
1953 &quot;bindings&quot;: [ # Associates a list of `members` to a `role`. Optionally, may specify a
1954 # `condition` that determines how and when the `bindings` are applied. Each
1955 # of the `bindings` must contain at least one member.
1956 { # Associates `members` with a `role`.
1957 &quot;condition&quot;: { # Represents a textual expression in the Common Expression Language (CEL) # The condition that is associated with this binding.
1958 #
1959 # If the condition evaluates to `true`, then this binding applies to the
1960 # current request.
1961 #
1962 # If the condition evaluates to `false`, then this binding does not apply to
1963 # the current request. However, a different role binding might grant the same
1964 # role to one or more of the members in this binding.
1965 #
1966 # To learn which resources support conditions in their IAM policies, see the
1967 # [IAM
1968 # documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
1969 # syntax. CEL is a C-like expression language. The syntax and semantics of CEL
1970 # are documented at https://github.com/google/cel-spec.
1971 #
1972 # Example (Comparison):
1973 #
1974 # title: &quot;Summary size limit&quot;
1975 # description: &quot;Determines if a summary is less than 100 chars&quot;
1976 # expression: &quot;document.summary.size() &lt; 100&quot;
1977 #
1978 # Example (Equality):
1979 #
1980 # title: &quot;Requestor is owner&quot;
1981 # description: &quot;Determines if requestor is the document owner&quot;
1982 # expression: &quot;document.owner == request.auth.claims.email&quot;
1983 #
1984 # Example (Logic):
1985 #
1986 # title: &quot;Public documents&quot;
1987 # description: &quot;Determine whether the document should be publicly visible&quot;
1988 # expression: &quot;document.type != &#x27;private&#x27; &amp;&amp; document.type != &#x27;internal&#x27;&quot;
1989 #
1990 # Example (Data Manipulation):
1991 #
1992 # title: &quot;Notification string&quot;
1993 # description: &quot;Create a notification string with a timestamp.&quot;
1994 # expression: &quot;&#x27;New message received at &#x27; + string(document.create_time)&quot;
1995 #
1996 # The exact variables and functions that may be referenced within an expression
1997 # are determined by the service that evaluates it. See the service
1998 # documentation for additional information.
1999 &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the expression, i.e. a short string describing
2000 # its purpose. This can be used e.g. in UIs which allow to enter the
2001 # expression.
2002 &quot;location&quot;: &quot;A String&quot;, # Optional. String indicating the location of the expression for error
2003 # reporting, e.g. a file name and a position in the file.
2004 &quot;description&quot;: &quot;A String&quot;, # Optional. Description of the expression. This is a longer text which
2005 # describes the expression, e.g. when hovered over it in a UI.
2006 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language
2007 # syntax.
2008 },
2009 &quot;members&quot;: [ # Specifies the identities requesting access for a Cloud Platform resource.
2010 # `members` can have the following values:
2011 #
2012 # * `allUsers`: A special identifier that represents anyone who is
2013 # on the internet; with or without a Google account.
2014 #
2015 # * `allAuthenticatedUsers`: A special identifier that represents anyone
2016 # who is authenticated with a Google account or a service account.
2017 #
2018 # * `user:{emailid}`: An email address that represents a specific Google
2019 # account. For example, `alice@example.com` .
2020 #
2021 #
2022 # * `serviceAccount:{emailid}`: An email address that represents a service
2023 # account. For example, `my-other-app@appspot.gserviceaccount.com`.
2024 #
2025 # * `group:{emailid}`: An email address that represents a Google group.
2026 # For example, `admins@example.com`.
2027 #
2028 # * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique
2029 # identifier) representing a user that has been recently deleted. For
2030 # example, `alice@example.com?uid=123456789012345678901`. If the user is
2031 # recovered, this value reverts to `user:{emailid}` and the recovered user
2032 # retains the role in the binding.
2033 #
2034 # * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus
2035 # unique identifier) representing a service account that has been recently
2036 # deleted. For example,
2037 # `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`.
2038 # If the service account is undeleted, this value reverts to
2039 # `serviceAccount:{emailid}` and the undeleted service account retains the
2040 # role in the binding.
2041 #
2042 # * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique
2043 # identifier) representing a Google group that has been recently
2044 # deleted. For example, `admins@example.com?uid=123456789012345678901`. If
2045 # the group is recovered, this value reverts to `group:{emailid}` and the
2046 # recovered group retains the role in the binding.
2047 #
2048 #
2049 # * `domain:{domain}`: The G Suite domain (primary) that represents all the
2050 # users of that domain. For example, `google.com` or `example.com`.
2051 #
2052 &quot;A String&quot;,
2053 ],
2054 &quot;role&quot;: &quot;A String&quot;, # Role that is assigned to `members`.
2055 # For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
2056 },
2057 ],
2058 &quot;etag&quot;: &quot;A String&quot;, # `etag` is used for optimistic concurrency control as a way to help
2059 # prevent simultaneous updates of a policy from overwriting each other.
2060 # It is strongly suggested that systems make use of the `etag` in the
2061 # read-modify-write cycle to perform policy updates in order to avoid race
2062 # conditions: An `etag` is returned in the response to `getIamPolicy`, and
2063 # systems are expected to put that etag in the request to `setIamPolicy` to
2064 # ensure that their change will be applied to the same version of the policy.
2065 #
2066 # **Important:** If you use IAM Conditions, you must include the `etag` field
2067 # whenever you call `setIamPolicy`. If you omit this field, then IAM allows
2068 # you to overwrite a version `3` policy with a version `1` policy, and all of
2069 # the conditions in the version `3` policy are lost.
2070 &quot;version&quot;: 42, # Specifies the format of the policy.
2071 #
2072 # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value
2073 # are rejected.
2074 #
2075 # Any operation that affects conditional role bindings must specify version
2076 # `3`. This requirement applies to the following operations:
2077 #
2078 # * Getting a policy that includes a conditional role binding
2079 # * Adding a conditional role binding to a policy
2080 # * Changing a conditional role binding in a policy
2081 # * Removing any role binding, with or without a condition, from a policy
2082 # that includes conditions
2083 #
2084 # **Important:** If you use IAM Conditions, you must include the `etag` field
2085 # whenever you call `setIamPolicy`. If you omit this field, then IAM allows
2086 # you to overwrite a version `3` policy with a version `1` policy, and all of
2087 # the conditions in the version `3` policy are lost.
2088 #
2089 # If a policy does not include any conditions, operations on that policy may
2090 # specify any valid version or leave the field unset.
2091 #
2092 # To learn which resources support conditions in their IAM policies, see the
2093 # [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
2094 &quot;auditConfigs&quot;: [ # Specifies cloud audit logging configuration for this policy.
2095 { # Specifies the audit configuration for a service.
2096 # The configuration determines which permission types are logged, and what
2097 # identities, if any, are exempted from logging.
2098 # An AuditConfig must have one or more AuditLogConfigs.
2099 #
2100 # If there are AuditConfigs for both `allServices` and a specific service,
2101 # the union of the two AuditConfigs is used for that service: the log_types
2102 # specified in each AuditConfig are enabled, and the exempted_members in each
2103 # AuditLogConfig are exempted.
2104 #
2105 # Example Policy with multiple AuditConfigs:
2106 #
2107 # {
2108 # &quot;audit_configs&quot;: [
2109 # {
2110 # &quot;service&quot;: &quot;allServices&quot;
2111 # &quot;audit_log_configs&quot;: [
2112 # {
2113 # &quot;log_type&quot;: &quot;DATA_READ&quot;,
2114 # &quot;exempted_members&quot;: [
2115 # &quot;user:jose@example.com&quot;
2116 # ]
2117 # },
2118 # {
2119 # &quot;log_type&quot;: &quot;DATA_WRITE&quot;,
2120 # },
2121 # {
2122 # &quot;log_type&quot;: &quot;ADMIN_READ&quot;,
2123 # }
2124 # ]
2125 # },
2126 # {
2127 # &quot;service&quot;: &quot;sampleservice.googleapis.com&quot;
2128 # &quot;audit_log_configs&quot;: [
2129 # {
2130 # &quot;log_type&quot;: &quot;DATA_READ&quot;,
2131 # },
2132 # {
2133 # &quot;log_type&quot;: &quot;DATA_WRITE&quot;,
2134 # &quot;exempted_members&quot;: [
2135 # &quot;user:aliya@example.com&quot;
2136 # ]
2137 # }
2138 # ]
2139 # }
2140 # ]
2141 # }
2142 #
2143 # For sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ
2144 # logging. It also exempts jose@example.com from DATA_READ logging, and
2145 # aliya@example.com from DATA_WRITE logging.
2146 &quot;auditLogConfigs&quot;: [ # The configuration for logging of each type of permission.
2147 { # Provides the configuration for logging a type of permissions.
2148 # Example:
2149 #
2150 # {
2151 # &quot;audit_log_configs&quot;: [
2152 # {
2153 # &quot;log_type&quot;: &quot;DATA_READ&quot;,
2154 # &quot;exempted_members&quot;: [
2155 # &quot;user:jose@example.com&quot;
2156 # ]
2157 # },
2158 # {
2159 # &quot;log_type&quot;: &quot;DATA_WRITE&quot;,
2160 # }
2161 # ]
2162 # }
2163 #
2164 # This enables &#x27;DATA_READ&#x27; and &#x27;DATA_WRITE&#x27; logging, while exempting
2165 # jose@example.com from DATA_READ logging.
2166 &quot;exemptedMembers&quot;: [ # Specifies the identities that do not cause logging for this type of
2167 # permission.
2168 # Follows the same format of Binding.members.
2169 &quot;A String&quot;,
2170 ],
2171 &quot;logType&quot;: &quot;A String&quot;, # The log type that this config enables.
2172 },
2173 ],
2174 &quot;service&quot;: &quot;A String&quot;, # Specifies a service that will be enabled for audit logging.
2175 # For example, `storage.googleapis.com`, `cloudsql.googleapis.com`.
2176 # `allServices` is a special value that covers all services.
2177 },
2178 ],
2179 }</pre>
2180</div>
2181
2182<div class="method">
2183 <code class="details" id="testIamPermissions">testIamPermissions(resource, body=None)</code>
2184 <pre>Returns permissions that a caller has on the specified resource.
2185If the resource does not exist, this will return an empty set of
2186permissions, not a `NOT_FOUND` error.
2187
2188Note: This operation is designed to be used for building permission-aware
2189UIs and command-line tools, not for authorization checking. This operation
2190may &quot;fail open&quot; without warning.
2191
2192Args:
2193 resource: string, REQUIRED: The resource for which the policy detail is being requested.
2194See the operation documentation for the appropriate value for this field. (required)
2195 body: object, The request body.
2196 The object takes the form of:
2197
2198{ # Request message for `TestIamPermissions` method.
2199 &quot;permissions&quot;: [ # The set of permissions to check for the `resource`. Permissions with
2200 # wildcards (such as &#x27;*&#x27; or &#x27;storage.*&#x27;) are not allowed. For more
2201 # information see
2202 # [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions).
2203 &quot;A String&quot;,
2204 ],
2205 }
2206
2207
2208Returns:
2209 An object of the form:
2210
2211 { # Response message for `TestIamPermissions` method.
2212 &quot;permissions&quot;: [ # A subset of `TestPermissionsRequest.permissions` that the caller is
2213 # allowed.
2214 &quot;A String&quot;,
2215 ],
2216 }</pre>
2217</div>
2218
2219<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07002220 <code class="details" id="update">update(projectId, datasetId, tableId, body=None)</code>
John Asmuth614db982014-04-24 15:46:26 -04002221 <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.
2222
2223Args:
2224 projectId: string, Project ID of the table to update (required)
2225 datasetId: string, Dataset ID of the table to update (required)
2226 tableId: string, Table ID of the table to update (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07002227 body: object, The request body.
John Asmuth614db982014-04-24 15:46:26 -04002228 The object takes the form of:
2229
2230{
Bu Sun Kim65020912020-05-20 12:08:20 -07002231 &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.
2232 &quot;googleSheetsOptions&quot;: { # [Optional] Additional options if sourceFormat is set to GOOGLE_SHEETS.
2233 &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
2234 &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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002235 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002236 &quot;autodetect&quot;: True or False, # Try to detect schema and format options automatically. Any option specified explicitly will be honored.
2237 &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.
2238 &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;.
2239 &quot;csvOptions&quot;: { # Additional properties to set if sourceFormat is set to CSV.
2240 &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.
2241 &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.
2242 &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.
2243 &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.
2244 &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.
2245 &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;).
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002246 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002247 &quot;bigtableOptions&quot;: { # [Optional] Additional options if sourceFormat is set to BIGTABLE.
2248 &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.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07002249 {
Bu Sun Kim65020912020-05-20 12:08:20 -07002250 &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.
2251 &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.
2252 &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.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07002253 {
Bu Sun Kim65020912020-05-20 12:08:20 -07002254 &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.
2255 &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.
2256 &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.
2257 &quot;qualifierString&quot;: &quot;A String&quot;,
2258 &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.
2259 &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.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07002260 },
2261 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07002262 &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.
2263 &quot;familyId&quot;: &quot;A String&quot;, # Identifier of the column family.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07002264 },
2265 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07002266 &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.
2267 &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.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07002268 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002269 &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.
2270 &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.
2271 &quot;fields&quot;: [ # Describes the fields in a table.
Takashi Matsuo06694102015-09-11 13:55:40 -07002272 {
Bu Sun Kim65020912020-05-20 12:08:20 -07002273 &quot;fields&quot;: [ # [Optional] Describes the nested schema fields if the type property is set to RECORD.
Takashi Matsuo06694102015-09-11 13:55:40 -07002274 # Object with schema name: TableFieldSchema
2275 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07002276 &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.
2277 &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).
2278 &quot;categories&quot;: { # [Optional] The categories attached to this field, used for field-level access control.
2279 &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.
2280 &quot;A String&quot;,
Dan O'Mearadd494642020-05-01 07:42:23 -07002281 ],
2282 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002283 &quot;mode&quot;: &quot;A String&quot;, # [Optional] The field mode. Possible values include NULLABLE, REQUIRED and REPEATED. The default value is NULLABLE.
2284 &quot;description&quot;: &quot;A String&quot;, # [Optional] The field description. The maximum length is 1,024 characters.
2285 &quot;policyTags&quot;: {
2286 &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.
2287 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002288 ],
2289 },
Takashi Matsuo06694102015-09-11 13:55:40 -07002290 },
2291 ],
2292 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002293 &quot;hivePartitioningOptions&quot;: { # [Optional, Trusted Tester] Options to configure hive partitioning support.
2294 &quot;sourceUriPrefix&quot;: &quot;A String&quot;, # [Optional, Trusted Tester] 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).
2295 &quot;mode&quot;: &quot;A String&quot;, # [Optional, Trusted Tester] When set, what mode of hive partitioning to use when reading data. Two 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. 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.
2296 },
2297 &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.
2298 &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.
2299 &quot;A String&quot;,
2300 ],
Takashi Matsuo06694102015-09-11 13:55:40 -07002301 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002302 &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.
2303 &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.
2304 &quot;labels&quot;: [
2305 &quot;A String&quot;,
2306 ],
2307 &quot;lossType&quot;: &quot;A String&quot;,
2308 &quot;modelType&quot;: &quot;A String&quot;,
2309 },
2310 &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.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08002311 {
Bu Sun Kim65020912020-05-20 12:08:20 -07002312 &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.
2313 &quot;minRelProgress&quot;: 3.14,
2314 &quot;l2Reg&quot;: 3.14,
2315 &quot;learnRateStrategy&quot;: &quot;A String&quot;,
2316 &quot;warmStart&quot;: True or False,
2317 &quot;lineSearchInitLearnRate&quot;: 3.14,
2318 &quot;earlyStop&quot;: True or False,
2319 &quot;l1Reg&quot;: 3.14,
2320 &quot;maxIteration&quot;: &quot;A String&quot;,
2321 &quot;learnRate&quot;: 3.14,
2322 },
2323 &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.
2324 &quot;iterationResults&quot;: [ # [Output-only, Beta] List of each iteration results.
2325 {
2326 &quot;durationMs&quot;: &quot;A String&quot;, # [Output-only, Beta] Time taken to run the training iteration in milliseconds.
2327 &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.
2328 &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.
2329 &quot;index&quot;: 42, # [Output-only, Beta] Index of the ML training iteration, starting from zero for each training run.
2330 &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.
2331 },
2332 ],
2333 &quot;startTime&quot;: &quot;A String&quot;, # [Output-only, Beta] Training run start time in milliseconds since the epoch.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08002334 },
2335 ],
2336 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002337 &quot;selfLink&quot;: &quot;A String&quot;, # [Output-only] A URL that can be used to access this resource again.
2338 &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.
2339 &quot;kind&quot;: &quot;bigquery#table&quot;, # [Output-only] The type of the resource.
2340 &quot;description&quot;: &quot;A String&quot;, # [Optional] A user-friendly description of this table.
2341 &quot;creationTime&quot;: &quot;A String&quot;, # [Output-only] The time when this table was created, in milliseconds since the epoch.
2342 &quot;rangePartitioning&quot;: { # [TrustedTester] Range partitioning specification for this table. Only one of timePartitioning and rangePartitioning should be specified.
2343 &quot;range&quot;: { # [TrustedTester] [Required] Defines the ranges for range partitioning.
2344 &quot;interval&quot;: &quot;A String&quot;, # [TrustedTester] [Required] The width of each interval.
2345 &quot;start&quot;: &quot;A String&quot;, # [TrustedTester] [Required] The start of range partitioning, inclusive.
2346 &quot;end&quot;: &quot;A String&quot;, # [TrustedTester] [Required] The end of range partitioning, exclusive.
2347 },
2348 &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.
2349 },
2350 &quot;schema&quot;: { # [Optional] Describes the schema of this table.
2351 &quot;fields&quot;: [ # Describes the fields in a table.
2352 {
2353 &quot;fields&quot;: [ # [Optional] Describes the nested schema fields if the type property is set to RECORD.
2354 # Object with schema name: TableFieldSchema
2355 ],
2356 &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.
2357 &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).
2358 &quot;categories&quot;: { # [Optional] The categories attached to this field, used for field-level access control.
2359 &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.
2360 &quot;A String&quot;,
2361 ],
2362 },
2363 &quot;mode&quot;: &quot;A String&quot;, # [Optional] The field mode. Possible values include NULLABLE, REQUIRED and REPEATED. The default value is NULLABLE.
2364 &quot;description&quot;: &quot;A String&quot;, # [Optional] The field description. The maximum length is 1,024 characters.
2365 &quot;policyTags&quot;: {
2366 &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.
2367 &quot;A String&quot;,
2368 ],
2369 },
2370 },
2371 ],
2372 },
2373 &quot;id&quot;: &quot;A String&quot;, # [Output-only] An opaque ID uniquely identifying the table.
2374 &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.
2375 &quot;materializedView&quot;: { # [Optional] Materialized view definition.
2376 &quot;query&quot;: &quot;A String&quot;, # [Required] A query whose result is persisted.
2377 &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;.
2378 &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).
2379 &quot;lastRefreshTime&quot;: &quot;A String&quot;, # [Output-only] [TrustedTester] The time when this materialized view was last modified, in milliseconds since the epoch.
2380 },
2381 &quot;tableReference&quot;: { # [Required] Reference describing the ID of this table.
2382 &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.
2383 &quot;projectId&quot;: &quot;A String&quot;, # [Required] The ID of the project containing this table.
2384 &quot;datasetId&quot;: &quot;A String&quot;, # [Required] The ID of the dataset containing this table.
2385 },
2386 &quot;lastModifiedTime&quot;: &quot;A String&quot;, # [Output-only] The time when this table was last modified, in milliseconds since the epoch.
2387 &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.
2388 &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.
2389 &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.
2390 &quot;A String&quot;,
2391 ],
2392 },
2393 &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. [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.
2394 &quot;view&quot;: { # [Optional] The view definition.
2395 &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.
2396 &quot;query&quot;: &quot;A String&quot;, # [Required] A query that BigQuery executes when the view is referenced.
2397 &quot;userDefinedFunctionResources&quot;: [ # Describes user-defined function resources used in the query.
2398 {
2399 &quot;resourceUri&quot;: &quot;A String&quot;, # [Pick one] A code resource to load from a Google Cloud Storage URI (gs://bucket/path).
2400 &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.
2401 },
2402 ],
2403 },
2404 &quot;numLongTermBytes&quot;: &quot;A String&quot;, # [Output-only] The number of bytes in the table that are considered &quot;long-term storage&quot;.
2405 &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.
2406 &quot;encryptionConfiguration&quot;: { # Custom encryption configuration (e.g., Cloud KMS keys).
2407 &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.
2408 },
2409 &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.
2410 &quot;estimatedBytes&quot;: &quot;A String&quot;, # [Output-only] A lower-bound estimate of the number of bytes currently in the streaming buffer.
2411 &quot;estimatedRows&quot;: &quot;A String&quot;, # [Output-only] A lower-bound estimate of the number of rows currently in the streaming buffer.
2412 &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.
2413 },
2414 &quot;numBytes&quot;: &quot;A String&quot;, # [Output-only] The size of this table in bytes, excluding any data in the streaming buffer.
2415 &quot;location&quot;: &quot;A String&quot;, # [Output-only] The geographic location where the table resides. This value is inherited from the dataset.
2416 &quot;friendlyName&quot;: &quot;A String&quot;, # [Optional] A descriptive name for this table.
2417 &quot;timePartitioning&quot;: { # Time-based partitioning specification for this table. Only one of timePartitioning and rangePartitioning should be specified.
2418 &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.
2419 &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.
2420 &quot;type&quot;: &quot;A String&quot;, # [Required] The only type supported is DAY, which will generate one partition per day.
2421 &quot;requirePartitionFilter&quot;: True or False,
2422 },
2423 &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.
2424 &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.
2425 &quot;a_key&quot;: &quot;A String&quot;,
2426 },
John Asmuth614db982014-04-24 15:46:26 -04002427 }
2428
2429
2430Returns:
2431 An object of the form:
2432
2433 {
Bu Sun Kim65020912020-05-20 12:08:20 -07002434 &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.
2435 &quot;googleSheetsOptions&quot;: { # [Optional] Additional options if sourceFormat is set to GOOGLE_SHEETS.
2436 &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
2437 &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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002438 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002439 &quot;autodetect&quot;: True or False, # Try to detect schema and format options automatically. Any option specified explicitly will be honored.
2440 &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.
2441 &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;.
2442 &quot;csvOptions&quot;: { # Additional properties to set if sourceFormat is set to CSV.
2443 &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.
2444 &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.
2445 &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.
2446 &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.
2447 &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.
2448 &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;).
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002449 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002450 &quot;bigtableOptions&quot;: { # [Optional] Additional options if sourceFormat is set to BIGTABLE.
2451 &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.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07002452 {
Bu Sun Kim65020912020-05-20 12:08:20 -07002453 &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.
2454 &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.
2455 &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.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07002456 {
Bu Sun Kim65020912020-05-20 12:08:20 -07002457 &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.
2458 &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.
2459 &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.
2460 &quot;qualifierString&quot;: &quot;A String&quot;,
2461 &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.
2462 &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.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07002463 },
2464 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07002465 &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.
2466 &quot;familyId&quot;: &quot;A String&quot;, # Identifier of the column family.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07002467 },
2468 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07002469 &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.
2470 &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.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07002471 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002472 &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.
2473 &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.
2474 &quot;fields&quot;: [ # Describes the fields in a table.
Takashi Matsuo06694102015-09-11 13:55:40 -07002475 {
Bu Sun Kim65020912020-05-20 12:08:20 -07002476 &quot;fields&quot;: [ # [Optional] Describes the nested schema fields if the type property is set to RECORD.
Takashi Matsuo06694102015-09-11 13:55:40 -07002477 # Object with schema name: TableFieldSchema
2478 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07002479 &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.
2480 &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).
2481 &quot;categories&quot;: { # [Optional] The categories attached to this field, used for field-level access control.
2482 &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.
2483 &quot;A String&quot;,
Dan O'Mearadd494642020-05-01 07:42:23 -07002484 ],
2485 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002486 &quot;mode&quot;: &quot;A String&quot;, # [Optional] The field mode. Possible values include NULLABLE, REQUIRED and REPEATED. The default value is NULLABLE.
2487 &quot;description&quot;: &quot;A String&quot;, # [Optional] The field description. The maximum length is 1,024 characters.
2488 &quot;policyTags&quot;: {
2489 &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.
2490 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002491 ],
2492 },
Takashi Matsuo06694102015-09-11 13:55:40 -07002493 },
2494 ],
2495 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002496 &quot;hivePartitioningOptions&quot;: { # [Optional, Trusted Tester] Options to configure hive partitioning support.
2497 &quot;sourceUriPrefix&quot;: &quot;A String&quot;, # [Optional, Trusted Tester] 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).
2498 &quot;mode&quot;: &quot;A String&quot;, # [Optional, Trusted Tester] When set, what mode of hive partitioning to use when reading data. Two 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. 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.
2499 },
2500 &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.
2501 &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.
2502 &quot;A String&quot;,
2503 ],
Takashi Matsuo06694102015-09-11 13:55:40 -07002504 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002505 &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.
2506 &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.
2507 &quot;labels&quot;: [
2508 &quot;A String&quot;,
2509 ],
2510 &quot;lossType&quot;: &quot;A String&quot;,
2511 &quot;modelType&quot;: &quot;A String&quot;,
2512 },
2513 &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.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08002514 {
Bu Sun Kim65020912020-05-20 12:08:20 -07002515 &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.
2516 &quot;minRelProgress&quot;: 3.14,
2517 &quot;l2Reg&quot;: 3.14,
2518 &quot;learnRateStrategy&quot;: &quot;A String&quot;,
2519 &quot;warmStart&quot;: True or False,
2520 &quot;lineSearchInitLearnRate&quot;: 3.14,
2521 &quot;earlyStop&quot;: True or False,
2522 &quot;l1Reg&quot;: 3.14,
2523 &quot;maxIteration&quot;: &quot;A String&quot;,
2524 &quot;learnRate&quot;: 3.14,
2525 },
2526 &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.
2527 &quot;iterationResults&quot;: [ # [Output-only, Beta] List of each iteration results.
2528 {
2529 &quot;durationMs&quot;: &quot;A String&quot;, # [Output-only, Beta] Time taken to run the training iteration in milliseconds.
2530 &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.
2531 &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.
2532 &quot;index&quot;: 42, # [Output-only, Beta] Index of the ML training iteration, starting from zero for each training run.
2533 &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.
2534 },
2535 ],
2536 &quot;startTime&quot;: &quot;A String&quot;, # [Output-only, Beta] Training run start time in milliseconds since the epoch.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08002537 },
2538 ],
2539 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002540 &quot;selfLink&quot;: &quot;A String&quot;, # [Output-only] A URL that can be used to access this resource again.
2541 &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.
2542 &quot;kind&quot;: &quot;bigquery#table&quot;, # [Output-only] The type of the resource.
2543 &quot;description&quot;: &quot;A String&quot;, # [Optional] A user-friendly description of this table.
2544 &quot;creationTime&quot;: &quot;A String&quot;, # [Output-only] The time when this table was created, in milliseconds since the epoch.
2545 &quot;rangePartitioning&quot;: { # [TrustedTester] Range partitioning specification for this table. Only one of timePartitioning and rangePartitioning should be specified.
2546 &quot;range&quot;: { # [TrustedTester] [Required] Defines the ranges for range partitioning.
2547 &quot;interval&quot;: &quot;A String&quot;, # [TrustedTester] [Required] The width of each interval.
2548 &quot;start&quot;: &quot;A String&quot;, # [TrustedTester] [Required] The start of range partitioning, inclusive.
2549 &quot;end&quot;: &quot;A String&quot;, # [TrustedTester] [Required] The end of range partitioning, exclusive.
2550 },
2551 &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.
2552 },
2553 &quot;schema&quot;: { # [Optional] Describes the schema of this table.
2554 &quot;fields&quot;: [ # Describes the fields in a table.
2555 {
2556 &quot;fields&quot;: [ # [Optional] Describes the nested schema fields if the type property is set to RECORD.
2557 # Object with schema name: TableFieldSchema
2558 ],
2559 &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.
2560 &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).
2561 &quot;categories&quot;: { # [Optional] The categories attached to this field, used for field-level access control.
2562 &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.
2563 &quot;A String&quot;,
2564 ],
2565 },
2566 &quot;mode&quot;: &quot;A String&quot;, # [Optional] The field mode. Possible values include NULLABLE, REQUIRED and REPEATED. The default value is NULLABLE.
2567 &quot;description&quot;: &quot;A String&quot;, # [Optional] The field description. The maximum length is 1,024 characters.
2568 &quot;policyTags&quot;: {
2569 &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.
2570 &quot;A String&quot;,
2571 ],
2572 },
2573 },
2574 ],
2575 },
2576 &quot;id&quot;: &quot;A String&quot;, # [Output-only] An opaque ID uniquely identifying the table.
2577 &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.
2578 &quot;materializedView&quot;: { # [Optional] Materialized view definition.
2579 &quot;query&quot;: &quot;A String&quot;, # [Required] A query whose result is persisted.
2580 &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;.
2581 &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).
2582 &quot;lastRefreshTime&quot;: &quot;A String&quot;, # [Output-only] [TrustedTester] The time when this materialized view was last modified, in milliseconds since the epoch.
2583 },
2584 &quot;tableReference&quot;: { # [Required] Reference describing the ID of this table.
2585 &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.
2586 &quot;projectId&quot;: &quot;A String&quot;, # [Required] The ID of the project containing this table.
2587 &quot;datasetId&quot;: &quot;A String&quot;, # [Required] The ID of the dataset containing this table.
2588 },
2589 &quot;lastModifiedTime&quot;: &quot;A String&quot;, # [Output-only] The time when this table was last modified, in milliseconds since the epoch.
2590 &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.
2591 &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.
2592 &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.
2593 &quot;A String&quot;,
2594 ],
2595 },
2596 &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. [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.
2597 &quot;view&quot;: { # [Optional] The view definition.
2598 &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.
2599 &quot;query&quot;: &quot;A String&quot;, # [Required] A query that BigQuery executes when the view is referenced.
2600 &quot;userDefinedFunctionResources&quot;: [ # Describes user-defined function resources used in the query.
2601 {
2602 &quot;resourceUri&quot;: &quot;A String&quot;, # [Pick one] A code resource to load from a Google Cloud Storage URI (gs://bucket/path).
2603 &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.
2604 },
2605 ],
2606 },
2607 &quot;numLongTermBytes&quot;: &quot;A String&quot;, # [Output-only] The number of bytes in the table that are considered &quot;long-term storage&quot;.
2608 &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.
2609 &quot;encryptionConfiguration&quot;: { # Custom encryption configuration (e.g., Cloud KMS keys).
2610 &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.
2611 },
2612 &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.
2613 &quot;estimatedBytes&quot;: &quot;A String&quot;, # [Output-only] A lower-bound estimate of the number of bytes currently in the streaming buffer.
2614 &quot;estimatedRows&quot;: &quot;A String&quot;, # [Output-only] A lower-bound estimate of the number of rows currently in the streaming buffer.
2615 &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.
2616 },
2617 &quot;numBytes&quot;: &quot;A String&quot;, # [Output-only] The size of this table in bytes, excluding any data in the streaming buffer.
2618 &quot;location&quot;: &quot;A String&quot;, # [Output-only] The geographic location where the table resides. This value is inherited from the dataset.
2619 &quot;friendlyName&quot;: &quot;A String&quot;, # [Optional] A descriptive name for this table.
2620 &quot;timePartitioning&quot;: { # Time-based partitioning specification for this table. Only one of timePartitioning and rangePartitioning should be specified.
2621 &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.
2622 &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.
2623 &quot;type&quot;: &quot;A String&quot;, # [Required] The only type supported is DAY, which will generate one partition per day.
2624 &quot;requirePartitionFilter&quot;: True or False,
2625 },
2626 &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.
2627 &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.
2628 &quot;a_key&quot;: &quot;A String&quot;,
2629 },
John Asmuth614db982014-04-24 15:46:26 -04002630 }</pre>
2631</div>
2632
2633</body></html>