John Asmuth | 614db98 | 2014-04-24 15:46:26 -0400 | [diff] [blame] | 1 | <html><body> |
| 2 | <style> |
| 3 | |
| 4 | body, 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 | |
| 15 | body { |
| 16 | font-size: 13px; |
| 17 | padding: 1em; |
| 18 | } |
| 19 | |
| 20 | h1 { |
| 21 | font-size: 26px; |
| 22 | margin-bottom: 1em; |
| 23 | } |
| 24 | |
| 25 | h2 { |
| 26 | font-size: 24px; |
| 27 | margin-bottom: 1em; |
| 28 | } |
| 29 | |
| 30 | h3 { |
| 31 | font-size: 20px; |
| 32 | margin-bottom: 1em; |
| 33 | margin-top: 1em; |
| 34 | } |
| 35 | |
| 36 | pre, code { |
| 37 | line-height: 1.5; |
| 38 | font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace; |
| 39 | } |
| 40 | |
| 41 | pre { |
| 42 | margin-top: 0.5em; |
| 43 | } |
| 44 | |
| 45 | h1, h2, h3, p { |
| 46 | font-family: Arial, sans serif; |
| 47 | } |
| 48 | |
| 49 | h1, h2, h3 { |
| 50 | border-bottom: solid #CCC 1px; |
| 51 | } |
| 52 | |
| 53 | .toc_element { |
| 54 | margin-top: 0.5em; |
| 55 | } |
| 56 | |
| 57 | .firstline { |
| 58 | margin-left: 2 em; |
| 59 | } |
| 60 | |
| 61 | .method { |
| 62 | margin-top: 1em; |
| 63 | border: solid 1px #CCC; |
| 64 | padding: 1em; |
| 65 | background: #EEE; |
| 66 | } |
| 67 | |
| 68 | .details { |
| 69 | font-weight: bold; |
| 70 | font-size: 14px; |
| 71 | } |
| 72 | |
| 73 | </style> |
| 74 | |
| 75 | <h1><a href="bigquery_v2.html">BigQuery API</a> . <a href="bigquery_v2.tables.html">tables</a></h1> |
| 76 | <h2>Instance Methods</h2> |
| 77 | <p class="toc_element"> |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 78 | <code><a href="#close">close()</a></code></p> |
| 79 | <p class="firstline">Close httplib2 connections.</p> |
| 80 | <p class="toc_element"> |
John Asmuth | 614db98 | 2014-04-24 15:46:26 -0400 | [diff] [blame] | 81 | <code><a href="#delete">delete(projectId, datasetId, tableId)</a></code></p> |
| 82 | <p class="firstline">Deletes the table specified by tableId from the dataset. If the table contains data, all the data will be deleted.</p> |
| 83 | <p class="toc_element"> |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 84 | <code><a href="#get">get(projectId, datasetId, tableId, selectedFields=None)</a></code></p> |
John Asmuth | 614db98 | 2014-04-24 15:46:26 -0400 | [diff] [blame] | 85 | <p class="firstline">Gets the specified table resource by table ID. This method does not return the data in the table, it only returns the table resource, which describes the structure of this table.</p> |
| 86 | <p class="toc_element"> |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 87 | <code><a href="#getIamPolicy">getIamPolicy(resource, body=None)</a></code></p> |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 88 | <p class="firstline">Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.</p> |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 89 | <p class="toc_element"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 90 | <code><a href="#insert">insert(projectId, datasetId, body=None)</a></code></p> |
John Asmuth | 614db98 | 2014-04-24 15:46:26 -0400 | [diff] [blame] | 91 | <p class="firstline">Creates a new, empty table in the dataset.</p> |
| 92 | <p class="toc_element"> |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame^] | 93 | <code><a href="#list">list(projectId, datasetId, maxResults=None, pageToken=None)</a></code></p> |
Nathaniel Manista | 4f877e5 | 2015-06-15 16:44:50 +0000 | [diff] [blame] | 94 | <p class="firstline">Lists all tables in the specified dataset. Requires the READER dataset role.</p> |
John Asmuth | 614db98 | 2014-04-24 15:46:26 -0400 | [diff] [blame] | 95 | <p class="toc_element"> |
| 96 | <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p> |
| 97 | <p class="firstline">Retrieves the next page of results.</p> |
| 98 | <p class="toc_element"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 99 | <code><a href="#patch">patch(projectId, datasetId, tableId, body=None)</a></code></p> |
John Asmuth | 614db98 | 2014-04-24 15:46:26 -0400 | [diff] [blame] | 100 | <p class="firstline">Updates information in an existing table. The update method replaces the entire table resource, whereas the patch method only replaces fields that are provided in the submitted table resource. This method supports patch semantics.</p> |
| 101 | <p class="toc_element"> |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 102 | <code><a href="#setIamPolicy">setIamPolicy(resource, body=None)</a></code></p> |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 103 | <p class="firstline">Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.</p> |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 104 | <p class="toc_element"> |
| 105 | <code><a href="#testIamPermissions">testIamPermissions(resource, body=None)</a></code></p> |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 106 | <p class="firstline">Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may "fail open" without warning.</p> |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 107 | <p class="toc_element"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 108 | <code><a href="#update">update(projectId, datasetId, tableId, body=None)</a></code></p> |
John Asmuth | 614db98 | 2014-04-24 15:46:26 -0400 | [diff] [blame] | 109 | <p class="firstline">Updates information in an existing table. The update method replaces the entire table resource, whereas the patch method only replaces fields that are provided in the submitted table resource.</p> |
| 110 | <h3>Method Details</h3> |
| 111 | <div class="method"> |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 112 | <code class="details" id="close">close()</code> |
| 113 | <pre>Close httplib2 connections.</pre> |
| 114 | </div> |
| 115 | |
| 116 | <div class="method"> |
John Asmuth | 614db98 | 2014-04-24 15:46:26 -0400 | [diff] [blame] | 117 | <code class="details" id="delete">delete(projectId, datasetId, tableId)</code> |
| 118 | <pre>Deletes the table specified by tableId from the dataset. If the table contains data, all the data will be deleted. |
| 119 | |
| 120 | Args: |
| 121 | projectId: string, Project ID of the table to delete (required) |
| 122 | datasetId: string, Dataset ID of the table to delete (required) |
| 123 | tableId: string, Table ID of the table to delete (required) |
| 124 | </pre> |
| 125 | </div> |
| 126 | |
| 127 | <div class="method"> |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 128 | <code class="details" id="get">get(projectId, datasetId, tableId, selectedFields=None)</code> |
John Asmuth | 614db98 | 2014-04-24 15:46:26 -0400 | [diff] [blame] | 129 | <pre>Gets the specified table resource by table ID. This method does not return the data in the table, it only returns the table resource, which describes the structure of this table. |
| 130 | |
| 131 | Args: |
| 132 | projectId: string, Project ID of the requested table (required) |
| 133 | datasetId: string, Dataset ID of the requested table (required) |
| 134 | tableId: string, Table ID of the requested table (required) |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 135 | selectedFields: string, List of fields to return (comma-separated). If unspecified, all fields are returned |
John Asmuth | 614db98 | 2014-04-24 15:46:26 -0400 | [diff] [blame] | 136 | |
| 137 | Returns: |
| 138 | An object of the form: |
| 139 | |
| 140 | { |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame^] | 141 | "view": { # [Optional] The view definition. |
| 142 | "userDefinedFunctionResources": [ # Describes user-defined function resources used in the query. |
| 143 | { # This is used for defining User Defined Function (UDF) resources only when using legacy SQL. Users of Standard SQL should leverage either DDL (e.g. CREATE [TEMPORARY] FUNCTION ... ) or the Routines API to define UDF resources. For additional information on migrating, see: https://cloud.google.com/bigquery/docs/reference/standard-sql/migrating-from-legacy-sql#differences_in_user-defined_javascript_functions |
| 144 | "inlineCode": "A String", # [Pick one] An inline resource that contains code for a user-defined function (UDF). Providing a inline code resource is equivalent to providing a URI for a file containing the same code. |
| 145 | "resourceUri": "A String", # [Pick one] A code resource to load from a Google Cloud Storage URI (gs://bucket/path). |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 146 | }, |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame^] | 147 | ], |
| 148 | "query": "A String", # [Required] A query that BigQuery executes when the view is referenced. |
| 149 | "useLegacySql": True or False, # Specifies whether to use BigQuery's legacy SQL for this view. The default value is true. If set to false, the view will use BigQuery's standard SQL: https://cloud.google.com/bigquery/sql-reference/ Queries and views that reference this view must use the same flag value. |
| 150 | }, |
| 151 | "selfLink": "A String", # [Output-only] A URL that can be used to access this resource again. |
| 152 | "type": "A String", # [Output-only] Describes the table type. The following values are supported: TABLE: A normal BigQuery table. VIEW: A virtual table defined by a SQL query. SNAPSHOT: An immutable, read-only table that is a copy of another table. [TrustedTester] MATERIALIZED_VIEW: SQL query whose result is persisted. EXTERNAL: A table that references data stored in an external storage system, such as Google Cloud Storage. The default value is TABLE. |
| 153 | "friendlyName": "A String", # [Optional] A descriptive name for this table. |
| 154 | "streamingBuffer": { # [Output-only] Contains information regarding this table'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. |
| 155 | "estimatedRows": "A String", # [Output-only] A lower-bound estimate of the number of rows currently in the streaming buffer. |
| 156 | "estimatedBytes": "A String", # [Output-only] A lower-bound estimate of the number of bytes currently in the streaming buffer. |
| 157 | "oldestEntryTime": "A String", # [Output-only] Contains the timestamp of the oldest entry in the streaming buffer, in milliseconds since the epoch, if the streaming buffer is available. |
| 158 | }, |
| 159 | "etag": "A String", # [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. |
| 160 | "labels": { # 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. |
| 161 | "a_key": "A String", |
| 162 | }, |
| 163 | "tableReference": { # [Required] Reference describing the ID of this table. |
| 164 | "tableId": "A String", # [Required] The ID of the table. The ID must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_). The maximum length is 1,024 characters. |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 165 | "datasetId": "A String", # [Required] The ID of the dataset containing this table. |
| 166 | "projectId": "A String", # [Required] The ID of the project containing this table. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 167 | }, |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame^] | 168 | "model": { # [Output-only, Beta] Present iff this table represents a ML model. Describes the training information for the model, and it is required to run 'PREDICT' queries. |
| 169 | "modelOptions": { # [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. |
| 170 | "lossType": "A String", |
| 171 | "modelType": "A String", |
| 172 | "labels": [ |
| 173 | "A String", |
| 174 | ], |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 175 | }, |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame^] | 176 | "trainingRuns": [ # [Output-only, Beta] Information about ml training runs, each training run comprises of multiple iterations and there may be multiple training runs for the model if warm start is used or if a user decides to continue a previously cancelled query. |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 177 | { |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame^] | 178 | "trainingOptions": { # [Output-only, Beta] Training options used by this training run. These options are mutable for subsequent training runs. Default values are explicitly stored for options not specified in the input query of the first training run. For subsequent training runs, any option not explicitly specified in the input query will be copied from the previous training run. |
| 179 | "l1Reg": 3.14, |
| 180 | "lineSearchInitLearnRate": 3.14, |
| 181 | "earlyStop": True or False, |
| 182 | "l2Reg": 3.14, |
| 183 | "learnRateStrategy": "A String", |
| 184 | "learnRate": 3.14, |
| 185 | "maxIteration": "A String", |
| 186 | "minRelProgress": 3.14, |
| 187 | "warmStart": True or False, |
| 188 | }, |
| 189 | "state": "A String", # [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. |
| 190 | "startTime": "A String", # [Output-only, Beta] Training run start time in milliseconds since the epoch. |
| 191 | "iterationResults": [ # [Output-only, Beta] List of each iteration results. |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 192 | { |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame^] | 193 | "index": 42, # [Output-only, Beta] Index of the ML training iteration, starting from zero for each training run. |
| 194 | "learnRate": 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. |
| 195 | "trainingLoss": 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. |
| 196 | "durationMs": "A String", # [Output-only, Beta] Time taken to run the training iteration in milliseconds. |
| 197 | "evalLoss": 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. |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 198 | }, |
| 199 | ], |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 200 | }, |
| 201 | ], |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 202 | }, |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame^] | 203 | "encryptionConfiguration": { # Custom encryption configuration (e.g., Cloud KMS keys). |
| 204 | "kmsKeyName": "A String", # [Optional] Describes the Cloud KMS encryption key that will be used to protect destination BigQuery table. The BigQuery Service Account associated with your project requires access to this encryption key. |
| 205 | }, |
| 206 | "snapshotDefinition": { # [Output-only] Snapshot definition. |
| 207 | "baseTableReference": { # [Required] Reference describing the ID of the table that is snapshotted. |
| 208 | "tableId": "A String", # [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. |
| 209 | "datasetId": "A String", # [Required] The ID of the dataset containing this table. |
| 210 | "projectId": "A String", # [Required] The ID of the project containing this table. |
| 211 | }, |
| 212 | "snapshotTime": "A String", # [Required] The time at which the base table was snapshot. |
| 213 | }, |
| 214 | "expirationTime": "A String", # [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. |
| 215 | "numBytes": "A String", # [Output-only] The size of this table in bytes, excluding any data in the streaming buffer. |
| 216 | "id": "A String", # [Output-only] An opaque ID uniquely identifying the table. |
| 217 | "numRows": "A String", # [Output-only] The number of rows of data in this table, excluding any data in the streaming buffer. |
| 218 | "timePartitioning": { # Time-based partitioning specification for this table. Only one of timePartitioning and rangePartitioning should be specified. |
| 219 | "type": "A String", # [Required] The supported types are DAY, HOUR, MONTH, and YEAR, which will generate one partition per day, hour, month, and year, respectively. When the type is not specified, the default behavior is DAY. |
| 220 | "expirationMs": "A String", # [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. |
| 221 | "field": "A String", # [Beta] [Optional] If not set, the table is partitioned by pseudo column, referenced via either '_PARTITIONTIME' as TIMESTAMP type, or '_PARTITIONDATE' 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. |
| 222 | "requirePartitionFilter": True or False, |
| 223 | }, |
| 224 | "numPhysicalBytes": "A String", # [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. |
| 225 | "lastModifiedTime": "A String", # [Output-only] The time when this table was last modified, in milliseconds since the epoch. |
| 226 | "requirePartitionFilter": false, # [Optional] If set to true, queries over this table require a partition filter that can be used for partition elimination to be specified. |
| 227 | "materializedView": { # [Optional] Materialized view definition. |
| 228 | "refreshIntervalMs": "A String", # [Optional] [TrustedTester] The maximum frequency at which this materialized view will be refreshed. The default value is "1800000" (30 minutes). |
| 229 | "lastRefreshTime": "A String", # [Output-only] [TrustedTester] The time when this materialized view was last modified, in milliseconds since the epoch. |
| 230 | "enableRefresh": True or False, # [Optional] [TrustedTester] Enable automatic refresh of the materialized view when the base table is updated. The default value is "true". |
| 231 | "query": "A String", # [Required] A query whose result is persisted. |
| 232 | }, |
| 233 | "numLongTermBytes": "A String", # [Output-only] The number of bytes in the table that are considered "long-term storage". |
| 234 | "rangePartitioning": { # [TrustedTester] Range partitioning specification for this table. Only one of timePartitioning and rangePartitioning should be specified. |
| 235 | "range": { # [TrustedTester] [Required] Defines the ranges for range partitioning. |
| 236 | "start": "A String", # [TrustedTester] [Required] The start of range partitioning, inclusive. |
| 237 | "end": "A String", # [TrustedTester] [Required] The end of range partitioning, exclusive. |
| 238 | "interval": "A String", # [TrustedTester] [Required] The width of each interval. |
| 239 | }, |
| 240 | "field": "A String", # [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. |
| 241 | }, |
| 242 | "clustering": { # [Beta] Clustering specification for the table. Must be specified with partitioning, data in the table will be first partitioned and subsequently clustered. |
| 243 | "fields": [ # [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. |
| 244 | "A String", |
| 245 | ], |
| 246 | }, |
| 247 | "externalDataConfiguration": { # [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. |
| 248 | "sourceFormat": "A String", # [Required] The data format. For CSV files, specify "CSV". For Google sheets, specify "GOOGLE_SHEETS". For newline-delimited JSON, specify "NEWLINE_DELIMITED_JSON". For Avro files, specify "AVRO". For Google Cloud Datastore backups, specify "DATASTORE_BACKUP". [Beta] For Google Cloud Bigtable, specify "BIGTABLE". |
| 249 | "schema": { # [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. |
| 250 | "fields": [ # Describes the fields in a table. |
| 251 | { |
| 252 | "categories": { # [Optional] The categories attached to this field, used for field-level access control. |
| 253 | "names": [ # A list of category resource names. For example, "projects/1/taxonomies/2/categories/3". At most 5 categories are allowed. |
| 254 | "A String", |
| 255 | ], |
| 256 | }, |
| 257 | "policyTags": { |
| 258 | "names": [ # A list of category resource names. For example, "projects/1/location/eu/taxonomies/2/policyTags/3". At most 1 policy tag is allowed. |
| 259 | "A String", |
| 260 | ], |
| 261 | }, |
| 262 | "name": "A String", # [Required] The field name. The name must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_), and must start with a letter or underscore. The maximum length is 128 characters. |
| 263 | "type": "A String", # [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). |
| 264 | "fields": [ # [Optional] Describes the nested schema fields if the type property is set to RECORD. |
| 265 | # Object with schema name: TableFieldSchema |
| 266 | ], |
| 267 | "description": "A String", # [Optional] The field description. The maximum length is 1,024 characters. |
| 268 | "mode": "A String", # [Optional] The field mode. Possible values include NULLABLE, REQUIRED and REPEATED. The default value is NULLABLE. |
| 269 | }, |
| 270 | ], |
| 271 | }, |
| 272 | "ignoreUnknownValues": 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'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. |
| 273 | "maxBadRecords": 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. |
| 274 | "hivePartitioningOptions": { # [Optional, Trusted Tester] Options to configure hive partitioning support. |
| 275 | "sourceUriPrefix": "A String", # [Optional] When hive partition detection is requested, a common prefix for all source uris should be supplied. The prefix must end immediately before the partition key encoding begins. For example, consider files following this data layout. gs://bucket/path_to_table/dt=2019-01-01/country=BR/id=7/file.avro gs://bucket/path_to_table/dt=2018-12-31/country=CA/id=3/file.avro When hive partitioning is requested with either AUTO or STRINGS detection, the common prefix can be either of gs://bucket/path_to_table or gs://bucket/path_to_table/ (trailing slash does not matter). |
| 276 | "requirePartitionFilter": True or False, # [Optional] If set to true, queries over this table require a partition filter that can be used for partition elimination to be specified. Note that this field should only be true when creating a permanent external table or querying a temporary external table. Hive-partitioned loads with requirePartitionFilter explicitly set to true will fail. |
| 277 | "mode": "A String", # [Optional] When set, what mode of hive partitioning to use when reading data. The following modes are supported. (1) AUTO: automatically infer partition key name(s) and type(s). (2) STRINGS: automatically infer partition key name(s). All types are interpreted as strings. (3) CUSTOM: partition key schema is encoded in the source URI prefix. Not all storage formats support hive partitioning. Requesting hive partitioning on an unsupported format will lead to an error. Currently supported types include: AVRO, CSV, JSON, ORC and Parquet. |
| 278 | }, |
| 279 | "connectionId": "A String", # [Optional, Trusted Tester] Connection for external data source. |
| 280 | "sourceUris": [ # [Required] The fully-qualified URIs that point to your data in Google Cloud. For Google Cloud Storage URIs: Each URI can contain one '*' wildcard character and it must come after the 'bucket' name. Size limits related to load jobs apply to external data sources. For Google Cloud Bigtable URIs: Exactly one URI can be specified and it has be a fully specified and valid HTTPS URL for a Google Cloud Bigtable table. For Google Cloud Datastore backups, exactly one URI can be specified. Also, the '*' wildcard character is not allowed. |
| 281 | "A String", |
| 282 | ], |
| 283 | "googleSheetsOptions": { # [Optional] Additional options if sourceFormat is set to GOOGLE_SHEETS. |
| 284 | "skipLeadingRows": "A String", # [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 > 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. |
| 285 | "range": "A String", # [Optional] Range of a sheet to query from. Only used when non-empty. Typical format: sheet_name!top_left_cell_id:bottom_right_cell_id For example: sheet1!A1:B20 |
| 286 | }, |
| 287 | "autodetect": True or False, # Try to detect schema and format options automatically. Any option specified explicitly will be honored. |
| 288 | "compression": "A String", # [Optional] The compression type of the data source. Possible values include GZIP and NONE. The default value is NONE. This setting is ignored for Google Cloud Bigtable, Google Cloud Datastore backups and Avro formats. |
| 289 | "csvOptions": { # Additional properties to set if sourceFormat is set to CSV. |
| 290 | "encoding": "A String", # [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. |
| 291 | "quote": """, # [Optional] The value that is used to quote data sections in a CSV file. BigQuery converts the string to ISO-8859-1 encoding, and then uses the first byte of the encoded string to split the data in its raw, binary state. The default value is a double-quote ('"'). If your data does not contain quoted sections, set the property value to an empty string. If your data contains quoted newline characters, you must also set the allowQuotedNewlines property to true. |
| 292 | "skipLeadingRows": "A String", # [Optional] The number of rows at the top of a CSV file that BigQuery will skip when reading the data. The default value is 0. This property is useful if you have header rows in the file that should be skipped. When autodetect is on, the behavior is the following: * skipLeadingRows unspecified - Autodetect tries to detect headers in the first row. If they are not detected, the row is read as data. Otherwise data is read starting from the second row. * skipLeadingRows is 0 - Instructs autodetect that there are no headers and data should be read starting from the first row. * skipLeadingRows = N > 0 - Autodetect skips N-1 rows and tries to detect headers in row N. If headers are not detected, row N is just skipped. Otherwise row N is used to extract column names for the detected schema. |
| 293 | "allowJaggedRows": 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. |
| 294 | "allowQuotedNewlines": 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. |
| 295 | "fieldDelimiter": "A String", # [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 "\t" to specify a tab separator. The default value is a comma (','). |
| 296 | }, |
| 297 | "bigtableOptions": { # [Optional] Additional options if sourceFormat is set to BIGTABLE. |
| 298 | "readRowkeyAsString": 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. |
| 299 | "ignoreUnspecifiedColumnFamilies": 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. |
| 300 | "columnFamilies": [ # [Optional] List of column families to expose in the table schema along with their types. This list restricts the column families that can be referenced in queries and specifies their value types. You can use this list to do type conversions - see the 'type' field for more details. If you leave this list empty, all column families are present in the table schema and their values are read as BYTES. During a query only the column families referenced in that query are read from Bigtable. |
| 301 | { |
| 302 | "onlyReadLatest": 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 'columns' and specifying a different setting for that column. |
| 303 | "encoding": "A String", # [Optional] The encoding of the values when the type is not STRING. Acceptable encoding values are: TEXT - indicates values are alphanumeric text strings. BINARY - indicates values are encoded using HBase Bytes.toBytes family of functions. This can be overridden for a specific column by listing that column in 'columns' and specifying an encoding for it. |
| 304 | "columns": [ # [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. |
| 305 | { |
| 306 | "fieldName": "A String", # [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. |
| 307 | "qualifierString": "A String", |
| 308 | "onlyReadLatest": True or False, # [Optional] If this is set, only the latest version of value in this column are exposed. 'onlyReadLatest' can also be set at the column family level. However, the setting at this level takes precedence if 'onlyReadLatest' is set at both levels. |
| 309 | "type": "A String", # [Optional] The type to convert the value in cells of this column. The values are expected to be encoded using HBase Bytes.toBytes function when using the BINARY encoding value. Following BigQuery types are allowed (case-sensitive) - BYTES STRING INTEGER FLOAT BOOLEAN Default type is BYTES. 'type' can also be set at the column family level. However, the setting at this level takes precedence if 'type' is set at both levels. |
| 310 | "encoding": "A String", # [Optional] The encoding of the values when the type is not STRING. Acceptable encoding values are: TEXT - indicates values are alphanumeric text strings. BINARY - indicates values are encoded using HBase Bytes.toBytes family of functions. 'encoding' can also be set at the column family level. However, the setting at this level takes precedence if 'encoding' is set at both levels. |
| 311 | "qualifierEncoded": "A String", # [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. |
| 312 | }, |
| 313 | ], |
| 314 | "type": "A String", # [Optional] The type to convert the value in cells of this column family. The values are expected to be encoded using HBase Bytes.toBytes function when using the BINARY encoding value. Following BigQuery types are allowed (case-sensitive) - BYTES STRING INTEGER FLOAT BOOLEAN Default type is BYTES. This can be overridden for a specific column by listing that column in 'columns' and specifying a type for it. |
| 315 | "familyId": "A String", # Identifier of the column family. |
| 316 | }, |
| 317 | ], |
| 318 | }, |
| 319 | }, |
| 320 | "description": "A String", # [Optional] A user-friendly description of this table. |
| 321 | "creationTime": "A String", # [Output-only] The time when this table was created, in milliseconds since the epoch. |
| 322 | "schema": { # [Optional] Describes the schema of this table. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 323 | "fields": [ # Describes the fields in a table. |
| 324 | { |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 325 | "categories": { # [Optional] The categories attached to this field, used for field-level access control. |
| 326 | "names": [ # A list of category resource names. For example, "projects/1/taxonomies/2/categories/3". At most 5 categories are allowed. |
| 327 | "A String", |
| 328 | ], |
| 329 | }, |
| 330 | "policyTags": { |
| 331 | "names": [ # A list of category resource names. For example, "projects/1/location/eu/taxonomies/2/policyTags/3". At most 1 policy tag is allowed. |
| 332 | "A String", |
| 333 | ], |
| 334 | }, |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 335 | "name": "A String", # [Required] The field name. The name must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_), and must start with a letter or underscore. The maximum length is 128 characters. |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame^] | 336 | "type": "A String", # [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). |
| 337 | "fields": [ # [Optional] Describes the nested schema fields if the type property is set to RECORD. |
| 338 | # Object with schema name: TableFieldSchema |
| 339 | ], |
| 340 | "description": "A String", # [Optional] The field description. The maximum length is 1,024 characters. |
| 341 | "mode": "A String", # [Optional] The field mode. Possible values include NULLABLE, REQUIRED and REPEATED. The default value is NULLABLE. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 342 | }, |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 343 | ], |
| 344 | }, |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame^] | 345 | "location": "A String", # [Output-only] The geographic location where the table resides. This value is inherited from the dataset. |
| 346 | "kind": "bigquery#table", # [Output-only] The type of the resource. |
| 347 | }</pre> |
John Asmuth | 614db98 | 2014-04-24 15:46:26 -0400 | [diff] [blame] | 348 | </div> |
| 349 | |
| 350 | <div class="method"> |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 351 | <code class="details" id="getIamPolicy">getIamPolicy(resource, body=None)</code> |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 352 | <pre>Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 353 | |
| 354 | Args: |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 355 | resource: string, REQUIRED: The resource for which the policy is being requested. See the operation documentation for the appropriate value for this field. (required) |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 356 | body: object, The request body. |
| 357 | The object takes the form of: |
| 358 | |
| 359 | { # Request message for `GetIamPolicy` method. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 360 | "options": { # Encapsulates settings provided to GetIamPolicy. # OPTIONAL: A `GetPolicyOptions` object for specifying options to `GetIamPolicy`. |
| 361 | "requestedPolicyVersion": 42, # Optional. The policy format version to be returned. Valid values are 0, 1, and 3. Requests specifying an invalid value will be rejected. Requests for policies with any conditional bindings must specify version 3. Policies without any conditional bindings may specify any valid value or leave the field unset. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 362 | }, |
| 363 | } |
| 364 | |
| 365 | |
| 366 | Returns: |
| 367 | An object of the form: |
| 368 | |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 369 | { # An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources. A `Policy` is a collection of `bindings`. A `binding` binds one or more `members` to a single `role`. Members can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role. For some types of Google Cloud resources, a `binding` can also specify a `condition`, which is a logical expression that allows access to a resource only if the expression evaluates to `true`. A condition can add constraints based on attributes of the request, the resource, or both. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). **JSON example:** { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 } **YAML example:** bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') - etag: BwWWja0YfJA= - version: 3 For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/). |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 370 | "bindings": [ # Associates a list of `members` to a `role`. Optionally, may specify a `condition` that determines how and when the `bindings` are applied. Each of the `bindings` must contain at least one member. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 371 | { # Associates `members` with a `role`. |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame^] | 372 | "bindingId": "A String", |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 373 | "members": [ # Specifies the identities requesting access for a Cloud Platform resource. `members` can have the following values: * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account. * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account. * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` . * `serviceAccount:{emailid}`: An email address that represents a service account. For example, `my-other-app@appspot.gserviceaccount.com`. * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`. * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a user that has been recently deleted. For example, `alice@example.com?uid=123456789012345678901`. If the user is recovered, this value reverts to `user:{emailid}` and the recovered user retains the role in the binding. * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a service account that has been recently deleted. For example, `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. If the service account is undeleted, this value reverts to `serviceAccount:{emailid}` and the undeleted service account retains the role in the binding. * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a Google group that has been recently deleted. For example, `admins@example.com?uid=123456789012345678901`. If the group is recovered, this value reverts to `group:{emailid}` and the recovered group retains the role in the binding. * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 374 | "A String", |
| 375 | ], |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 376 | "condition": { # Represents a textual expression in the Common Expression Language (CEL) syntax. CEL is a C-like expression language. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec. Example (Comparison): title: "Summary size limit" description: "Determines if a summary is less than 100 chars" expression: "document.summary.size() < 100" Example (Equality): title: "Requestor is owner" description: "Determines if requestor is the document owner" expression: "document.owner == request.auth.claims.email" Example (Logic): title: "Public documents" description: "Determine whether the document should be publicly visible" expression: "document.type != 'private' && document.type != 'internal'" Example (Data Manipulation): title: "Notification string" description: "Create a notification string with a timestamp." expression: "'New message received at ' + string(document.create_time)" The exact variables and functions that may be referenced within an expression are determined by the service that evaluates it. See the service documentation for additional information. # The condition that is associated with this binding. If the condition evaluates to `true`, then this binding applies to the current request. If the condition evaluates to `false`, then this binding does not apply to the current request. However, a different role binding might grant the same role to one or more of the members in this binding. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 377 | "expression": "A String", # Textual representation of an expression in Common Expression Language syntax. |
| 378 | "title": "A String", # Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression. |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 379 | "location": "A String", # Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 380 | "description": "A String", # Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI. |
| 381 | }, |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame^] | 382 | "role": "A String", # Role that is assigned to `members`. For example, `roles/viewer`, `roles/editor`, or `roles/owner`. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 383 | }, |
| 384 | ], |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame^] | 385 | "auditConfigs": [ # Specifies cloud audit logging configuration for this policy. |
| 386 | { # Specifies the audit configuration for a service. The configuration determines which permission types are logged, and what identities, if any, are exempted from logging. An AuditConfig must have one or more AuditLogConfigs. If there are AuditConfigs for both `allServices` and a specific service, the union of the two AuditConfigs is used for that service: the log_types specified in each AuditConfig are enabled, and the exempted_members in each AuditLogConfig are exempted. Example Policy with multiple AuditConfigs: { "audit_configs": [ { "service": "allServices", "audit_log_configs": [ { "log_type": "DATA_READ", "exempted_members": [ "user:jose@example.com" ] }, { "log_type": "DATA_WRITE" }, { "log_type": "ADMIN_READ" } ] }, { "service": "sampleservice.googleapis.com", "audit_log_configs": [ { "log_type": "DATA_READ" }, { "log_type": "DATA_WRITE", "exempted_members": [ "user:aliya@example.com" ] } ] } ] } For sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ logging. It also exempts jose@example.com from DATA_READ logging, and aliya@example.com from DATA_WRITE logging. |
| 387 | "auditLogConfigs": [ # The configuration for logging of each type of permission. |
| 388 | { # Provides the configuration for logging a type of permissions. Example: { "audit_log_configs": [ { "log_type": "DATA_READ", "exempted_members": [ "user:jose@example.com" ] }, { "log_type": "DATA_WRITE" } ] } This enables 'DATA_READ' and 'DATA_WRITE' logging, while exempting jose@example.com from DATA_READ logging. |
| 389 | "logType": "A String", # The log type that this config enables. |
| 390 | "exemptedMembers": [ # Specifies the identities that do not cause logging for this type of permission. Follows the same format of Binding.members. |
| 391 | "A String", |
| 392 | ], |
| 393 | }, |
| 394 | ], |
| 395 | "service": "A String", # Specifies a service that will be enabled for audit logging. For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. `allServices` is a special value that covers all services. |
| 396 | }, |
| 397 | ], |
| 398 | "etag": "A String", # `etag` is used for optimistic concurrency control as a way to help prevent simultaneous updates of a policy from overwriting each other. It is strongly suggested that systems make use of the `etag` in the read-modify-write cycle to perform policy updates in order to avoid race conditions: An `etag` is returned in the response to `getIamPolicy`, and systems are expected to put that etag in the request to `setIamPolicy` to ensure that their change will be applied to the same version of the policy. **Important:** If you use IAM Conditions, you must include the `etag` field whenever you call `setIamPolicy`. If you omit this field, then IAM allows you to overwrite a version `3` policy with a version `1` policy, and all of the conditions in the version `3` policy are lost. |
| 399 | "version": 42, # Specifies the format of the policy. Valid values are `0`, `1`, and `3`. Requests that specify an invalid value are rejected. Any operation that affects conditional role bindings must specify version `3`. This requirement applies to the following operations: * Getting a policy that includes a conditional role binding * Adding a conditional role binding to a policy * Changing a conditional role binding in a policy * Removing any role binding, with or without a condition, from a policy that includes conditions **Important:** If you use IAM Conditions, you must include the `etag` field whenever you call `setIamPolicy`. If you omit this field, then IAM allows you to overwrite a version `3` policy with a version `1` policy, and all of the conditions in the version `3` policy are lost. If a policy does not include any conditions, operations on that policy may specify any valid version or leave the field unset. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 400 | }</pre> |
| 401 | </div> |
| 402 | |
| 403 | <div class="method"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 404 | <code class="details" id="insert">insert(projectId, datasetId, body=None)</code> |
John Asmuth | 614db98 | 2014-04-24 15:46:26 -0400 | [diff] [blame] | 405 | <pre>Creates a new, empty table in the dataset. |
| 406 | |
| 407 | Args: |
| 408 | projectId: string, Project ID of the new table (required) |
| 409 | datasetId: string, Dataset ID of the new table (required) |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 410 | body: object, The request body. |
John Asmuth | 614db98 | 2014-04-24 15:46:26 -0400 | [diff] [blame] | 411 | The object takes the form of: |
| 412 | |
| 413 | { |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame^] | 414 | "view": { # [Optional] The view definition. |
| 415 | "userDefinedFunctionResources": [ # Describes user-defined function resources used in the query. |
| 416 | { # This is used for defining User Defined Function (UDF) resources only when using legacy SQL. Users of Standard SQL should leverage either DDL (e.g. CREATE [TEMPORARY] FUNCTION ... ) or the Routines API to define UDF resources. For additional information on migrating, see: https://cloud.google.com/bigquery/docs/reference/standard-sql/migrating-from-legacy-sql#differences_in_user-defined_javascript_functions |
| 417 | "inlineCode": "A String", # [Pick one] An inline resource that contains code for a user-defined function (UDF). Providing a inline code resource is equivalent to providing a URI for a file containing the same code. |
| 418 | "resourceUri": "A String", # [Pick one] A code resource to load from a Google Cloud Storage URI (gs://bucket/path). |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 419 | }, |
| 420 | ], |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame^] | 421 | "query": "A String", # [Required] A query that BigQuery executes when the view is referenced. |
| 422 | "useLegacySql": True or False, # Specifies whether to use BigQuery's legacy SQL for this view. The default value is true. If set to false, the view will use BigQuery's standard SQL: https://cloud.google.com/bigquery/sql-reference/ Queries and views that reference this view must use the same flag value. |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 423 | }, |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame^] | 424 | "selfLink": "A String", # [Output-only] A URL that can be used to access this resource again. |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 425 | "type": "A String", # [Output-only] Describes the table type. The following values are supported: TABLE: A normal BigQuery table. VIEW: A virtual table defined by a SQL query. SNAPSHOT: An immutable, read-only table that is a copy of another table. [TrustedTester] MATERIALIZED_VIEW: SQL query whose result is persisted. EXTERNAL: A table that references data stored in an external storage system, such as Google Cloud Storage. The default value is TABLE. |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame^] | 426 | "friendlyName": "A String", # [Optional] A descriptive name for this table. |
| 427 | "streamingBuffer": { # [Output-only] Contains information regarding this table'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. |
| 428 | "estimatedRows": "A String", # [Output-only] A lower-bound estimate of the number of rows currently in the streaming buffer. |
| 429 | "estimatedBytes": "A String", # [Output-only] A lower-bound estimate of the number of bytes currently in the streaming buffer. |
| 430 | "oldestEntryTime": "A String", # [Output-only] Contains the timestamp of the oldest entry in the streaming buffer, in milliseconds since the epoch, if the streaming buffer is available. |
| 431 | }, |
| 432 | "etag": "A String", # [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. |
| 433 | "labels": { # 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. |
| 434 | "a_key": "A String", |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 435 | }, |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 436 | "tableReference": { # [Required] Reference describing the ID of this table. |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame^] | 437 | "tableId": "A String", # [Required] The ID of the table. The ID must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_). The maximum length is 1,024 characters. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 438 | "datasetId": "A String", # [Required] The ID of the dataset containing this table. |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 439 | "projectId": "A String", # [Required] The ID of the project containing this table. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 440 | }, |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 441 | "model": { # [Output-only, Beta] Present iff this table represents a ML model. Describes the training information for the model, and it is required to run 'PREDICT' queries. |
| 442 | "modelOptions": { # [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. |
| 443 | "lossType": "A String", |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame^] | 444 | "modelType": "A String", |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 445 | "labels": [ |
| 446 | "A String", |
| 447 | ], |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 448 | }, |
| 449 | "trainingRuns": [ # [Output-only, Beta] Information about ml training runs, each training run comprises of multiple iterations and there may be multiple training runs for the model if warm start is used or if a user decides to continue a previously cancelled query. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 450 | { |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame^] | 451 | "trainingOptions": { # [Output-only, Beta] Training options used by this training run. These options are mutable for subsequent training runs. Default values are explicitly stored for options not specified in the input query of the first training run. For subsequent training runs, any option not explicitly specified in the input query will be copied from the previous training run. |
| 452 | "l1Reg": 3.14, |
| 453 | "lineSearchInitLearnRate": 3.14, |
| 454 | "earlyStop": True or False, |
| 455 | "l2Reg": 3.14, |
| 456 | "learnRateStrategy": "A String", |
| 457 | "learnRate": 3.14, |
| 458 | "maxIteration": "A String", |
| 459 | "minRelProgress": 3.14, |
| 460 | "warmStart": True or False, |
| 461 | }, |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 462 | "state": "A String", # [Output-only, Beta] Different state applicable for a training run. IN PROGRESS: Training run is in progress. FAILED: Training run ended due to a non-retryable failure. SUCCEEDED: Training run successfully completed. CANCELLED: Training run cancelled by the user. |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 463 | "startTime": "A String", # [Output-only, Beta] Training run start time in milliseconds since the epoch. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 464 | "iterationResults": [ # [Output-only, Beta] List of each iteration results. |
| 465 | { |
| 466 | "index": 42, # [Output-only, Beta] Index of the ML training iteration, starting from zero for each training run. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 467 | "learnRate": 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. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 468 | "trainingLoss": 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. |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame^] | 469 | "durationMs": "A String", # [Output-only, Beta] Time taken to run the training iteration in milliseconds. |
| 470 | "evalLoss": 3.14, # [Output-only, Beta] Eval loss computed on the eval data at the end of the iteration. The eval loss is used for early stopping to avoid overfitting. No eval loss if eval_split_method option is specified as no_split or auto_split with input data size less than 500 rows. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 471 | }, |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 472 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 473 | }, |
| 474 | ], |
| 475 | }, |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame^] | 476 | "encryptionConfiguration": { # Custom encryption configuration (e.g., Cloud KMS keys). |
| 477 | "kmsKeyName": "A String", # [Optional] Describes the Cloud KMS encryption key that will be used to protect destination BigQuery table. The BigQuery Service Account associated with your project requires access to this encryption key. |
| 478 | }, |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 479 | "snapshotDefinition": { # [Output-only] Snapshot definition. |
| 480 | "baseTableReference": { # [Required] Reference describing the ID of the table that is snapshotted. |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame^] | 481 | "tableId": "A String", # [Required] The ID of the table. The ID must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_). The maximum length is 1,024 characters. |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 482 | "datasetId": "A String", # [Required] The ID of the dataset containing this table. |
| 483 | "projectId": "A String", # [Required] The ID of the project containing this table. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 484 | }, |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 485 | "snapshotTime": "A String", # [Required] The time at which the base table was snapshot. |
| 486 | }, |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame^] | 487 | "expirationTime": "A String", # [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. |
| 488 | "numBytes": "A String", # [Output-only] The size of this table in bytes, excluding any data in the streaming buffer. |
| 489 | "id": "A String", # [Output-only] An opaque ID uniquely identifying the table. |
| 490 | "numRows": "A String", # [Output-only] The number of rows of data in this table, excluding any data in the streaming buffer. |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 491 | "timePartitioning": { # Time-based partitioning specification for this table. Only one of timePartitioning and rangePartitioning should be specified. |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 492 | "type": "A String", # [Required] The supported types are DAY, HOUR, MONTH, and YEAR, which will generate one partition per day, hour, month, and year, respectively. When the type is not specified, the default behavior is DAY. |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame^] | 493 | "expirationMs": "A String", # [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. |
| 494 | "field": "A String", # [Beta] [Optional] If not set, the table is partitioned by pseudo column, referenced via either '_PARTITIONTIME' as TIMESTAMP type, or '_PARTITIONDATE' 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. |
| 495 | "requirePartitionFilter": True or False, |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 496 | }, |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame^] | 497 | "numPhysicalBytes": "A String", # [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. |
| 498 | "lastModifiedTime": "A String", # [Output-only] The time when this table was last modified, in milliseconds since the epoch. |
| 499 | "requirePartitionFilter": false, # [Optional] If set to true, queries over this table require a partition filter that can be used for partition elimination to be specified. |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 500 | "materializedView": { # [Optional] Materialized view definition. |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame^] | 501 | "refreshIntervalMs": "A String", # [Optional] [TrustedTester] The maximum frequency at which this materialized view will be refreshed. The default value is "1800000" (30 minutes). |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 502 | "lastRefreshTime": "A String", # [Output-only] [TrustedTester] The time when this materialized view was last modified, in milliseconds since the epoch. |
| 503 | "enableRefresh": True or False, # [Optional] [TrustedTester] Enable automatic refresh of the materialized view when the base table is updated. The default value is "true". |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame^] | 504 | "query": "A String", # [Required] A query whose result is persisted. |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 505 | }, |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame^] | 506 | "numLongTermBytes": "A String", # [Output-only] The number of bytes in the table that are considered "long-term storage". |
| 507 | "rangePartitioning": { # [TrustedTester] Range partitioning specification for this table. Only one of timePartitioning and rangePartitioning should be specified. |
| 508 | "range": { # [TrustedTester] [Required] Defines the ranges for range partitioning. |
| 509 | "start": "A String", # [TrustedTester] [Required] The start of range partitioning, inclusive. |
| 510 | "end": "A String", # [TrustedTester] [Required] The end of range partitioning, exclusive. |
| 511 | "interval": "A String", # [TrustedTester] [Required] The width of each interval. |
| 512 | }, |
| 513 | "field": "A String", # [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. |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 514 | }, |
| 515 | "clustering": { # [Beta] Clustering specification for the table. Must be specified with partitioning, data in the table will be first partitioned and subsequently clustered. |
| 516 | "fields": [ # [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. |
| 517 | "A String", |
| 518 | ], |
| 519 | }, |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame^] | 520 | "externalDataConfiguration": { # [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. |
| 521 | "sourceFormat": "A String", # [Required] The data format. For CSV files, specify "CSV". For Google sheets, specify "GOOGLE_SHEETS". For newline-delimited JSON, specify "NEWLINE_DELIMITED_JSON". For Avro files, specify "AVRO". For Google Cloud Datastore backups, specify "DATASTORE_BACKUP". [Beta] For Google Cloud Bigtable, specify "BIGTABLE". |
| 522 | "schema": { # [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. |
| 523 | "fields": [ # Describes the fields in a table. |
| 524 | { |
| 525 | "categories": { # [Optional] The categories attached to this field, used for field-level access control. |
| 526 | "names": [ # A list of category resource names. For example, "projects/1/taxonomies/2/categories/3". At most 5 categories are allowed. |
| 527 | "A String", |
| 528 | ], |
| 529 | }, |
| 530 | "policyTags": { |
| 531 | "names": [ # A list of category resource names. For example, "projects/1/location/eu/taxonomies/2/policyTags/3". At most 1 policy tag is allowed. |
| 532 | "A String", |
| 533 | ], |
| 534 | }, |
| 535 | "name": "A String", # [Required] The field name. The name must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_), and must start with a letter or underscore. The maximum length is 128 characters. |
| 536 | "type": "A String", # [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). |
| 537 | "fields": [ # [Optional] Describes the nested schema fields if the type property is set to RECORD. |
| 538 | # Object with schema name: TableFieldSchema |
| 539 | ], |
| 540 | "description": "A String", # [Optional] The field description. The maximum length is 1,024 characters. |
| 541 | "mode": "A String", # [Optional] The field mode. Possible values include NULLABLE, REQUIRED and REPEATED. The default value is NULLABLE. |
| 542 | }, |
| 543 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 544 | }, |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame^] | 545 | "ignoreUnknownValues": 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'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. |
| 546 | "maxBadRecords": 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. |
| 547 | "hivePartitioningOptions": { # [Optional, Trusted Tester] Options to configure hive partitioning support. |
| 548 | "sourceUriPrefix": "A String", # [Optional] When hive partition detection is requested, a common prefix for all source uris should be supplied. The prefix must end immediately before the partition key encoding begins. For example, consider files following this data layout. gs://bucket/path_to_table/dt=2019-01-01/country=BR/id=7/file.avro gs://bucket/path_to_table/dt=2018-12-31/country=CA/id=3/file.avro When hive partitioning is requested with either AUTO or STRINGS detection, the common prefix can be either of gs://bucket/path_to_table or gs://bucket/path_to_table/ (trailing slash does not matter). |
| 549 | "requirePartitionFilter": True or False, # [Optional] If set to true, queries over this table require a partition filter that can be used for partition elimination to be specified. Note that this field should only be true when creating a permanent external table or querying a temporary external table. Hive-partitioned loads with requirePartitionFilter explicitly set to true will fail. |
| 550 | "mode": "A String", # [Optional] When set, what mode of hive partitioning to use when reading data. The following modes are supported. (1) AUTO: automatically infer partition key name(s) and type(s). (2) STRINGS: automatically infer partition key name(s). All types are interpreted as strings. (3) CUSTOM: partition key schema is encoded in the source URI prefix. Not all storage formats support hive partitioning. Requesting hive partitioning on an unsupported format will lead to an error. Currently supported types include: AVRO, CSV, JSON, ORC and Parquet. |
| 551 | }, |
| 552 | "connectionId": "A String", # [Optional, Trusted Tester] Connection for external data source. |
| 553 | "sourceUris": [ # [Required] The fully-qualified URIs that point to your data in Google Cloud. For Google Cloud Storage URIs: Each URI can contain one '*' wildcard character and it must come after the 'bucket' name. Size limits related to load jobs apply to external data sources. For Google Cloud Bigtable URIs: Exactly one URI can be specified and it has be a fully specified and valid HTTPS URL for a Google Cloud Bigtable table. For Google Cloud Datastore backups, exactly one URI can be specified. Also, the '*' wildcard character is not allowed. |
| 554 | "A String", |
| 555 | ], |
| 556 | "googleSheetsOptions": { # [Optional] Additional options if sourceFormat is set to GOOGLE_SHEETS. |
| 557 | "skipLeadingRows": "A String", # [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 > 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. |
| 558 | "range": "A String", # [Optional] Range of a sheet to query from. Only used when non-empty. Typical format: sheet_name!top_left_cell_id:bottom_right_cell_id For example: sheet1!A1:B20 |
| 559 | }, |
| 560 | "autodetect": True or False, # Try to detect schema and format options automatically. Any option specified explicitly will be honored. |
| 561 | "compression": "A String", # [Optional] The compression type of the data source. Possible values include GZIP and NONE. The default value is NONE. This setting is ignored for Google Cloud Bigtable, Google Cloud Datastore backups and Avro formats. |
| 562 | "csvOptions": { # Additional properties to set if sourceFormat is set to CSV. |
| 563 | "encoding": "A String", # [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. |
| 564 | "quote": """, # [Optional] The value that is used to quote data sections in a CSV file. BigQuery converts the string to ISO-8859-1 encoding, and then uses the first byte of the encoded string to split the data in its raw, binary state. The default value is a double-quote ('"'). If your data does not contain quoted sections, set the property value to an empty string. If your data contains quoted newline characters, you must also set the allowQuotedNewlines property to true. |
| 565 | "skipLeadingRows": "A String", # [Optional] The number of rows at the top of a CSV file that BigQuery will skip when reading the data. The default value is 0. This property is useful if you have header rows in the file that should be skipped. When autodetect is on, the behavior is the following: * skipLeadingRows unspecified - Autodetect tries to detect headers in the first row. If they are not detected, the row is read as data. Otherwise data is read starting from the second row. * skipLeadingRows is 0 - Instructs autodetect that there are no headers and data should be read starting from the first row. * skipLeadingRows = N > 0 - Autodetect skips N-1 rows and tries to detect headers in row N. If headers are not detected, row N is just skipped. Otherwise row N is used to extract column names for the detected schema. |
| 566 | "allowJaggedRows": 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. |
| 567 | "allowQuotedNewlines": 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. |
| 568 | "fieldDelimiter": "A String", # [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 "\t" to specify a tab separator. The default value is a comma (','). |
| 569 | }, |
| 570 | "bigtableOptions": { # [Optional] Additional options if sourceFormat is set to BIGTABLE. |
| 571 | "readRowkeyAsString": 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. |
| 572 | "ignoreUnspecifiedColumnFamilies": 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. |
| 573 | "columnFamilies": [ # [Optional] List of column families to expose in the table schema along with their types. This list restricts the column families that can be referenced in queries and specifies their value types. You can use this list to do type conversions - see the 'type' field for more details. If you leave this list empty, all column families are present in the table schema and their values are read as BYTES. During a query only the column families referenced in that query are read from Bigtable. |
| 574 | { |
| 575 | "onlyReadLatest": 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 'columns' and specifying a different setting for that column. |
| 576 | "encoding": "A String", # [Optional] The encoding of the values when the type is not STRING. Acceptable encoding values are: TEXT - indicates values are alphanumeric text strings. BINARY - indicates values are encoded using HBase Bytes.toBytes family of functions. This can be overridden for a specific column by listing that column in 'columns' and specifying an encoding for it. |
| 577 | "columns": [ # [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. |
| 578 | { |
| 579 | "fieldName": "A String", # [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. |
| 580 | "qualifierString": "A String", |
| 581 | "onlyReadLatest": True or False, # [Optional] If this is set, only the latest version of value in this column are exposed. 'onlyReadLatest' can also be set at the column family level. However, the setting at this level takes precedence if 'onlyReadLatest' is set at both levels. |
| 582 | "type": "A String", # [Optional] The type to convert the value in cells of this column. The values are expected to be encoded using HBase Bytes.toBytes function when using the BINARY encoding value. Following BigQuery types are allowed (case-sensitive) - BYTES STRING INTEGER FLOAT BOOLEAN Default type is BYTES. 'type' can also be set at the column family level. However, the setting at this level takes precedence if 'type' is set at both levels. |
| 583 | "encoding": "A String", # [Optional] The encoding of the values when the type is not STRING. Acceptable encoding values are: TEXT - indicates values are alphanumeric text strings. BINARY - indicates values are encoded using HBase Bytes.toBytes family of functions. 'encoding' can also be set at the column family level. However, the setting at this level takes precedence if 'encoding' is set at both levels. |
| 584 | "qualifierEncoded": "A String", # [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. |
| 585 | }, |
| 586 | ], |
| 587 | "type": "A String", # [Optional] The type to convert the value in cells of this column family. The values are expected to be encoded using HBase Bytes.toBytes function when using the BINARY encoding value. Following BigQuery types are allowed (case-sensitive) - BYTES STRING INTEGER FLOAT BOOLEAN Default type is BYTES. This can be overridden for a specific column by listing that column in 'columns' and specifying a type for it. |
| 588 | "familyId": "A String", # Identifier of the column family. |
| 589 | }, |
| 590 | ], |
| 591 | }, |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 592 | }, |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame^] | 593 | "description": "A String", # [Optional] A user-friendly description of this table. |
| 594 | "creationTime": "A String", # [Output-only] The time when this table was created, in milliseconds since the epoch. |
| 595 | "schema": { # [Optional] Describes the schema of this table. |
| 596 | "fields": [ # Describes the fields in a table. |
| 597 | { |
| 598 | "categories": { # [Optional] The categories attached to this field, used for field-level access control. |
| 599 | "names": [ # A list of category resource names. For example, "projects/1/taxonomies/2/categories/3". At most 5 categories are allowed. |
| 600 | "A String", |
| 601 | ], |
| 602 | }, |
| 603 | "policyTags": { |
| 604 | "names": [ # A list of category resource names. For example, "projects/1/location/eu/taxonomies/2/policyTags/3". At most 1 policy tag is allowed. |
| 605 | "A String", |
| 606 | ], |
| 607 | }, |
| 608 | "name": "A String", # [Required] The field name. The name must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_), and must start with a letter or underscore. The maximum length is 128 characters. |
| 609 | "type": "A String", # [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). |
| 610 | "fields": [ # [Optional] Describes the nested schema fields if the type property is set to RECORD. |
| 611 | # Object with schema name: TableFieldSchema |
| 612 | ], |
| 613 | "description": "A String", # [Optional] The field description. The maximum length is 1,024 characters. |
| 614 | "mode": "A String", # [Optional] The field mode. Possible values include NULLABLE, REQUIRED and REPEATED. The default value is NULLABLE. |
| 615 | }, |
| 616 | ], |
| 617 | }, |
| 618 | "location": "A String", # [Output-only] The geographic location where the table resides. This value is inherited from the dataset. |
| 619 | "kind": "bigquery#table", # [Output-only] The type of the resource. |
| 620 | } |
John Asmuth | 614db98 | 2014-04-24 15:46:26 -0400 | [diff] [blame] | 621 | |
John Asmuth | 614db98 | 2014-04-24 15:46:26 -0400 | [diff] [blame] | 622 | |
| 623 | Returns: |
| 624 | An object of the form: |
| 625 | |
| 626 | { |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame^] | 627 | "view": { # [Optional] The view definition. |
| 628 | "userDefinedFunctionResources": [ # Describes user-defined function resources used in the query. |
| 629 | { # This is used for defining User Defined Function (UDF) resources only when using legacy SQL. Users of Standard SQL should leverage either DDL (e.g. CREATE [TEMPORARY] FUNCTION ... ) or the Routines API to define UDF resources. For additional information on migrating, see: https://cloud.google.com/bigquery/docs/reference/standard-sql/migrating-from-legacy-sql#differences_in_user-defined_javascript_functions |
| 630 | "inlineCode": "A String", # [Pick one] An inline resource that contains code for a user-defined function (UDF). Providing a inline code resource is equivalent to providing a URI for a file containing the same code. |
| 631 | "resourceUri": "A String", # [Pick one] A code resource to load from a Google Cloud Storage URI (gs://bucket/path). |
| 632 | }, |
| 633 | ], |
| 634 | "query": "A String", # [Required] A query that BigQuery executes when the view is referenced. |
| 635 | "useLegacySql": True or False, # Specifies whether to use BigQuery's legacy SQL for this view. The default value is true. If set to false, the view will use BigQuery's standard SQL: https://cloud.google.com/bigquery/sql-reference/ Queries and views that reference this view must use the same flag value. |
| 636 | }, |
| 637 | "selfLink": "A String", # [Output-only] A URL that can be used to access this resource again. |
| 638 | "type": "A String", # [Output-only] Describes the table type. The following values are supported: TABLE: A normal BigQuery table. VIEW: A virtual table defined by a SQL query. SNAPSHOT: An immutable, read-only table that is a copy of another table. [TrustedTester] MATERIALIZED_VIEW: SQL query whose result is persisted. EXTERNAL: A table that references data stored in an external storage system, such as Google Cloud Storage. The default value is TABLE. |
| 639 | "friendlyName": "A String", # [Optional] A descriptive name for this table. |
| 640 | "streamingBuffer": { # [Output-only] Contains information regarding this table'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. |
| 641 | "estimatedRows": "A String", # [Output-only] A lower-bound estimate of the number of rows currently in the streaming buffer. |
| 642 | "estimatedBytes": "A String", # [Output-only] A lower-bound estimate of the number of bytes currently in the streaming buffer. |
| 643 | "oldestEntryTime": "A String", # [Output-only] Contains the timestamp of the oldest entry in the streaming buffer, in milliseconds since the epoch, if the streaming buffer is available. |
| 644 | }, |
| 645 | "etag": "A String", # [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. |
| 646 | "labels": { # 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. |
| 647 | "a_key": "A String", |
| 648 | }, |
| 649 | "tableReference": { # [Required] Reference describing the ID of this table. |
| 650 | "tableId": "A String", # [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. |
| 651 | "datasetId": "A String", # [Required] The ID of the dataset containing this table. |
| 652 | "projectId": "A String", # [Required] The ID of the project containing this table. |
| 653 | }, |
| 654 | "model": { # [Output-only, Beta] Present iff this table represents a ML model. Describes the training information for the model, and it is required to run 'PREDICT' queries. |
| 655 | "modelOptions": { # [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. |
| 656 | "lossType": "A String", |
| 657 | "modelType": "A String", |
| 658 | "labels": [ |
| 659 | "A String", |
| 660 | ], |
| 661 | }, |
| 662 | "trainingRuns": [ # [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. |
| 663 | { |
| 664 | "trainingOptions": { # [Output-only, Beta] Training options used by this training run. These options are mutable for subsequent training runs. Default values are explicitly stored for options not specified in the input query of the first training run. For subsequent training runs, any option not explicitly specified in the input query will be copied from the previous training run. |
| 665 | "l1Reg": 3.14, |
| 666 | "lineSearchInitLearnRate": 3.14, |
| 667 | "earlyStop": True or False, |
| 668 | "l2Reg": 3.14, |
| 669 | "learnRateStrategy": "A String", |
| 670 | "learnRate": 3.14, |
| 671 | "maxIteration": "A String", |
| 672 | "minRelProgress": 3.14, |
| 673 | "warmStart": True or False, |
| 674 | }, |
| 675 | "state": "A String", # [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. |
| 676 | "startTime": "A String", # [Output-only, Beta] Training run start time in milliseconds since the epoch. |
| 677 | "iterationResults": [ # [Output-only, Beta] List of each iteration results. |
| 678 | { |
| 679 | "index": 42, # [Output-only, Beta] Index of the ML training iteration, starting from zero for each training run. |
| 680 | "learnRate": 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. |
| 681 | "trainingLoss": 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. |
| 682 | "durationMs": "A String", # [Output-only, Beta] Time taken to run the training iteration in milliseconds. |
| 683 | "evalLoss": 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. |
| 684 | }, |
| 685 | ], |
| 686 | }, |
| 687 | ], |
| 688 | }, |
| 689 | "encryptionConfiguration": { # Custom encryption configuration (e.g., Cloud KMS keys). |
| 690 | "kmsKeyName": "A String", # [Optional] Describes the Cloud KMS encryption key that will be used to protect destination BigQuery table. The BigQuery Service Account associated with your project requires access to this encryption key. |
| 691 | }, |
| 692 | "snapshotDefinition": { # [Output-only] Snapshot definition. |
| 693 | "baseTableReference": { # [Required] Reference describing the ID of the table that is snapshotted. |
| 694 | "tableId": "A String", # [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. |
| 695 | "datasetId": "A String", # [Required] The ID of the dataset containing this table. |
| 696 | "projectId": "A String", # [Required] The ID of the project containing this table. |
| 697 | }, |
| 698 | "snapshotTime": "A String", # [Required] The time at which the base table was snapshot. |
| 699 | }, |
| 700 | "expirationTime": "A String", # [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. |
| 701 | "numBytes": "A String", # [Output-only] The size of this table in bytes, excluding any data in the streaming buffer. |
| 702 | "id": "A String", # [Output-only] An opaque ID uniquely identifying the table. |
| 703 | "numRows": "A String", # [Output-only] The number of rows of data in this table, excluding any data in the streaming buffer. |
| 704 | "timePartitioning": { # Time-based partitioning specification for this table. Only one of timePartitioning and rangePartitioning should be specified. |
| 705 | "type": "A String", # [Required] The supported types are DAY, HOUR, MONTH, and YEAR, which will generate one partition per day, hour, month, and year, respectively. When the type is not specified, the default behavior is DAY. |
| 706 | "expirationMs": "A String", # [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. |
| 707 | "field": "A String", # [Beta] [Optional] If not set, the table is partitioned by pseudo column, referenced via either '_PARTITIONTIME' as TIMESTAMP type, or '_PARTITIONDATE' 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. |
| 708 | "requirePartitionFilter": True or False, |
| 709 | }, |
| 710 | "numPhysicalBytes": "A String", # [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. |
| 711 | "lastModifiedTime": "A String", # [Output-only] The time when this table was last modified, in milliseconds since the epoch. |
| 712 | "requirePartitionFilter": false, # [Optional] If set to true, queries over this table require a partition filter that can be used for partition elimination to be specified. |
| 713 | "materializedView": { # [Optional] Materialized view definition. |
| 714 | "refreshIntervalMs": "A String", # [Optional] [TrustedTester] The maximum frequency at which this materialized view will be refreshed. The default value is "1800000" (30 minutes). |
| 715 | "lastRefreshTime": "A String", # [Output-only] [TrustedTester] The time when this materialized view was last modified, in milliseconds since the epoch. |
| 716 | "enableRefresh": True or False, # [Optional] [TrustedTester] Enable automatic refresh of the materialized view when the base table is updated. The default value is "true". |
| 717 | "query": "A String", # [Required] A query whose result is persisted. |
| 718 | }, |
| 719 | "numLongTermBytes": "A String", # [Output-only] The number of bytes in the table that are considered "long-term storage". |
| 720 | "rangePartitioning": { # [TrustedTester] Range partitioning specification for this table. Only one of timePartitioning and rangePartitioning should be specified. |
| 721 | "range": { # [TrustedTester] [Required] Defines the ranges for range partitioning. |
| 722 | "start": "A String", # [TrustedTester] [Required] The start of range partitioning, inclusive. |
| 723 | "end": "A String", # [TrustedTester] [Required] The end of range partitioning, exclusive. |
| 724 | "interval": "A String", # [TrustedTester] [Required] The width of each interval. |
| 725 | }, |
| 726 | "field": "A String", # [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. |
| 727 | }, |
| 728 | "clustering": { # [Beta] Clustering specification for the table. Must be specified with partitioning, data in the table will be first partitioned and subsequently clustered. |
| 729 | "fields": [ # [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. |
| 730 | "A String", |
| 731 | ], |
| 732 | }, |
| 733 | "externalDataConfiguration": { # [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. |
| 734 | "sourceFormat": "A String", # [Required] The data format. For CSV files, specify "CSV". For Google sheets, specify "GOOGLE_SHEETS". For newline-delimited JSON, specify "NEWLINE_DELIMITED_JSON". For Avro files, specify "AVRO". For Google Cloud Datastore backups, specify "DATASTORE_BACKUP". [Beta] For Google Cloud Bigtable, specify "BIGTABLE". |
| 735 | "schema": { # [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. |
| 736 | "fields": [ # Describes the fields in a table. |
| 737 | { |
| 738 | "categories": { # [Optional] The categories attached to this field, used for field-level access control. |
| 739 | "names": [ # A list of category resource names. For example, "projects/1/taxonomies/2/categories/3". At most 5 categories are allowed. |
| 740 | "A String", |
| 741 | ], |
| 742 | }, |
| 743 | "policyTags": { |
| 744 | "names": [ # A list of category resource names. For example, "projects/1/location/eu/taxonomies/2/policyTags/3". At most 1 policy tag is allowed. |
| 745 | "A String", |
| 746 | ], |
| 747 | }, |
| 748 | "name": "A String", # [Required] The field name. The name must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_), and must start with a letter or underscore. The maximum length is 128 characters. |
| 749 | "type": "A String", # [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). |
| 750 | "fields": [ # [Optional] Describes the nested schema fields if the type property is set to RECORD. |
| 751 | # Object with schema name: TableFieldSchema |
| 752 | ], |
| 753 | "description": "A String", # [Optional] The field description. The maximum length is 1,024 characters. |
| 754 | "mode": "A String", # [Optional] The field mode. Possible values include NULLABLE, REQUIRED and REPEATED. The default value is NULLABLE. |
| 755 | }, |
| 756 | ], |
| 757 | }, |
| 758 | "ignoreUnknownValues": 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'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. |
| 759 | "maxBadRecords": 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. |
| 760 | "hivePartitioningOptions": { # [Optional, Trusted Tester] Options to configure hive partitioning support. |
| 761 | "sourceUriPrefix": "A String", # [Optional] When hive partition detection is requested, a common prefix for all source uris should be supplied. The prefix must end immediately before the partition key encoding begins. For example, consider files following this data layout. gs://bucket/path_to_table/dt=2019-01-01/country=BR/id=7/file.avro gs://bucket/path_to_table/dt=2018-12-31/country=CA/id=3/file.avro When hive partitioning is requested with either AUTO or STRINGS detection, the common prefix can be either of gs://bucket/path_to_table or gs://bucket/path_to_table/ (trailing slash does not matter). |
| 762 | "requirePartitionFilter": True or False, # [Optional] If set to true, queries over this table require a partition filter that can be used for partition elimination to be specified. Note that this field should only be true when creating a permanent external table or querying a temporary external table. Hive-partitioned loads with requirePartitionFilter explicitly set to true will fail. |
| 763 | "mode": "A String", # [Optional] When set, what mode of hive partitioning to use when reading data. The following modes are supported. (1) AUTO: automatically infer partition key name(s) and type(s). (2) STRINGS: automatically infer partition key name(s). All types are interpreted as strings. (3) CUSTOM: partition key schema is encoded in the source URI prefix. Not all storage formats support hive partitioning. Requesting hive partitioning on an unsupported format will lead to an error. Currently supported types include: AVRO, CSV, JSON, ORC and Parquet. |
| 764 | }, |
| 765 | "connectionId": "A String", # [Optional, Trusted Tester] Connection for external data source. |
| 766 | "sourceUris": [ # [Required] The fully-qualified URIs that point to your data in Google Cloud. For Google Cloud Storage URIs: Each URI can contain one '*' wildcard character and it must come after the 'bucket' name. Size limits related to load jobs apply to external data sources. For Google Cloud Bigtable URIs: Exactly one URI can be specified and it has be a fully specified and valid HTTPS URL for a Google Cloud Bigtable table. For Google Cloud Datastore backups, exactly one URI can be specified. Also, the '*' wildcard character is not allowed. |
| 767 | "A String", |
| 768 | ], |
| 769 | "googleSheetsOptions": { # [Optional] Additional options if sourceFormat is set to GOOGLE_SHEETS. |
| 770 | "skipLeadingRows": "A String", # [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 > 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. |
| 771 | "range": "A String", # [Optional] Range of a sheet to query from. Only used when non-empty. Typical format: sheet_name!top_left_cell_id:bottom_right_cell_id For example: sheet1!A1:B20 |
| 772 | }, |
| 773 | "autodetect": True or False, # Try to detect schema and format options automatically. Any option specified explicitly will be honored. |
| 774 | "compression": "A String", # [Optional] The compression type of the data source. Possible values include GZIP and NONE. The default value is NONE. This setting is ignored for Google Cloud Bigtable, Google Cloud Datastore backups and Avro formats. |
| 775 | "csvOptions": { # Additional properties to set if sourceFormat is set to CSV. |
| 776 | "encoding": "A String", # [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. |
| 777 | "quote": """, # [Optional] The value that is used to quote data sections in a CSV file. BigQuery converts the string to ISO-8859-1 encoding, and then uses the first byte of the encoded string to split the data in its raw, binary state. The default value is a double-quote ('"'). If your data does not contain quoted sections, set the property value to an empty string. If your data contains quoted newline characters, you must also set the allowQuotedNewlines property to true. |
| 778 | "skipLeadingRows": "A String", # [Optional] The number of rows at the top of a CSV file that BigQuery will skip when reading the data. The default value is 0. This property is useful if you have header rows in the file that should be skipped. When autodetect is on, the behavior is the following: * skipLeadingRows unspecified - Autodetect tries to detect headers in the first row. If they are not detected, the row is read as data. Otherwise data is read starting from the second row. * skipLeadingRows is 0 - Instructs autodetect that there are no headers and data should be read starting from the first row. * skipLeadingRows = N > 0 - Autodetect skips N-1 rows and tries to detect headers in row N. If headers are not detected, row N is just skipped. Otherwise row N is used to extract column names for the detected schema. |
| 779 | "allowJaggedRows": 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. |
| 780 | "allowQuotedNewlines": 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. |
| 781 | "fieldDelimiter": "A String", # [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 "\t" to specify a tab separator. The default value is a comma (','). |
| 782 | }, |
| 783 | "bigtableOptions": { # [Optional] Additional options if sourceFormat is set to BIGTABLE. |
| 784 | "readRowkeyAsString": 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. |
| 785 | "ignoreUnspecifiedColumnFamilies": 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. |
| 786 | "columnFamilies": [ # [Optional] List of column families to expose in the table schema along with their types. This list restricts the column families that can be referenced in queries and specifies their value types. You can use this list to do type conversions - see the 'type' field for more details. If you leave this list empty, all column families are present in the table schema and their values are read as BYTES. During a query only the column families referenced in that query are read from Bigtable. |
| 787 | { |
| 788 | "onlyReadLatest": 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 'columns' and specifying a different setting for that column. |
| 789 | "encoding": "A String", # [Optional] The encoding of the values when the type is not STRING. Acceptable encoding values are: TEXT - indicates values are alphanumeric text strings. BINARY - indicates values are encoded using HBase Bytes.toBytes family of functions. This can be overridden for a specific column by listing that column in 'columns' and specifying an encoding for it. |
| 790 | "columns": [ # [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. |
| 791 | { |
| 792 | "fieldName": "A String", # [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. |
| 793 | "qualifierString": "A String", |
| 794 | "onlyReadLatest": True or False, # [Optional] If this is set, only the latest version of value in this column are exposed. 'onlyReadLatest' can also be set at the column family level. However, the setting at this level takes precedence if 'onlyReadLatest' is set at both levels. |
| 795 | "type": "A String", # [Optional] The type to convert the value in cells of this column. The values are expected to be encoded using HBase Bytes.toBytes function when using the BINARY encoding value. Following BigQuery types are allowed (case-sensitive) - BYTES STRING INTEGER FLOAT BOOLEAN Default type is BYTES. 'type' can also be set at the column family level. However, the setting at this level takes precedence if 'type' is set at both levels. |
| 796 | "encoding": "A String", # [Optional] The encoding of the values when the type is not STRING. Acceptable encoding values are: TEXT - indicates values are alphanumeric text strings. BINARY - indicates values are encoded using HBase Bytes.toBytes family of functions. 'encoding' can also be set at the column family level. However, the setting at this level takes precedence if 'encoding' is set at both levels. |
| 797 | "qualifierEncoded": "A String", # [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. |
| 798 | }, |
| 799 | ], |
| 800 | "type": "A String", # [Optional] The type to convert the value in cells of this column family. The values are expected to be encoded using HBase Bytes.toBytes function when using the BINARY encoding value. Following BigQuery types are allowed (case-sensitive) - BYTES STRING INTEGER FLOAT BOOLEAN Default type is BYTES. This can be overridden for a specific column by listing that column in 'columns' and specifying a type for it. |
| 801 | "familyId": "A String", # Identifier of the column family. |
| 802 | }, |
| 803 | ], |
| 804 | }, |
| 805 | }, |
| 806 | "description": "A String", # [Optional] A user-friendly description of this table. |
| 807 | "creationTime": "A String", # [Output-only] The time when this table was created, in milliseconds since the epoch. |
| 808 | "schema": { # [Optional] Describes the schema of this table. |
| 809 | "fields": [ # Describes the fields in a table. |
| 810 | { |
| 811 | "categories": { # [Optional] The categories attached to this field, used for field-level access control. |
| 812 | "names": [ # A list of category resource names. For example, "projects/1/taxonomies/2/categories/3". At most 5 categories are allowed. |
| 813 | "A String", |
| 814 | ], |
| 815 | }, |
| 816 | "policyTags": { |
| 817 | "names": [ # A list of category resource names. For example, "projects/1/location/eu/taxonomies/2/policyTags/3". At most 1 policy tag is allowed. |
| 818 | "A String", |
| 819 | ], |
| 820 | }, |
| 821 | "name": "A String", # [Required] The field name. The name must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_), and must start with a letter or underscore. The maximum length is 128 characters. |
| 822 | "type": "A String", # [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). |
| 823 | "fields": [ # [Optional] Describes the nested schema fields if the type property is set to RECORD. |
| 824 | # Object with schema name: TableFieldSchema |
| 825 | ], |
| 826 | "description": "A String", # [Optional] The field description. The maximum length is 1,024 characters. |
| 827 | "mode": "A String", # [Optional] The field mode. Possible values include NULLABLE, REQUIRED and REPEATED. The default value is NULLABLE. |
| 828 | }, |
| 829 | ], |
| 830 | }, |
| 831 | "location": "A String", # [Output-only] The geographic location where the table resides. This value is inherited from the dataset. |
| 832 | "kind": "bigquery#table", # [Output-only] The type of the resource. |
| 833 | }</pre> |
| 834 | </div> |
| 835 | |
| 836 | <div class="method"> |
| 837 | <code class="details" id="list">list(projectId, datasetId, maxResults=None, pageToken=None)</code> |
| 838 | <pre>Lists all tables in the specified dataset. Requires the READER dataset role. |
| 839 | |
| 840 | Args: |
| 841 | projectId: string, Project ID of the tables to list (required) |
| 842 | datasetId: string, Dataset ID of the tables to list (required) |
| 843 | maxResults: integer, Maximum number of results to return |
| 844 | pageToken: string, Page token, returned by a previous call, to request the next page of results |
| 845 | |
| 846 | Returns: |
| 847 | An object of the form: |
| 848 | |
| 849 | { |
| 850 | "kind": "bigquery#tableList", # The type of list. |
| 851 | "nextPageToken": "A String", # A token to request the next page of results. |
| 852 | "totalItems": 42, # The total number of tables in the dataset. |
| 853 | "etag": "A String", # A hash of this page of results. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 854 | "tables": [ # Tables in the requested dataset. |
John Asmuth | 614db98 | 2014-04-24 15:46:26 -0400 | [diff] [blame] | 855 | { |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 856 | "labels": { # The labels associated with this table. You can use these to organize and group your tables. |
| 857 | "a_key": "A String", |
| 858 | }, |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame^] | 859 | "view": { # Additional details for a view. |
| 860 | "useLegacySql": True or False, # True if view is defined in legacy SQL dialect, false if in standard SQL. |
| 861 | }, |
| 862 | "type": "A String", # The type of table. Possible values are: TABLE, VIEW. |
| 863 | "rangePartitioning": { # The range partitioning specification for this table, if configured. |
| 864 | "range": { # [TrustedTester] [Required] Defines the ranges for range partitioning. |
| 865 | "start": "A String", # [TrustedTester] [Required] The start of range partitioning, inclusive. |
| 866 | "end": "A String", # [TrustedTester] [Required] The end of range partitioning, exclusive. |
| 867 | "interval": "A String", # [TrustedTester] [Required] The width of each interval. |
| 868 | }, |
| 869 | "field": "A String", # [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. |
| 870 | }, |
| 871 | "id": "A String", # An opaque ID of the table |
| 872 | "kind": "bigquery#table", # The resource type. |
| 873 | "tableReference": { # A reference uniquely identifying the table. |
| 874 | "tableId": "A String", # [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. |
| 875 | "datasetId": "A String", # [Required] The ID of the dataset containing this table. |
| 876 | "projectId": "A String", # [Required] The ID of the project containing this table. |
| 877 | }, |
| 878 | "expirationTime": "A String", # [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. |
| 879 | "timePartitioning": { # The time-based partitioning specification for this table, if configured. |
| 880 | "type": "A String", # [Required] The supported types are DAY, HOUR, MONTH, and YEAR, which will generate one partition per day, hour, month, and year, respectively. When the type is not specified, the default behavior is DAY. |
| 881 | "expirationMs": "A String", # [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. |
| 882 | "field": "A String", # [Beta] [Optional] If not set, the table is partitioned by pseudo column, referenced via either '_PARTITIONTIME' as TIMESTAMP type, or '_PARTITIONDATE' 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. |
| 883 | "requirePartitionFilter": True or False, |
| 884 | }, |
| 885 | "friendlyName": "A String", # The user-friendly name for this table. |
| 886 | "creationTime": "A String", # The time when this table was created, in milliseconds since the epoch. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 887 | "clustering": { # [Beta] Clustering specification for this table, if configured. |
| 888 | "fields": [ # [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. |
| 889 | "A String", |
| 890 | ], |
| 891 | }, |
John Asmuth | 614db98 | 2014-04-24 15:46:26 -0400 | [diff] [blame] | 892 | }, |
| 893 | ], |
John Asmuth | 614db98 | 2014-04-24 15:46:26 -0400 | [diff] [blame] | 894 | }</pre> |
| 895 | </div> |
| 896 | |
| 897 | <div class="method"> |
| 898 | <code class="details" id="list_next">list_next(previous_request, previous_response)</code> |
| 899 | <pre>Retrieves the next page of results. |
| 900 | |
| 901 | Args: |
| 902 | previous_request: The request for the previous page. (required) |
| 903 | previous_response: The response from the request for the previous page. (required) |
| 904 | |
| 905 | Returns: |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 906 | A request object that you can call 'execute()' on to request the next |
John Asmuth | 614db98 | 2014-04-24 15:46:26 -0400 | [diff] [blame] | 907 | page. Returns None if there are no more items in the collection. |
| 908 | </pre> |
| 909 | </div> |
| 910 | |
| 911 | <div class="method"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 912 | <code class="details" id="patch">patch(projectId, datasetId, tableId, body=None)</code> |
John Asmuth | 614db98 | 2014-04-24 15:46:26 -0400 | [diff] [blame] | 913 | <pre>Updates information in an existing table. The update method replaces the entire table resource, whereas the patch method only replaces fields that are provided in the submitted table resource. This method supports patch semantics. |
| 914 | |
| 915 | Args: |
| 916 | projectId: string, Project ID of the table to update (required) |
| 917 | datasetId: string, Dataset ID of the table to update (required) |
| 918 | tableId: string, Table ID of the table to update (required) |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 919 | body: object, The request body. |
John Asmuth | 614db98 | 2014-04-24 15:46:26 -0400 | [diff] [blame] | 920 | The object takes the form of: |
| 921 | |
| 922 | { |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame^] | 923 | "view": { # [Optional] The view definition. |
| 924 | "userDefinedFunctionResources": [ # Describes user-defined function resources used in the query. |
| 925 | { # This is used for defining User Defined Function (UDF) resources only when using legacy SQL. Users of Standard SQL should leverage either DDL (e.g. CREATE [TEMPORARY] FUNCTION ... ) or the Routines API to define UDF resources. For additional information on migrating, see: https://cloud.google.com/bigquery/docs/reference/standard-sql/migrating-from-legacy-sql#differences_in_user-defined_javascript_functions |
| 926 | "inlineCode": "A String", # [Pick one] An inline resource that contains code for a user-defined function (UDF). Providing a inline code resource is equivalent to providing a URI for a file containing the same code. |
| 927 | "resourceUri": "A String", # [Pick one] A code resource to load from a Google Cloud Storage URI (gs://bucket/path). |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 928 | }, |
| 929 | ], |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame^] | 930 | "query": "A String", # [Required] A query that BigQuery executes when the view is referenced. |
| 931 | "useLegacySql": True or False, # Specifies whether to use BigQuery's legacy SQL for this view. The default value is true. If set to false, the view will use BigQuery's standard SQL: https://cloud.google.com/bigquery/sql-reference/ Queries and views that reference this view must use the same flag value. |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 932 | }, |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame^] | 933 | "selfLink": "A String", # [Output-only] A URL that can be used to access this resource again. |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 934 | "type": "A String", # [Output-only] Describes the table type. The following values are supported: TABLE: A normal BigQuery table. VIEW: A virtual table defined by a SQL query. SNAPSHOT: An immutable, read-only table that is a copy of another table. [TrustedTester] MATERIALIZED_VIEW: SQL query whose result is persisted. EXTERNAL: A table that references data stored in an external storage system, such as Google Cloud Storage. The default value is TABLE. |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame^] | 935 | "friendlyName": "A String", # [Optional] A descriptive name for this table. |
| 936 | "streamingBuffer": { # [Output-only] Contains information regarding this table'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. |
| 937 | "estimatedRows": "A String", # [Output-only] A lower-bound estimate of the number of rows currently in the streaming buffer. |
| 938 | "estimatedBytes": "A String", # [Output-only] A lower-bound estimate of the number of bytes currently in the streaming buffer. |
| 939 | "oldestEntryTime": "A String", # [Output-only] Contains the timestamp of the oldest entry in the streaming buffer, in milliseconds since the epoch, if the streaming buffer is available. |
| 940 | }, |
| 941 | "etag": "A String", # [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. |
| 942 | "labels": { # 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. |
| 943 | "a_key": "A String", |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 944 | }, |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 945 | "tableReference": { # [Required] Reference describing the ID of this table. |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame^] | 946 | "tableId": "A String", # [Required] The ID of the table. The ID must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_). The maximum length is 1,024 characters. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 947 | "datasetId": "A String", # [Required] The ID of the dataset containing this table. |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 948 | "projectId": "A String", # [Required] The ID of the project containing this table. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 949 | }, |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 950 | "model": { # [Output-only, Beta] Present iff this table represents a ML model. Describes the training information for the model, and it is required to run 'PREDICT' queries. |
| 951 | "modelOptions": { # [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. |
| 952 | "lossType": "A String", |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame^] | 953 | "modelType": "A String", |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 954 | "labels": [ |
| 955 | "A String", |
| 956 | ], |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 957 | }, |
| 958 | "trainingRuns": [ # [Output-only, Beta] Information about ml training runs, each training run comprises of multiple iterations and there may be multiple training runs for the model if warm start is used or if a user decides to continue a previously cancelled query. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 959 | { |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame^] | 960 | "trainingOptions": { # [Output-only, Beta] Training options used by this training run. These options are mutable for subsequent training runs. Default values are explicitly stored for options not specified in the input query of the first training run. For subsequent training runs, any option not explicitly specified in the input query will be copied from the previous training run. |
| 961 | "l1Reg": 3.14, |
| 962 | "lineSearchInitLearnRate": 3.14, |
| 963 | "earlyStop": True or False, |
| 964 | "l2Reg": 3.14, |
| 965 | "learnRateStrategy": "A String", |
| 966 | "learnRate": 3.14, |
| 967 | "maxIteration": "A String", |
| 968 | "minRelProgress": 3.14, |
| 969 | "warmStart": True or False, |
| 970 | }, |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 971 | "state": "A String", # [Output-only, Beta] Different state applicable for a training run. IN PROGRESS: Training run is in progress. FAILED: Training run ended due to a non-retryable failure. SUCCEEDED: Training run successfully completed. CANCELLED: Training run cancelled by the user. |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 972 | "startTime": "A String", # [Output-only, Beta] Training run start time in milliseconds since the epoch. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 973 | "iterationResults": [ # [Output-only, Beta] List of each iteration results. |
| 974 | { |
| 975 | "index": 42, # [Output-only, Beta] Index of the ML training iteration, starting from zero for each training run. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 976 | "learnRate": 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. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 977 | "trainingLoss": 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. |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame^] | 978 | "durationMs": "A String", # [Output-only, Beta] Time taken to run the training iteration in milliseconds. |
| 979 | "evalLoss": 3.14, # [Output-only, Beta] Eval loss computed on the eval data at the end of the iteration. The eval loss is used for early stopping to avoid overfitting. No eval loss if eval_split_method option is specified as no_split or auto_split with input data size less than 500 rows. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 980 | }, |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 981 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 982 | }, |
| 983 | ], |
| 984 | }, |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame^] | 985 | "encryptionConfiguration": { # Custom encryption configuration (e.g., Cloud KMS keys). |
| 986 | "kmsKeyName": "A String", # [Optional] Describes the Cloud KMS encryption key that will be used to protect destination BigQuery table. The BigQuery Service Account associated with your project requires access to this encryption key. |
| 987 | }, |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 988 | "snapshotDefinition": { # [Output-only] Snapshot definition. |
| 989 | "baseTableReference": { # [Required] Reference describing the ID of the table that is snapshotted. |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame^] | 990 | "tableId": "A String", # [Required] The ID of the table. The ID must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_). The maximum length is 1,024 characters. |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 991 | "datasetId": "A String", # [Required] The ID of the dataset containing this table. |
| 992 | "projectId": "A String", # [Required] The ID of the project containing this table. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 993 | }, |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 994 | "snapshotTime": "A String", # [Required] The time at which the base table was snapshot. |
| 995 | }, |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame^] | 996 | "expirationTime": "A String", # [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. |
| 997 | "numBytes": "A String", # [Output-only] The size of this table in bytes, excluding any data in the streaming buffer. |
| 998 | "id": "A String", # [Output-only] An opaque ID uniquely identifying the table. |
| 999 | "numRows": "A String", # [Output-only] The number of rows of data in this table, excluding any data in the streaming buffer. |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 1000 | "timePartitioning": { # Time-based partitioning specification for this table. Only one of timePartitioning and rangePartitioning should be specified. |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 1001 | "type": "A String", # [Required] The supported types are DAY, HOUR, MONTH, and YEAR, which will generate one partition per day, hour, month, and year, respectively. When the type is not specified, the default behavior is DAY. |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame^] | 1002 | "expirationMs": "A String", # [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. |
| 1003 | "field": "A String", # [Beta] [Optional] If not set, the table is partitioned by pseudo column, referenced via either '_PARTITIONTIME' as TIMESTAMP type, or '_PARTITIONDATE' 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. |
| 1004 | "requirePartitionFilter": True or False, |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 1005 | }, |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame^] | 1006 | "numPhysicalBytes": "A String", # [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. |
| 1007 | "lastModifiedTime": "A String", # [Output-only] The time when this table was last modified, in milliseconds since the epoch. |
| 1008 | "requirePartitionFilter": false, # [Optional] If set to true, queries over this table require a partition filter that can be used for partition elimination to be specified. |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 1009 | "materializedView": { # [Optional] Materialized view definition. |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame^] | 1010 | "refreshIntervalMs": "A String", # [Optional] [TrustedTester] The maximum frequency at which this materialized view will be refreshed. The default value is "1800000" (30 minutes). |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 1011 | "lastRefreshTime": "A String", # [Output-only] [TrustedTester] The time when this materialized view was last modified, in milliseconds since the epoch. |
| 1012 | "enableRefresh": True or False, # [Optional] [TrustedTester] Enable automatic refresh of the materialized view when the base table is updated. The default value is "true". |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame^] | 1013 | "query": "A String", # [Required] A query whose result is persisted. |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 1014 | }, |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame^] | 1015 | "numLongTermBytes": "A String", # [Output-only] The number of bytes in the table that are considered "long-term storage". |
| 1016 | "rangePartitioning": { # [TrustedTester] Range partitioning specification for this table. Only one of timePartitioning and rangePartitioning should be specified. |
| 1017 | "range": { # [TrustedTester] [Required] Defines the ranges for range partitioning. |
| 1018 | "start": "A String", # [TrustedTester] [Required] The start of range partitioning, inclusive. |
| 1019 | "end": "A String", # [TrustedTester] [Required] The end of range partitioning, exclusive. |
| 1020 | "interval": "A String", # [TrustedTester] [Required] The width of each interval. |
| 1021 | }, |
| 1022 | "field": "A String", # [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. |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 1023 | }, |
| 1024 | "clustering": { # [Beta] Clustering specification for the table. Must be specified with partitioning, data in the table will be first partitioned and subsequently clustered. |
| 1025 | "fields": [ # [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. |
| 1026 | "A String", |
| 1027 | ], |
| 1028 | }, |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame^] | 1029 | "externalDataConfiguration": { # [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. |
| 1030 | "sourceFormat": "A String", # [Required] The data format. For CSV files, specify "CSV". For Google sheets, specify "GOOGLE_SHEETS". For newline-delimited JSON, specify "NEWLINE_DELIMITED_JSON". For Avro files, specify "AVRO". For Google Cloud Datastore backups, specify "DATASTORE_BACKUP". [Beta] For Google Cloud Bigtable, specify "BIGTABLE". |
| 1031 | "schema": { # [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. |
| 1032 | "fields": [ # Describes the fields in a table. |
| 1033 | { |
| 1034 | "categories": { # [Optional] The categories attached to this field, used for field-level access control. |
| 1035 | "names": [ # A list of category resource names. For example, "projects/1/taxonomies/2/categories/3". At most 5 categories are allowed. |
| 1036 | "A String", |
| 1037 | ], |
| 1038 | }, |
| 1039 | "policyTags": { |
| 1040 | "names": [ # A list of category resource names. For example, "projects/1/location/eu/taxonomies/2/policyTags/3". At most 1 policy tag is allowed. |
| 1041 | "A String", |
| 1042 | ], |
| 1043 | }, |
| 1044 | "name": "A String", # [Required] The field name. The name must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_), and must start with a letter or underscore. The maximum length is 128 characters. |
| 1045 | "type": "A String", # [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). |
| 1046 | "fields": [ # [Optional] Describes the nested schema fields if the type property is set to RECORD. |
| 1047 | # Object with schema name: TableFieldSchema |
| 1048 | ], |
| 1049 | "description": "A String", # [Optional] The field description. The maximum length is 1,024 characters. |
| 1050 | "mode": "A String", # [Optional] The field mode. Possible values include NULLABLE, REQUIRED and REPEATED. The default value is NULLABLE. |
| 1051 | }, |
| 1052 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1053 | }, |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame^] | 1054 | "ignoreUnknownValues": 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'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. |
| 1055 | "maxBadRecords": 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. |
| 1056 | "hivePartitioningOptions": { # [Optional, Trusted Tester] Options to configure hive partitioning support. |
| 1057 | "sourceUriPrefix": "A String", # [Optional] When hive partition detection is requested, a common prefix for all source uris should be supplied. The prefix must end immediately before the partition key encoding begins. For example, consider files following this data layout. gs://bucket/path_to_table/dt=2019-01-01/country=BR/id=7/file.avro gs://bucket/path_to_table/dt=2018-12-31/country=CA/id=3/file.avro When hive partitioning is requested with either AUTO or STRINGS detection, the common prefix can be either of gs://bucket/path_to_table or gs://bucket/path_to_table/ (trailing slash does not matter). |
| 1058 | "requirePartitionFilter": True or False, # [Optional] If set to true, queries over this table require a partition filter that can be used for partition elimination to be specified. Note that this field should only be true when creating a permanent external table or querying a temporary external table. Hive-partitioned loads with requirePartitionFilter explicitly set to true will fail. |
| 1059 | "mode": "A String", # [Optional] When set, what mode of hive partitioning to use when reading data. The following modes are supported. (1) AUTO: automatically infer partition key name(s) and type(s). (2) STRINGS: automatically infer partition key name(s). All types are interpreted as strings. (3) CUSTOM: partition key schema is encoded in the source URI prefix. Not all storage formats support hive partitioning. Requesting hive partitioning on an unsupported format will lead to an error. Currently supported types include: AVRO, CSV, JSON, ORC and Parquet. |
| 1060 | }, |
| 1061 | "connectionId": "A String", # [Optional, Trusted Tester] Connection for external data source. |
| 1062 | "sourceUris": [ # [Required] The fully-qualified URIs that point to your data in Google Cloud. For Google Cloud Storage URIs: Each URI can contain one '*' wildcard character and it must come after the 'bucket' name. Size limits related to load jobs apply to external data sources. For Google Cloud Bigtable URIs: Exactly one URI can be specified and it has be a fully specified and valid HTTPS URL for a Google Cloud Bigtable table. For Google Cloud Datastore backups, exactly one URI can be specified. Also, the '*' wildcard character is not allowed. |
| 1063 | "A String", |
| 1064 | ], |
| 1065 | "googleSheetsOptions": { # [Optional] Additional options if sourceFormat is set to GOOGLE_SHEETS. |
| 1066 | "skipLeadingRows": "A String", # [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 > 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. |
| 1067 | "range": "A String", # [Optional] Range of a sheet to query from. Only used when non-empty. Typical format: sheet_name!top_left_cell_id:bottom_right_cell_id For example: sheet1!A1:B20 |
| 1068 | }, |
| 1069 | "autodetect": True or False, # Try to detect schema and format options automatically. Any option specified explicitly will be honored. |
| 1070 | "compression": "A String", # [Optional] The compression type of the data source. Possible values include GZIP and NONE. The default value is NONE. This setting is ignored for Google Cloud Bigtable, Google Cloud Datastore backups and Avro formats. |
| 1071 | "csvOptions": { # Additional properties to set if sourceFormat is set to CSV. |
| 1072 | "encoding": "A String", # [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. |
| 1073 | "quote": """, # [Optional] The value that is used to quote data sections in a CSV file. BigQuery converts the string to ISO-8859-1 encoding, and then uses the first byte of the encoded string to split the data in its raw, binary state. The default value is a double-quote ('"'). If your data does not contain quoted sections, set the property value to an empty string. If your data contains quoted newline characters, you must also set the allowQuotedNewlines property to true. |
| 1074 | "skipLeadingRows": "A String", # [Optional] The number of rows at the top of a CSV file that BigQuery will skip when reading the data. The default value is 0. This property is useful if you have header rows in the file that should be skipped. When autodetect is on, the behavior is the following: * skipLeadingRows unspecified - Autodetect tries to detect headers in the first row. If they are not detected, the row is read as data. Otherwise data is read starting from the second row. * skipLeadingRows is 0 - Instructs autodetect that there are no headers and data should be read starting from the first row. * skipLeadingRows = N > 0 - Autodetect skips N-1 rows and tries to detect headers in row N. If headers are not detected, row N is just skipped. Otherwise row N is used to extract column names for the detected schema. |
| 1075 | "allowJaggedRows": 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. |
| 1076 | "allowQuotedNewlines": 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. |
| 1077 | "fieldDelimiter": "A String", # [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 "\t" to specify a tab separator. The default value is a comma (','). |
| 1078 | }, |
| 1079 | "bigtableOptions": { # [Optional] Additional options if sourceFormat is set to BIGTABLE. |
| 1080 | "readRowkeyAsString": 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. |
| 1081 | "ignoreUnspecifiedColumnFamilies": 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. |
| 1082 | "columnFamilies": [ # [Optional] List of column families to expose in the table schema along with their types. This list restricts the column families that can be referenced in queries and specifies their value types. You can use this list to do type conversions - see the 'type' field for more details. If you leave this list empty, all column families are present in the table schema and their values are read as BYTES. During a query only the column families referenced in that query are read from Bigtable. |
| 1083 | { |
| 1084 | "onlyReadLatest": 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 'columns' and specifying a different setting for that column. |
| 1085 | "encoding": "A String", # [Optional] The encoding of the values when the type is not STRING. Acceptable encoding values are: TEXT - indicates values are alphanumeric text strings. BINARY - indicates values are encoded using HBase Bytes.toBytes family of functions. This can be overridden for a specific column by listing that column in 'columns' and specifying an encoding for it. |
| 1086 | "columns": [ # [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. |
| 1087 | { |
| 1088 | "fieldName": "A String", # [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. |
| 1089 | "qualifierString": "A String", |
| 1090 | "onlyReadLatest": True or False, # [Optional] If this is set, only the latest version of value in this column are exposed. 'onlyReadLatest' can also be set at the column family level. However, the setting at this level takes precedence if 'onlyReadLatest' is set at both levels. |
| 1091 | "type": "A String", # [Optional] The type to convert the value in cells of this column. The values are expected to be encoded using HBase Bytes.toBytes function when using the BINARY encoding value. Following BigQuery types are allowed (case-sensitive) - BYTES STRING INTEGER FLOAT BOOLEAN Default type is BYTES. 'type' can also be set at the column family level. However, the setting at this level takes precedence if 'type' is set at both levels. |
| 1092 | "encoding": "A String", # [Optional] The encoding of the values when the type is not STRING. Acceptable encoding values are: TEXT - indicates values are alphanumeric text strings. BINARY - indicates values are encoded using HBase Bytes.toBytes family of functions. 'encoding' can also be set at the column family level. However, the setting at this level takes precedence if 'encoding' is set at both levels. |
| 1093 | "qualifierEncoded": "A String", # [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. |
| 1094 | }, |
| 1095 | ], |
| 1096 | "type": "A String", # [Optional] The type to convert the value in cells of this column family. The values are expected to be encoded using HBase Bytes.toBytes function when using the BINARY encoding value. Following BigQuery types are allowed (case-sensitive) - BYTES STRING INTEGER FLOAT BOOLEAN Default type is BYTES. This can be overridden for a specific column by listing that column in 'columns' and specifying a type for it. |
| 1097 | "familyId": "A String", # Identifier of the column family. |
| 1098 | }, |
| 1099 | ], |
| 1100 | }, |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 1101 | }, |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame^] | 1102 | "description": "A String", # [Optional] A user-friendly description of this table. |
| 1103 | "creationTime": "A String", # [Output-only] The time when this table was created, in milliseconds since the epoch. |
| 1104 | "schema": { # [Optional] Describes the schema of this table. |
| 1105 | "fields": [ # Describes the fields in a table. |
| 1106 | { |
| 1107 | "categories": { # [Optional] The categories attached to this field, used for field-level access control. |
| 1108 | "names": [ # A list of category resource names. For example, "projects/1/taxonomies/2/categories/3". At most 5 categories are allowed. |
| 1109 | "A String", |
| 1110 | ], |
| 1111 | }, |
| 1112 | "policyTags": { |
| 1113 | "names": [ # A list of category resource names. For example, "projects/1/location/eu/taxonomies/2/policyTags/3". At most 1 policy tag is allowed. |
| 1114 | "A String", |
| 1115 | ], |
| 1116 | }, |
| 1117 | "name": "A String", # [Required] The field name. The name must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_), and must start with a letter or underscore. The maximum length is 128 characters. |
| 1118 | "type": "A String", # [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). |
| 1119 | "fields": [ # [Optional] Describes the nested schema fields if the type property is set to RECORD. |
| 1120 | # Object with schema name: TableFieldSchema |
| 1121 | ], |
| 1122 | "description": "A String", # [Optional] The field description. The maximum length is 1,024 characters. |
| 1123 | "mode": "A String", # [Optional] The field mode. Possible values include NULLABLE, REQUIRED and REPEATED. The default value is NULLABLE. |
| 1124 | }, |
| 1125 | ], |
| 1126 | }, |
| 1127 | "location": "A String", # [Output-only] The geographic location where the table resides. This value is inherited from the dataset. |
| 1128 | "kind": "bigquery#table", # [Output-only] The type of the resource. |
| 1129 | } |
| 1130 | |
| 1131 | |
| 1132 | Returns: |
| 1133 | An object of the form: |
| 1134 | |
| 1135 | { |
| 1136 | "view": { # [Optional] The view definition. |
| 1137 | "userDefinedFunctionResources": [ # Describes user-defined function resources used in the query. |
| 1138 | { # This is used for defining User Defined Function (UDF) resources only when using legacy SQL. Users of Standard SQL should leverage either DDL (e.g. CREATE [TEMPORARY] FUNCTION ... ) or the Routines API to define UDF resources. For additional information on migrating, see: https://cloud.google.com/bigquery/docs/reference/standard-sql/migrating-from-legacy-sql#differences_in_user-defined_javascript_functions |
| 1139 | "inlineCode": "A String", # [Pick one] An inline resource that contains code for a user-defined function (UDF). Providing a inline code resource is equivalent to providing a URI for a file containing the same code. |
| 1140 | "resourceUri": "A String", # [Pick one] A code resource to load from a Google Cloud Storage URI (gs://bucket/path). |
| 1141 | }, |
| 1142 | ], |
| 1143 | "query": "A String", # [Required] A query that BigQuery executes when the view is referenced. |
| 1144 | "useLegacySql": True or False, # Specifies whether to use BigQuery's legacy SQL for this view. The default value is true. If set to false, the view will use BigQuery's standard SQL: https://cloud.google.com/bigquery/sql-reference/ Queries and views that reference this view must use the same flag value. |
| 1145 | }, |
| 1146 | "selfLink": "A String", # [Output-only] A URL that can be used to access this resource again. |
| 1147 | "type": "A String", # [Output-only] Describes the table type. The following values are supported: TABLE: A normal BigQuery table. VIEW: A virtual table defined by a SQL query. SNAPSHOT: An immutable, read-only table that is a copy of another table. [TrustedTester] MATERIALIZED_VIEW: SQL query whose result is persisted. EXTERNAL: A table that references data stored in an external storage system, such as Google Cloud Storage. The default value is TABLE. |
| 1148 | "friendlyName": "A String", # [Optional] A descriptive name for this table. |
| 1149 | "streamingBuffer": { # [Output-only] Contains information regarding this table'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. |
| 1150 | "estimatedRows": "A String", # [Output-only] A lower-bound estimate of the number of rows currently in the streaming buffer. |
| 1151 | "estimatedBytes": "A String", # [Output-only] A lower-bound estimate of the number of bytes currently in the streaming buffer. |
| 1152 | "oldestEntryTime": "A String", # [Output-only] Contains the timestamp of the oldest entry in the streaming buffer, in milliseconds since the epoch, if the streaming buffer is available. |
| 1153 | }, |
| 1154 | "etag": "A String", # [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. |
| 1155 | "labels": { # 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. |
| 1156 | "a_key": "A String", |
| 1157 | }, |
| 1158 | "tableReference": { # [Required] Reference describing the ID of this table. |
| 1159 | "tableId": "A String", # [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. |
| 1160 | "datasetId": "A String", # [Required] The ID of the dataset containing this table. |
| 1161 | "projectId": "A String", # [Required] The ID of the project containing this table. |
| 1162 | }, |
| 1163 | "model": { # [Output-only, Beta] Present iff this table represents a ML model. Describes the training information for the model, and it is required to run 'PREDICT' queries. |
| 1164 | "modelOptions": { # [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. |
| 1165 | "lossType": "A String", |
| 1166 | "modelType": "A String", |
| 1167 | "labels": [ |
| 1168 | "A String", |
| 1169 | ], |
| 1170 | }, |
| 1171 | "trainingRuns": [ # [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. |
| 1172 | { |
| 1173 | "trainingOptions": { # [Output-only, Beta] Training options used by this training run. These options are mutable for subsequent training runs. Default values are explicitly stored for options not specified in the input query of the first training run. For subsequent training runs, any option not explicitly specified in the input query will be copied from the previous training run. |
| 1174 | "l1Reg": 3.14, |
| 1175 | "lineSearchInitLearnRate": 3.14, |
| 1176 | "earlyStop": True or False, |
| 1177 | "l2Reg": 3.14, |
| 1178 | "learnRateStrategy": "A String", |
| 1179 | "learnRate": 3.14, |
| 1180 | "maxIteration": "A String", |
| 1181 | "minRelProgress": 3.14, |
| 1182 | "warmStart": True or False, |
| 1183 | }, |
| 1184 | "state": "A String", # [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. |
| 1185 | "startTime": "A String", # [Output-only, Beta] Training run start time in milliseconds since the epoch. |
| 1186 | "iterationResults": [ # [Output-only, Beta] List of each iteration results. |
| 1187 | { |
| 1188 | "index": 42, # [Output-only, Beta] Index of the ML training iteration, starting from zero for each training run. |
| 1189 | "learnRate": 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. |
| 1190 | "trainingLoss": 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. |
| 1191 | "durationMs": "A String", # [Output-only, Beta] Time taken to run the training iteration in milliseconds. |
| 1192 | "evalLoss": 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. |
| 1193 | }, |
| 1194 | ], |
| 1195 | }, |
| 1196 | ], |
| 1197 | }, |
| 1198 | "encryptionConfiguration": { # Custom encryption configuration (e.g., Cloud KMS keys). |
| 1199 | "kmsKeyName": "A String", # [Optional] Describes the Cloud KMS encryption key that will be used to protect destination BigQuery table. The BigQuery Service Account associated with your project requires access to this encryption key. |
| 1200 | }, |
| 1201 | "snapshotDefinition": { # [Output-only] Snapshot definition. |
| 1202 | "baseTableReference": { # [Required] Reference describing the ID of the table that is snapshotted. |
| 1203 | "tableId": "A String", # [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. |
| 1204 | "datasetId": "A String", # [Required] The ID of the dataset containing this table. |
| 1205 | "projectId": "A String", # [Required] The ID of the project containing this table. |
| 1206 | }, |
| 1207 | "snapshotTime": "A String", # [Required] The time at which the base table was snapshot. |
| 1208 | }, |
| 1209 | "expirationTime": "A String", # [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. |
| 1210 | "numBytes": "A String", # [Output-only] The size of this table in bytes, excluding any data in the streaming buffer. |
| 1211 | "id": "A String", # [Output-only] An opaque ID uniquely identifying the table. |
| 1212 | "numRows": "A String", # [Output-only] The number of rows of data in this table, excluding any data in the streaming buffer. |
| 1213 | "timePartitioning": { # Time-based partitioning specification for this table. Only one of timePartitioning and rangePartitioning should be specified. |
| 1214 | "type": "A String", # [Required] The supported types are DAY, HOUR, MONTH, and YEAR, which will generate one partition per day, hour, month, and year, respectively. When the type is not specified, the default behavior is DAY. |
| 1215 | "expirationMs": "A String", # [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. |
| 1216 | "field": "A String", # [Beta] [Optional] If not set, the table is partitioned by pseudo column, referenced via either '_PARTITIONTIME' as TIMESTAMP type, or '_PARTITIONDATE' 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. |
| 1217 | "requirePartitionFilter": True or False, |
| 1218 | }, |
| 1219 | "numPhysicalBytes": "A String", # [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. |
| 1220 | "lastModifiedTime": "A String", # [Output-only] The time when this table was last modified, in milliseconds since the epoch. |
| 1221 | "requirePartitionFilter": false, # [Optional] If set to true, queries over this table require a partition filter that can be used for partition elimination to be specified. |
| 1222 | "materializedView": { # [Optional] Materialized view definition. |
| 1223 | "refreshIntervalMs": "A String", # [Optional] [TrustedTester] The maximum frequency at which this materialized view will be refreshed. The default value is "1800000" (30 minutes). |
| 1224 | "lastRefreshTime": "A String", # [Output-only] [TrustedTester] The time when this materialized view was last modified, in milliseconds since the epoch. |
| 1225 | "enableRefresh": True or False, # [Optional] [TrustedTester] Enable automatic refresh of the materialized view when the base table is updated. The default value is "true". |
| 1226 | "query": "A String", # [Required] A query whose result is persisted. |
| 1227 | }, |
| 1228 | "numLongTermBytes": "A String", # [Output-only] The number of bytes in the table that are considered "long-term storage". |
| 1229 | "rangePartitioning": { # [TrustedTester] Range partitioning specification for this table. Only one of timePartitioning and rangePartitioning should be specified. |
| 1230 | "range": { # [TrustedTester] [Required] Defines the ranges for range partitioning. |
| 1231 | "start": "A String", # [TrustedTester] [Required] The start of range partitioning, inclusive. |
| 1232 | "end": "A String", # [TrustedTester] [Required] The end of range partitioning, exclusive. |
| 1233 | "interval": "A String", # [TrustedTester] [Required] The width of each interval. |
| 1234 | }, |
| 1235 | "field": "A String", # [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. |
| 1236 | }, |
| 1237 | "clustering": { # [Beta] Clustering specification for the table. Must be specified with partitioning, data in the table will be first partitioned and subsequently clustered. |
| 1238 | "fields": [ # [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. |
| 1239 | "A String", |
| 1240 | ], |
| 1241 | }, |
| 1242 | "externalDataConfiguration": { # [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. |
| 1243 | "sourceFormat": "A String", # [Required] The data format. For CSV files, specify "CSV". For Google sheets, specify "GOOGLE_SHEETS". For newline-delimited JSON, specify "NEWLINE_DELIMITED_JSON". For Avro files, specify "AVRO". For Google Cloud Datastore backups, specify "DATASTORE_BACKUP". [Beta] For Google Cloud Bigtable, specify "BIGTABLE". |
| 1244 | "schema": { # [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. |
| 1245 | "fields": [ # Describes the fields in a table. |
| 1246 | { |
| 1247 | "categories": { # [Optional] The categories attached to this field, used for field-level access control. |
| 1248 | "names": [ # A list of category resource names. For example, "projects/1/taxonomies/2/categories/3". At most 5 categories are allowed. |
| 1249 | "A String", |
| 1250 | ], |
| 1251 | }, |
| 1252 | "policyTags": { |
| 1253 | "names": [ # A list of category resource names. For example, "projects/1/location/eu/taxonomies/2/policyTags/3". At most 1 policy tag is allowed. |
| 1254 | "A String", |
| 1255 | ], |
| 1256 | }, |
| 1257 | "name": "A String", # [Required] The field name. The name must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_), and must start with a letter or underscore. The maximum length is 128 characters. |
| 1258 | "type": "A String", # [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). |
| 1259 | "fields": [ # [Optional] Describes the nested schema fields if the type property is set to RECORD. |
| 1260 | # Object with schema name: TableFieldSchema |
| 1261 | ], |
| 1262 | "description": "A String", # [Optional] The field description. The maximum length is 1,024 characters. |
| 1263 | "mode": "A String", # [Optional] The field mode. Possible values include NULLABLE, REQUIRED and REPEATED. The default value is NULLABLE. |
| 1264 | }, |
| 1265 | ], |
| 1266 | }, |
| 1267 | "ignoreUnknownValues": 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'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. |
| 1268 | "maxBadRecords": 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. |
| 1269 | "hivePartitioningOptions": { # [Optional, Trusted Tester] Options to configure hive partitioning support. |
| 1270 | "sourceUriPrefix": "A String", # [Optional] When hive partition detection is requested, a common prefix for all source uris should be supplied. The prefix must end immediately before the partition key encoding begins. For example, consider files following this data layout. gs://bucket/path_to_table/dt=2019-01-01/country=BR/id=7/file.avro gs://bucket/path_to_table/dt=2018-12-31/country=CA/id=3/file.avro When hive partitioning is requested with either AUTO or STRINGS detection, the common prefix can be either of gs://bucket/path_to_table or gs://bucket/path_to_table/ (trailing slash does not matter). |
| 1271 | "requirePartitionFilter": True or False, # [Optional] If set to true, queries over this table require a partition filter that can be used for partition elimination to be specified. Note that this field should only be true when creating a permanent external table or querying a temporary external table. Hive-partitioned loads with requirePartitionFilter explicitly set to true will fail. |
| 1272 | "mode": "A String", # [Optional] When set, what mode of hive partitioning to use when reading data. The following modes are supported. (1) AUTO: automatically infer partition key name(s) and type(s). (2) STRINGS: automatically infer partition key name(s). All types are interpreted as strings. (3) CUSTOM: partition key schema is encoded in the source URI prefix. Not all storage formats support hive partitioning. Requesting hive partitioning on an unsupported format will lead to an error. Currently supported types include: AVRO, CSV, JSON, ORC and Parquet. |
| 1273 | }, |
| 1274 | "connectionId": "A String", # [Optional, Trusted Tester] Connection for external data source. |
| 1275 | "sourceUris": [ # [Required] The fully-qualified URIs that point to your data in Google Cloud. For Google Cloud Storage URIs: Each URI can contain one '*' wildcard character and it must come after the 'bucket' name. Size limits related to load jobs apply to external data sources. For Google Cloud Bigtable URIs: Exactly one URI can be specified and it has be a fully specified and valid HTTPS URL for a Google Cloud Bigtable table. For Google Cloud Datastore backups, exactly one URI can be specified. Also, the '*' wildcard character is not allowed. |
| 1276 | "A String", |
| 1277 | ], |
| 1278 | "googleSheetsOptions": { # [Optional] Additional options if sourceFormat is set to GOOGLE_SHEETS. |
| 1279 | "skipLeadingRows": "A String", # [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 > 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. |
| 1280 | "range": "A String", # [Optional] Range of a sheet to query from. Only used when non-empty. Typical format: sheet_name!top_left_cell_id:bottom_right_cell_id For example: sheet1!A1:B20 |
| 1281 | }, |
| 1282 | "autodetect": True or False, # Try to detect schema and format options automatically. Any option specified explicitly will be honored. |
| 1283 | "compression": "A String", # [Optional] The compression type of the data source. Possible values include GZIP and NONE. The default value is NONE. This setting is ignored for Google Cloud Bigtable, Google Cloud Datastore backups and Avro formats. |
| 1284 | "csvOptions": { # Additional properties to set if sourceFormat is set to CSV. |
| 1285 | "encoding": "A String", # [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. |
| 1286 | "quote": """, # [Optional] The value that is used to quote data sections in a CSV file. BigQuery converts the string to ISO-8859-1 encoding, and then uses the first byte of the encoded string to split the data in its raw, binary state. The default value is a double-quote ('"'). If your data does not contain quoted sections, set the property value to an empty string. If your data contains quoted newline characters, you must also set the allowQuotedNewlines property to true. |
| 1287 | "skipLeadingRows": "A String", # [Optional] The number of rows at the top of a CSV file that BigQuery will skip when reading the data. The default value is 0. This property is useful if you have header rows in the file that should be skipped. When autodetect is on, the behavior is the following: * skipLeadingRows unspecified - Autodetect tries to detect headers in the first row. If they are not detected, the row is read as data. Otherwise data is read starting from the second row. * skipLeadingRows is 0 - Instructs autodetect that there are no headers and data should be read starting from the first row. * skipLeadingRows = N > 0 - Autodetect skips N-1 rows and tries to detect headers in row N. If headers are not detected, row N is just skipped. Otherwise row N is used to extract column names for the detected schema. |
| 1288 | "allowJaggedRows": 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. |
| 1289 | "allowQuotedNewlines": 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. |
| 1290 | "fieldDelimiter": "A String", # [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 "\t" to specify a tab separator. The default value is a comma (','). |
| 1291 | }, |
| 1292 | "bigtableOptions": { # [Optional] Additional options if sourceFormat is set to BIGTABLE. |
| 1293 | "readRowkeyAsString": 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. |
| 1294 | "ignoreUnspecifiedColumnFamilies": 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. |
| 1295 | "columnFamilies": [ # [Optional] List of column families to expose in the table schema along with their types. This list restricts the column families that can be referenced in queries and specifies their value types. You can use this list to do type conversions - see the 'type' field for more details. If you leave this list empty, all column families are present in the table schema and their values are read as BYTES. During a query only the column families referenced in that query are read from Bigtable. |
| 1296 | { |
| 1297 | "onlyReadLatest": 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 'columns' and specifying a different setting for that column. |
| 1298 | "encoding": "A String", # [Optional] The encoding of the values when the type is not STRING. Acceptable encoding values are: TEXT - indicates values are alphanumeric text strings. BINARY - indicates values are encoded using HBase Bytes.toBytes family of functions. This can be overridden for a specific column by listing that column in 'columns' and specifying an encoding for it. |
| 1299 | "columns": [ # [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. |
| 1300 | { |
| 1301 | "fieldName": "A String", # [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. |
| 1302 | "qualifierString": "A String", |
| 1303 | "onlyReadLatest": True or False, # [Optional] If this is set, only the latest version of value in this column are exposed. 'onlyReadLatest' can also be set at the column family level. However, the setting at this level takes precedence if 'onlyReadLatest' is set at both levels. |
| 1304 | "type": "A String", # [Optional] The type to convert the value in cells of this column. The values are expected to be encoded using HBase Bytes.toBytes function when using the BINARY encoding value. Following BigQuery types are allowed (case-sensitive) - BYTES STRING INTEGER FLOAT BOOLEAN Default type is BYTES. 'type' can also be set at the column family level. However, the setting at this level takes precedence if 'type' is set at both levels. |
| 1305 | "encoding": "A String", # [Optional] The encoding of the values when the type is not STRING. Acceptable encoding values are: TEXT - indicates values are alphanumeric text strings. BINARY - indicates values are encoded using HBase Bytes.toBytes family of functions. 'encoding' can also be set at the column family level. However, the setting at this level takes precedence if 'encoding' is set at both levels. |
| 1306 | "qualifierEncoded": "A String", # [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. |
| 1307 | }, |
| 1308 | ], |
| 1309 | "type": "A String", # [Optional] The type to convert the value in cells of this column family. The values are expected to be encoded using HBase Bytes.toBytes function when using the BINARY encoding value. Following BigQuery types are allowed (case-sensitive) - BYTES STRING INTEGER FLOAT BOOLEAN Default type is BYTES. This can be overridden for a specific column by listing that column in 'columns' and specifying a type for it. |
| 1310 | "familyId": "A String", # Identifier of the column family. |
| 1311 | }, |
| 1312 | ], |
| 1313 | }, |
| 1314 | }, |
| 1315 | "description": "A String", # [Optional] A user-friendly description of this table. |
| 1316 | "creationTime": "A String", # [Output-only] The time when this table was created, in milliseconds since the epoch. |
| 1317 | "schema": { # [Optional] Describes the schema of this table. |
| 1318 | "fields": [ # Describes the fields in a table. |
| 1319 | { |
| 1320 | "categories": { # [Optional] The categories attached to this field, used for field-level access control. |
| 1321 | "names": [ # A list of category resource names. For example, "projects/1/taxonomies/2/categories/3". At most 5 categories are allowed. |
| 1322 | "A String", |
| 1323 | ], |
| 1324 | }, |
| 1325 | "policyTags": { |
| 1326 | "names": [ # A list of category resource names. For example, "projects/1/location/eu/taxonomies/2/policyTags/3". At most 1 policy tag is allowed. |
| 1327 | "A String", |
| 1328 | ], |
| 1329 | }, |
| 1330 | "name": "A String", # [Required] The field name. The name must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_), and must start with a letter or underscore. The maximum length is 128 characters. |
| 1331 | "type": "A String", # [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). |
| 1332 | "fields": [ # [Optional] Describes the nested schema fields if the type property is set to RECORD. |
| 1333 | # Object with schema name: TableFieldSchema |
| 1334 | ], |
| 1335 | "description": "A String", # [Optional] The field description. The maximum length is 1,024 characters. |
| 1336 | "mode": "A String", # [Optional] The field mode. Possible values include NULLABLE, REQUIRED and REPEATED. The default value is NULLABLE. |
| 1337 | }, |
| 1338 | ], |
| 1339 | }, |
| 1340 | "location": "A String", # [Output-only] The geographic location where the table resides. This value is inherited from the dataset. |
| 1341 | "kind": "bigquery#table", # [Output-only] The type of the resource. |
| 1342 | }</pre> |
John Asmuth | 614db98 | 2014-04-24 15:46:26 -0400 | [diff] [blame] | 1343 | </div> |
| 1344 | |
| 1345 | <div class="method"> |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1346 | <code class="details" id="setIamPolicy">setIamPolicy(resource, body=None)</code> |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 1347 | <pre>Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1348 | |
| 1349 | Args: |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 1350 | resource: string, REQUIRED: The resource for which the policy is being specified. See the operation documentation for the appropriate value for this field. (required) |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1351 | body: object, The request body. |
| 1352 | The object takes the form of: |
| 1353 | |
| 1354 | { # Request message for `SetIamPolicy` method. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 1355 | "policy": { # An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources. A `Policy` is a collection of `bindings`. A `binding` binds one or more `members` to a single `role`. Members can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role. For some types of Google Cloud resources, a `binding` can also specify a `condition`, which is a logical expression that allows access to a resource only if the expression evaluates to `true`. A condition can add constraints based on attributes of the request, the resource, or both. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). **JSON example:** { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 } **YAML example:** bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') - etag: BwWWja0YfJA= - version: 3 For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/). # REQUIRED: The complete policy to be applied to the `resource`. The size of the policy is limited to a few 10s of KB. An empty policy is a valid policy but certain Cloud Platform services (such as Projects) might reject them. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 1356 | "bindings": [ # Associates a list of `members` to a `role`. Optionally, may specify a `condition` that determines how and when the `bindings` are applied. Each of the `bindings` must contain at least one member. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 1357 | { # Associates `members` with a `role`. |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame^] | 1358 | "bindingId": "A String", |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 1359 | "members": [ # Specifies the identities requesting access for a Cloud Platform resource. `members` can have the following values: * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account. * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account. * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` . * `serviceAccount:{emailid}`: An email address that represents a service account. For example, `my-other-app@appspot.gserviceaccount.com`. * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`. * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a user that has been recently deleted. For example, `alice@example.com?uid=123456789012345678901`. If the user is recovered, this value reverts to `user:{emailid}` and the recovered user retains the role in the binding. * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a service account that has been recently deleted. For example, `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. If the service account is undeleted, this value reverts to `serviceAccount:{emailid}` and the undeleted service account retains the role in the binding. * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a Google group that has been recently deleted. For example, `admins@example.com?uid=123456789012345678901`. If the group is recovered, this value reverts to `group:{emailid}` and the recovered group retains the role in the binding. * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 1360 | "A String", |
| 1361 | ], |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 1362 | "condition": { # Represents a textual expression in the Common Expression Language (CEL) syntax. CEL is a C-like expression language. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec. Example (Comparison): title: "Summary size limit" description: "Determines if a summary is less than 100 chars" expression: "document.summary.size() < 100" Example (Equality): title: "Requestor is owner" description: "Determines if requestor is the document owner" expression: "document.owner == request.auth.claims.email" Example (Logic): title: "Public documents" description: "Determine whether the document should be publicly visible" expression: "document.type != 'private' && document.type != 'internal'" Example (Data Manipulation): title: "Notification string" description: "Create a notification string with a timestamp." expression: "'New message received at ' + string(document.create_time)" The exact variables and functions that may be referenced within an expression are determined by the service that evaluates it. See the service documentation for additional information. # The condition that is associated with this binding. If the condition evaluates to `true`, then this binding applies to the current request. If the condition evaluates to `false`, then this binding does not apply to the current request. However, a different role binding might grant the same role to one or more of the members in this binding. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 1363 | "expression": "A String", # Textual representation of an expression in Common Expression Language syntax. |
| 1364 | "title": "A String", # Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression. |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 1365 | "location": "A String", # Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 1366 | "description": "A String", # Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI. |
| 1367 | }, |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame^] | 1368 | "role": "A String", # Role that is assigned to `members`. For example, `roles/viewer`, `roles/editor`, or `roles/owner`. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1369 | }, |
| 1370 | ], |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame^] | 1371 | "auditConfigs": [ # Specifies cloud audit logging configuration for this policy. |
| 1372 | { # Specifies the audit configuration for a service. The configuration determines which permission types are logged, and what identities, if any, are exempted from logging. An AuditConfig must have one or more AuditLogConfigs. If there are AuditConfigs for both `allServices` and a specific service, the union of the two AuditConfigs is used for that service: the log_types specified in each AuditConfig are enabled, and the exempted_members in each AuditLogConfig are exempted. Example Policy with multiple AuditConfigs: { "audit_configs": [ { "service": "allServices", "audit_log_configs": [ { "log_type": "DATA_READ", "exempted_members": [ "user:jose@example.com" ] }, { "log_type": "DATA_WRITE" }, { "log_type": "ADMIN_READ" } ] }, { "service": "sampleservice.googleapis.com", "audit_log_configs": [ { "log_type": "DATA_READ" }, { "log_type": "DATA_WRITE", "exempted_members": [ "user:aliya@example.com" ] } ] } ] } For sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ logging. It also exempts jose@example.com from DATA_READ logging, and aliya@example.com from DATA_WRITE logging. |
| 1373 | "auditLogConfigs": [ # The configuration for logging of each type of permission. |
| 1374 | { # Provides the configuration for logging a type of permissions. Example: { "audit_log_configs": [ { "log_type": "DATA_READ", "exempted_members": [ "user:jose@example.com" ] }, { "log_type": "DATA_WRITE" } ] } This enables 'DATA_READ' and 'DATA_WRITE' logging, while exempting jose@example.com from DATA_READ logging. |
| 1375 | "logType": "A String", # The log type that this config enables. |
| 1376 | "exemptedMembers": [ # Specifies the identities that do not cause logging for this type of permission. Follows the same format of Binding.members. |
| 1377 | "A String", |
| 1378 | ], |
| 1379 | }, |
| 1380 | ], |
| 1381 | "service": "A String", # Specifies a service that will be enabled for audit logging. For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. `allServices` is a special value that covers all services. |
| 1382 | }, |
| 1383 | ], |
| 1384 | "etag": "A String", # `etag` is used for optimistic concurrency control as a way to help prevent simultaneous updates of a policy from overwriting each other. It is strongly suggested that systems make use of the `etag` in the read-modify-write cycle to perform policy updates in order to avoid race conditions: An `etag` is returned in the response to `getIamPolicy`, and systems are expected to put that etag in the request to `setIamPolicy` to ensure that their change will be applied to the same version of the policy. **Important:** If you use IAM Conditions, you must include the `etag` field whenever you call `setIamPolicy`. If you omit this field, then IAM allows you to overwrite a version `3` policy with a version `1` policy, and all of the conditions in the version `3` policy are lost. |
| 1385 | "version": 42, # Specifies the format of the policy. Valid values are `0`, `1`, and `3`. Requests that specify an invalid value are rejected. Any operation that affects conditional role bindings must specify version `3`. This requirement applies to the following operations: * Getting a policy that includes a conditional role binding * Adding a conditional role binding to a policy * Changing a conditional role binding in a policy * Removing any role binding, with or without a condition, from a policy that includes conditions **Important:** If you use IAM Conditions, you must include the `etag` field whenever you call `setIamPolicy`. If you omit this field, then IAM allows you to overwrite a version `3` policy with a version `1` policy, and all of the conditions in the version `3` policy are lost. If a policy does not include any conditions, operations on that policy may specify any valid version or leave the field unset. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1386 | }, |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 1387 | "updateMask": "A String", # OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only the fields in the mask will be modified. If no mask is provided, the following default mask is used: `paths: "bindings, etag"` |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1388 | } |
| 1389 | |
| 1390 | |
| 1391 | Returns: |
| 1392 | An object of the form: |
| 1393 | |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 1394 | { # An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources. A `Policy` is a collection of `bindings`. A `binding` binds one or more `members` to a single `role`. Members can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role. For some types of Google Cloud resources, a `binding` can also specify a `condition`, which is a logical expression that allows access to a resource only if the expression evaluates to `true`. A condition can add constraints based on attributes of the request, the resource, or both. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). **JSON example:** { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 } **YAML example:** bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') - etag: BwWWja0YfJA= - version: 3 For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/). |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 1395 | "bindings": [ # Associates a list of `members` to a `role`. Optionally, may specify a `condition` that determines how and when the `bindings` are applied. Each of the `bindings` must contain at least one member. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 1396 | { # Associates `members` with a `role`. |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame^] | 1397 | "bindingId": "A String", |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 1398 | "members": [ # Specifies the identities requesting access for a Cloud Platform resource. `members` can have the following values: * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account. * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account. * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` . * `serviceAccount:{emailid}`: An email address that represents a service account. For example, `my-other-app@appspot.gserviceaccount.com`. * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`. * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a user that has been recently deleted. For example, `alice@example.com?uid=123456789012345678901`. If the user is recovered, this value reverts to `user:{emailid}` and the recovered user retains the role in the binding. * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a service account that has been recently deleted. For example, `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. If the service account is undeleted, this value reverts to `serviceAccount:{emailid}` and the undeleted service account retains the role in the binding. * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a Google group that has been recently deleted. For example, `admins@example.com?uid=123456789012345678901`. If the group is recovered, this value reverts to `group:{emailid}` and the recovered group retains the role in the binding. * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 1399 | "A String", |
| 1400 | ], |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 1401 | "condition": { # Represents a textual expression in the Common Expression Language (CEL) syntax. CEL is a C-like expression language. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec. Example (Comparison): title: "Summary size limit" description: "Determines if a summary is less than 100 chars" expression: "document.summary.size() < 100" Example (Equality): title: "Requestor is owner" description: "Determines if requestor is the document owner" expression: "document.owner == request.auth.claims.email" Example (Logic): title: "Public documents" description: "Determine whether the document should be publicly visible" expression: "document.type != 'private' && document.type != 'internal'" Example (Data Manipulation): title: "Notification string" description: "Create a notification string with a timestamp." expression: "'New message received at ' + string(document.create_time)" The exact variables and functions that may be referenced within an expression are determined by the service that evaluates it. See the service documentation for additional information. # The condition that is associated with this binding. If the condition evaluates to `true`, then this binding applies to the current request. If the condition evaluates to `false`, then this binding does not apply to the current request. However, a different role binding might grant the same role to one or more of the members in this binding. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 1402 | "expression": "A String", # Textual representation of an expression in Common Expression Language syntax. |
| 1403 | "title": "A String", # Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression. |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 1404 | "location": "A String", # Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 1405 | "description": "A String", # Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI. |
| 1406 | }, |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame^] | 1407 | "role": "A String", # Role that is assigned to `members`. For example, `roles/viewer`, `roles/editor`, or `roles/owner`. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1408 | }, |
| 1409 | ], |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame^] | 1410 | "auditConfigs": [ # Specifies cloud audit logging configuration for this policy. |
| 1411 | { # Specifies the audit configuration for a service. The configuration determines which permission types are logged, and what identities, if any, are exempted from logging. An AuditConfig must have one or more AuditLogConfigs. If there are AuditConfigs for both `allServices` and a specific service, the union of the two AuditConfigs is used for that service: the log_types specified in each AuditConfig are enabled, and the exempted_members in each AuditLogConfig are exempted. Example Policy with multiple AuditConfigs: { "audit_configs": [ { "service": "allServices", "audit_log_configs": [ { "log_type": "DATA_READ", "exempted_members": [ "user:jose@example.com" ] }, { "log_type": "DATA_WRITE" }, { "log_type": "ADMIN_READ" } ] }, { "service": "sampleservice.googleapis.com", "audit_log_configs": [ { "log_type": "DATA_READ" }, { "log_type": "DATA_WRITE", "exempted_members": [ "user:aliya@example.com" ] } ] } ] } For sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ logging. It also exempts jose@example.com from DATA_READ logging, and aliya@example.com from DATA_WRITE logging. |
| 1412 | "auditLogConfigs": [ # The configuration for logging of each type of permission. |
| 1413 | { # Provides the configuration for logging a type of permissions. Example: { "audit_log_configs": [ { "log_type": "DATA_READ", "exempted_members": [ "user:jose@example.com" ] }, { "log_type": "DATA_WRITE" } ] } This enables 'DATA_READ' and 'DATA_WRITE' logging, while exempting jose@example.com from DATA_READ logging. |
| 1414 | "logType": "A String", # The log type that this config enables. |
| 1415 | "exemptedMembers": [ # Specifies the identities that do not cause logging for this type of permission. Follows the same format of Binding.members. |
| 1416 | "A String", |
| 1417 | ], |
| 1418 | }, |
| 1419 | ], |
| 1420 | "service": "A String", # Specifies a service that will be enabled for audit logging. For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. `allServices` is a special value that covers all services. |
| 1421 | }, |
| 1422 | ], |
| 1423 | "etag": "A String", # `etag` is used for optimistic concurrency control as a way to help prevent simultaneous updates of a policy from overwriting each other. It is strongly suggested that systems make use of the `etag` in the read-modify-write cycle to perform policy updates in order to avoid race conditions: An `etag` is returned in the response to `getIamPolicy`, and systems are expected to put that etag in the request to `setIamPolicy` to ensure that their change will be applied to the same version of the policy. **Important:** If you use IAM Conditions, you must include the `etag` field whenever you call `setIamPolicy`. If you omit this field, then IAM allows you to overwrite a version `3` policy with a version `1` policy, and all of the conditions in the version `3` policy are lost. |
| 1424 | "version": 42, # Specifies the format of the policy. Valid values are `0`, `1`, and `3`. Requests that specify an invalid value are rejected. Any operation that affects conditional role bindings must specify version `3`. This requirement applies to the following operations: * Getting a policy that includes a conditional role binding * Adding a conditional role binding to a policy * Changing a conditional role binding in a policy * Removing any role binding, with or without a condition, from a policy that includes conditions **Important:** If you use IAM Conditions, you must include the `etag` field whenever you call `setIamPolicy`. If you omit this field, then IAM allows you to overwrite a version `3` policy with a version `1` policy, and all of the conditions in the version `3` policy are lost. If a policy does not include any conditions, operations on that policy may specify any valid version or leave the field unset. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1425 | }</pre> |
| 1426 | </div> |
| 1427 | |
| 1428 | <div class="method"> |
| 1429 | <code class="details" id="testIamPermissions">testIamPermissions(resource, body=None)</code> |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 1430 | <pre>Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may "fail open" without warning. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1431 | |
| 1432 | Args: |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 1433 | resource: string, REQUIRED: The resource for which the policy detail is being requested. See the operation documentation for the appropriate value for this field. (required) |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1434 | body: object, The request body. |
| 1435 | The object takes the form of: |
| 1436 | |
| 1437 | { # Request message for `TestIamPermissions` method. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 1438 | "permissions": [ # The set of permissions to check for the `resource`. Permissions with wildcards (such as '*' or 'storage.*') are not allowed. For more information see [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1439 | "A String", |
| 1440 | ], |
| 1441 | } |
| 1442 | |
| 1443 | |
| 1444 | Returns: |
| 1445 | An object of the form: |
| 1446 | |
| 1447 | { # Response message for `TestIamPermissions` method. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 1448 | "permissions": [ # A subset of `TestPermissionsRequest.permissions` that the caller is allowed. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1449 | "A String", |
| 1450 | ], |
| 1451 | }</pre> |
| 1452 | </div> |
| 1453 | |
| 1454 | <div class="method"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1455 | <code class="details" id="update">update(projectId, datasetId, tableId, body=None)</code> |
John Asmuth | 614db98 | 2014-04-24 15:46:26 -0400 | [diff] [blame] | 1456 | <pre>Updates information in an existing table. The update method replaces the entire table resource, whereas the patch method only replaces fields that are provided in the submitted table resource. |
| 1457 | |
| 1458 | Args: |
| 1459 | projectId: string, Project ID of the table to update (required) |
| 1460 | datasetId: string, Dataset ID of the table to update (required) |
| 1461 | tableId: string, Table ID of the table to update (required) |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1462 | body: object, The request body. |
John Asmuth | 614db98 | 2014-04-24 15:46:26 -0400 | [diff] [blame] | 1463 | The object takes the form of: |
| 1464 | |
| 1465 | { |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame^] | 1466 | "view": { # [Optional] The view definition. |
| 1467 | "userDefinedFunctionResources": [ # Describes user-defined function resources used in the query. |
| 1468 | { # This is used for defining User Defined Function (UDF) resources only when using legacy SQL. Users of Standard SQL should leverage either DDL (e.g. CREATE [TEMPORARY] FUNCTION ... ) or the Routines API to define UDF resources. For additional information on migrating, see: https://cloud.google.com/bigquery/docs/reference/standard-sql/migrating-from-legacy-sql#differences_in_user-defined_javascript_functions |
| 1469 | "inlineCode": "A String", # [Pick one] An inline resource that contains code for a user-defined function (UDF). Providing a inline code resource is equivalent to providing a URI for a file containing the same code. |
| 1470 | "resourceUri": "A String", # [Pick one] A code resource to load from a Google Cloud Storage URI (gs://bucket/path). |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 1471 | }, |
| 1472 | ], |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame^] | 1473 | "query": "A String", # [Required] A query that BigQuery executes when the view is referenced. |
| 1474 | "useLegacySql": True or False, # Specifies whether to use BigQuery's legacy SQL for this view. The default value is true. If set to false, the view will use BigQuery's standard SQL: https://cloud.google.com/bigquery/sql-reference/ Queries and views that reference this view must use the same flag value. |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 1475 | }, |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame^] | 1476 | "selfLink": "A String", # [Output-only] A URL that can be used to access this resource again. |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 1477 | "type": "A String", # [Output-only] Describes the table type. The following values are supported: TABLE: A normal BigQuery table. VIEW: A virtual table defined by a SQL query. SNAPSHOT: An immutable, read-only table that is a copy of another table. [TrustedTester] MATERIALIZED_VIEW: SQL query whose result is persisted. EXTERNAL: A table that references data stored in an external storage system, such as Google Cloud Storage. The default value is TABLE. |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame^] | 1478 | "friendlyName": "A String", # [Optional] A descriptive name for this table. |
| 1479 | "streamingBuffer": { # [Output-only] Contains information regarding this table'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. |
| 1480 | "estimatedRows": "A String", # [Output-only] A lower-bound estimate of the number of rows currently in the streaming buffer. |
| 1481 | "estimatedBytes": "A String", # [Output-only] A lower-bound estimate of the number of bytes currently in the streaming buffer. |
| 1482 | "oldestEntryTime": "A String", # [Output-only] Contains the timestamp of the oldest entry in the streaming buffer, in milliseconds since the epoch, if the streaming buffer is available. |
| 1483 | }, |
| 1484 | "etag": "A String", # [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. |
| 1485 | "labels": { # 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. |
| 1486 | "a_key": "A String", |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 1487 | }, |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 1488 | "tableReference": { # [Required] Reference describing the ID of this table. |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame^] | 1489 | "tableId": "A String", # [Required] The ID of the table. The ID must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_). The maximum length is 1,024 characters. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 1490 | "datasetId": "A String", # [Required] The ID of the dataset containing this table. |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 1491 | "projectId": "A String", # [Required] The ID of the project containing this table. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 1492 | }, |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 1493 | "model": { # [Output-only, Beta] Present iff this table represents a ML model. Describes the training information for the model, and it is required to run 'PREDICT' queries. |
| 1494 | "modelOptions": { # [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. |
| 1495 | "lossType": "A String", |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame^] | 1496 | "modelType": "A String", |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 1497 | "labels": [ |
| 1498 | "A String", |
| 1499 | ], |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 1500 | }, |
| 1501 | "trainingRuns": [ # [Output-only, Beta] Information about ml training runs, each training run comprises of multiple iterations and there may be multiple training runs for the model if warm start is used or if a user decides to continue a previously cancelled query. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1502 | { |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame^] | 1503 | "trainingOptions": { # [Output-only, Beta] Training options used by this training run. These options are mutable for subsequent training runs. Default values are explicitly stored for options not specified in the input query of the first training run. For subsequent training runs, any option not explicitly specified in the input query will be copied from the previous training run. |
| 1504 | "l1Reg": 3.14, |
| 1505 | "lineSearchInitLearnRate": 3.14, |
| 1506 | "earlyStop": True or False, |
| 1507 | "l2Reg": 3.14, |
| 1508 | "learnRateStrategy": "A String", |
| 1509 | "learnRate": 3.14, |
| 1510 | "maxIteration": "A String", |
| 1511 | "minRelProgress": 3.14, |
| 1512 | "warmStart": True or False, |
| 1513 | }, |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 1514 | "state": "A String", # [Output-only, Beta] Different state applicable for a training run. IN PROGRESS: Training run is in progress. FAILED: Training run ended due to a non-retryable failure. SUCCEEDED: Training run successfully completed. CANCELLED: Training run cancelled by the user. |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 1515 | "startTime": "A String", # [Output-only, Beta] Training run start time in milliseconds since the epoch. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 1516 | "iterationResults": [ # [Output-only, Beta] List of each iteration results. |
| 1517 | { |
| 1518 | "index": 42, # [Output-only, Beta] Index of the ML training iteration, starting from zero for each training run. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 1519 | "learnRate": 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. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 1520 | "trainingLoss": 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. |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame^] | 1521 | "durationMs": "A String", # [Output-only, Beta] Time taken to run the training iteration in milliseconds. |
| 1522 | "evalLoss": 3.14, # [Output-only, Beta] Eval loss computed on the eval data at the end of the iteration. The eval loss is used for early stopping to avoid overfitting. No eval loss if eval_split_method option is specified as no_split or auto_split with input data size less than 500 rows. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 1523 | }, |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 1524 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1525 | }, |
| 1526 | ], |
| 1527 | }, |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame^] | 1528 | "encryptionConfiguration": { # Custom encryption configuration (e.g., Cloud KMS keys). |
| 1529 | "kmsKeyName": "A String", # [Optional] Describes the Cloud KMS encryption key that will be used to protect destination BigQuery table. The BigQuery Service Account associated with your project requires access to this encryption key. |
| 1530 | }, |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 1531 | "snapshotDefinition": { # [Output-only] Snapshot definition. |
| 1532 | "baseTableReference": { # [Required] Reference describing the ID of the table that is snapshotted. |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame^] | 1533 | "tableId": "A String", # [Required] The ID of the table. The ID must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_). The maximum length is 1,024 characters. |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 1534 | "datasetId": "A String", # [Required] The ID of the dataset containing this table. |
| 1535 | "projectId": "A String", # [Required] The ID of the project containing this table. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 1536 | }, |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 1537 | "snapshotTime": "A String", # [Required] The time at which the base table was snapshot. |
| 1538 | }, |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame^] | 1539 | "expirationTime": "A String", # [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. |
| 1540 | "numBytes": "A String", # [Output-only] The size of this table in bytes, excluding any data in the streaming buffer. |
| 1541 | "id": "A String", # [Output-only] An opaque ID uniquely identifying the table. |
| 1542 | "numRows": "A String", # [Output-only] The number of rows of data in this table, excluding any data in the streaming buffer. |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 1543 | "timePartitioning": { # Time-based partitioning specification for this table. Only one of timePartitioning and rangePartitioning should be specified. |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 1544 | "type": "A String", # [Required] The supported types are DAY, HOUR, MONTH, and YEAR, which will generate one partition per day, hour, month, and year, respectively. When the type is not specified, the default behavior is DAY. |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame^] | 1545 | "expirationMs": "A String", # [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. |
| 1546 | "field": "A String", # [Beta] [Optional] If not set, the table is partitioned by pseudo column, referenced via either '_PARTITIONTIME' as TIMESTAMP type, or '_PARTITIONDATE' 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. |
| 1547 | "requirePartitionFilter": True or False, |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 1548 | }, |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame^] | 1549 | "numPhysicalBytes": "A String", # [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. |
| 1550 | "lastModifiedTime": "A String", # [Output-only] The time when this table was last modified, in milliseconds since the epoch. |
| 1551 | "requirePartitionFilter": false, # [Optional] If set to true, queries over this table require a partition filter that can be used for partition elimination to be specified. |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 1552 | "materializedView": { # [Optional] Materialized view definition. |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame^] | 1553 | "refreshIntervalMs": "A String", # [Optional] [TrustedTester] The maximum frequency at which this materialized view will be refreshed. The default value is "1800000" (30 minutes). |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 1554 | "lastRefreshTime": "A String", # [Output-only] [TrustedTester] The time when this materialized view was last modified, in milliseconds since the epoch. |
| 1555 | "enableRefresh": True or False, # [Optional] [TrustedTester] Enable automatic refresh of the materialized view when the base table is updated. The default value is "true". |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame^] | 1556 | "query": "A String", # [Required] A query whose result is persisted. |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 1557 | }, |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame^] | 1558 | "numLongTermBytes": "A String", # [Output-only] The number of bytes in the table that are considered "long-term storage". |
| 1559 | "rangePartitioning": { # [TrustedTester] Range partitioning specification for this table. Only one of timePartitioning and rangePartitioning should be specified. |
| 1560 | "range": { # [TrustedTester] [Required] Defines the ranges for range partitioning. |
| 1561 | "start": "A String", # [TrustedTester] [Required] The start of range partitioning, inclusive. |
| 1562 | "end": "A String", # [TrustedTester] [Required] The end of range partitioning, exclusive. |
| 1563 | "interval": "A String", # [TrustedTester] [Required] The width of each interval. |
| 1564 | }, |
| 1565 | "field": "A String", # [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. |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 1566 | }, |
| 1567 | "clustering": { # [Beta] Clustering specification for the table. Must be specified with partitioning, data in the table will be first partitioned and subsequently clustered. |
| 1568 | "fields": [ # [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. |
| 1569 | "A String", |
| 1570 | ], |
| 1571 | }, |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame^] | 1572 | "externalDataConfiguration": { # [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. |
| 1573 | "sourceFormat": "A String", # [Required] The data format. For CSV files, specify "CSV". For Google sheets, specify "GOOGLE_SHEETS". For newline-delimited JSON, specify "NEWLINE_DELIMITED_JSON". For Avro files, specify "AVRO". For Google Cloud Datastore backups, specify "DATASTORE_BACKUP". [Beta] For Google Cloud Bigtable, specify "BIGTABLE". |
| 1574 | "schema": { # [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. |
| 1575 | "fields": [ # Describes the fields in a table. |
| 1576 | { |
| 1577 | "categories": { # [Optional] The categories attached to this field, used for field-level access control. |
| 1578 | "names": [ # A list of category resource names. For example, "projects/1/taxonomies/2/categories/3". At most 5 categories are allowed. |
| 1579 | "A String", |
| 1580 | ], |
| 1581 | }, |
| 1582 | "policyTags": { |
| 1583 | "names": [ # A list of category resource names. For example, "projects/1/location/eu/taxonomies/2/policyTags/3". At most 1 policy tag is allowed. |
| 1584 | "A String", |
| 1585 | ], |
| 1586 | }, |
| 1587 | "name": "A String", # [Required] The field name. The name must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_), and must start with a letter or underscore. The maximum length is 128 characters. |
| 1588 | "type": "A String", # [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). |
| 1589 | "fields": [ # [Optional] Describes the nested schema fields if the type property is set to RECORD. |
| 1590 | # Object with schema name: TableFieldSchema |
| 1591 | ], |
| 1592 | "description": "A String", # [Optional] The field description. The maximum length is 1,024 characters. |
| 1593 | "mode": "A String", # [Optional] The field mode. Possible values include NULLABLE, REQUIRED and REPEATED. The default value is NULLABLE. |
| 1594 | }, |
| 1595 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1596 | }, |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame^] | 1597 | "ignoreUnknownValues": 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'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. |
| 1598 | "maxBadRecords": 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. |
| 1599 | "hivePartitioningOptions": { # [Optional, Trusted Tester] Options to configure hive partitioning support. |
| 1600 | "sourceUriPrefix": "A String", # [Optional] When hive partition detection is requested, a common prefix for all source uris should be supplied. The prefix must end immediately before the partition key encoding begins. For example, consider files following this data layout. gs://bucket/path_to_table/dt=2019-01-01/country=BR/id=7/file.avro gs://bucket/path_to_table/dt=2018-12-31/country=CA/id=3/file.avro When hive partitioning is requested with either AUTO or STRINGS detection, the common prefix can be either of gs://bucket/path_to_table or gs://bucket/path_to_table/ (trailing slash does not matter). |
| 1601 | "requirePartitionFilter": True or False, # [Optional] If set to true, queries over this table require a partition filter that can be used for partition elimination to be specified. Note that this field should only be true when creating a permanent external table or querying a temporary external table. Hive-partitioned loads with requirePartitionFilter explicitly set to true will fail. |
| 1602 | "mode": "A String", # [Optional] When set, what mode of hive partitioning to use when reading data. The following modes are supported. (1) AUTO: automatically infer partition key name(s) and type(s). (2) STRINGS: automatically infer partition key name(s). All types are interpreted as strings. (3) CUSTOM: partition key schema is encoded in the source URI prefix. Not all storage formats support hive partitioning. Requesting hive partitioning on an unsupported format will lead to an error. Currently supported types include: AVRO, CSV, JSON, ORC and Parquet. |
| 1603 | }, |
| 1604 | "connectionId": "A String", # [Optional, Trusted Tester] Connection for external data source. |
| 1605 | "sourceUris": [ # [Required] The fully-qualified URIs that point to your data in Google Cloud. For Google Cloud Storage URIs: Each URI can contain one '*' wildcard character and it must come after the 'bucket' name. Size limits related to load jobs apply to external data sources. For Google Cloud Bigtable URIs: Exactly one URI can be specified and it has be a fully specified and valid HTTPS URL for a Google Cloud Bigtable table. For Google Cloud Datastore backups, exactly one URI can be specified. Also, the '*' wildcard character is not allowed. |
| 1606 | "A String", |
| 1607 | ], |
| 1608 | "googleSheetsOptions": { # [Optional] Additional options if sourceFormat is set to GOOGLE_SHEETS. |
| 1609 | "skipLeadingRows": "A String", # [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 > 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. |
| 1610 | "range": "A String", # [Optional] Range of a sheet to query from. Only used when non-empty. Typical format: sheet_name!top_left_cell_id:bottom_right_cell_id For example: sheet1!A1:B20 |
| 1611 | }, |
| 1612 | "autodetect": True or False, # Try to detect schema and format options automatically. Any option specified explicitly will be honored. |
| 1613 | "compression": "A String", # [Optional] The compression type of the data source. Possible values include GZIP and NONE. The default value is NONE. This setting is ignored for Google Cloud Bigtable, Google Cloud Datastore backups and Avro formats. |
| 1614 | "csvOptions": { # Additional properties to set if sourceFormat is set to CSV. |
| 1615 | "encoding": "A String", # [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. |
| 1616 | "quote": """, # [Optional] The value that is used to quote data sections in a CSV file. BigQuery converts the string to ISO-8859-1 encoding, and then uses the first byte of the encoded string to split the data in its raw, binary state. The default value is a double-quote ('"'). If your data does not contain quoted sections, set the property value to an empty string. If your data contains quoted newline characters, you must also set the allowQuotedNewlines property to true. |
| 1617 | "skipLeadingRows": "A String", # [Optional] The number of rows at the top of a CSV file that BigQuery will skip when reading the data. The default value is 0. This property is useful if you have header rows in the file that should be skipped. When autodetect is on, the behavior is the following: * skipLeadingRows unspecified - Autodetect tries to detect headers in the first row. If they are not detected, the row is read as data. Otherwise data is read starting from the second row. * skipLeadingRows is 0 - Instructs autodetect that there are no headers and data should be read starting from the first row. * skipLeadingRows = N > 0 - Autodetect skips N-1 rows and tries to detect headers in row N. If headers are not detected, row N is just skipped. Otherwise row N is used to extract column names for the detected schema. |
| 1618 | "allowJaggedRows": 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. |
| 1619 | "allowQuotedNewlines": 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. |
| 1620 | "fieldDelimiter": "A String", # [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 "\t" to specify a tab separator. The default value is a comma (','). |
| 1621 | }, |
| 1622 | "bigtableOptions": { # [Optional] Additional options if sourceFormat is set to BIGTABLE. |
| 1623 | "readRowkeyAsString": 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. |
| 1624 | "ignoreUnspecifiedColumnFamilies": 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. |
| 1625 | "columnFamilies": [ # [Optional] List of column families to expose in the table schema along with their types. This list restricts the column families that can be referenced in queries and specifies their value types. You can use this list to do type conversions - see the 'type' field for more details. If you leave this list empty, all column families are present in the table schema and their values are read as BYTES. During a query only the column families referenced in that query are read from Bigtable. |
| 1626 | { |
| 1627 | "onlyReadLatest": 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 'columns' and specifying a different setting for that column. |
| 1628 | "encoding": "A String", # [Optional] The encoding of the values when the type is not STRING. Acceptable encoding values are: TEXT - indicates values are alphanumeric text strings. BINARY - indicates values are encoded using HBase Bytes.toBytes family of functions. This can be overridden for a specific column by listing that column in 'columns' and specifying an encoding for it. |
| 1629 | "columns": [ # [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. |
| 1630 | { |
| 1631 | "fieldName": "A String", # [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. |
| 1632 | "qualifierString": "A String", |
| 1633 | "onlyReadLatest": True or False, # [Optional] If this is set, only the latest version of value in this column are exposed. 'onlyReadLatest' can also be set at the column family level. However, the setting at this level takes precedence if 'onlyReadLatest' is set at both levels. |
| 1634 | "type": "A String", # [Optional] The type to convert the value in cells of this column. The values are expected to be encoded using HBase Bytes.toBytes function when using the BINARY encoding value. Following BigQuery types are allowed (case-sensitive) - BYTES STRING INTEGER FLOAT BOOLEAN Default type is BYTES. 'type' can also be set at the column family level. However, the setting at this level takes precedence if 'type' is set at both levels. |
| 1635 | "encoding": "A String", # [Optional] The encoding of the values when the type is not STRING. Acceptable encoding values are: TEXT - indicates values are alphanumeric text strings. BINARY - indicates values are encoded using HBase Bytes.toBytes family of functions. 'encoding' can also be set at the column family level. However, the setting at this level takes precedence if 'encoding' is set at both levels. |
| 1636 | "qualifierEncoded": "A String", # [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. |
| 1637 | }, |
| 1638 | ], |
| 1639 | "type": "A String", # [Optional] The type to convert the value in cells of this column family. The values are expected to be encoded using HBase Bytes.toBytes function when using the BINARY encoding value. Following BigQuery types are allowed (case-sensitive) - BYTES STRING INTEGER FLOAT BOOLEAN Default type is BYTES. This can be overridden for a specific column by listing that column in 'columns' and specifying a type for it. |
| 1640 | "familyId": "A String", # Identifier of the column family. |
| 1641 | }, |
| 1642 | ], |
| 1643 | }, |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 1644 | }, |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame^] | 1645 | "description": "A String", # [Optional] A user-friendly description of this table. |
| 1646 | "creationTime": "A String", # [Output-only] The time when this table was created, in milliseconds since the epoch. |
| 1647 | "schema": { # [Optional] Describes the schema of this table. |
| 1648 | "fields": [ # Describes the fields in a table. |
| 1649 | { |
| 1650 | "categories": { # [Optional] The categories attached to this field, used for field-level access control. |
| 1651 | "names": [ # A list of category resource names. For example, "projects/1/taxonomies/2/categories/3". At most 5 categories are allowed. |
| 1652 | "A String", |
| 1653 | ], |
| 1654 | }, |
| 1655 | "policyTags": { |
| 1656 | "names": [ # A list of category resource names. For example, "projects/1/location/eu/taxonomies/2/policyTags/3". At most 1 policy tag is allowed. |
| 1657 | "A String", |
| 1658 | ], |
| 1659 | }, |
| 1660 | "name": "A String", # [Required] The field name. The name must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_), and must start with a letter or underscore. The maximum length is 128 characters. |
| 1661 | "type": "A String", # [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). |
| 1662 | "fields": [ # [Optional] Describes the nested schema fields if the type property is set to RECORD. |
| 1663 | # Object with schema name: TableFieldSchema |
| 1664 | ], |
| 1665 | "description": "A String", # [Optional] The field description. The maximum length is 1,024 characters. |
| 1666 | "mode": "A String", # [Optional] The field mode. Possible values include NULLABLE, REQUIRED and REPEATED. The default value is NULLABLE. |
| 1667 | }, |
| 1668 | ], |
| 1669 | }, |
| 1670 | "location": "A String", # [Output-only] The geographic location where the table resides. This value is inherited from the dataset. |
| 1671 | "kind": "bigquery#table", # [Output-only] The type of the resource. |
| 1672 | } |
| 1673 | |
| 1674 | |
| 1675 | Returns: |
| 1676 | An object of the form: |
| 1677 | |
| 1678 | { |
| 1679 | "view": { # [Optional] The view definition. |
| 1680 | "userDefinedFunctionResources": [ # Describes user-defined function resources used in the query. |
| 1681 | { # This is used for defining User Defined Function (UDF) resources only when using legacy SQL. Users of Standard SQL should leverage either DDL (e.g. CREATE [TEMPORARY] FUNCTION ... ) or the Routines API to define UDF resources. For additional information on migrating, see: https://cloud.google.com/bigquery/docs/reference/standard-sql/migrating-from-legacy-sql#differences_in_user-defined_javascript_functions |
| 1682 | "inlineCode": "A String", # [Pick one] An inline resource that contains code for a user-defined function (UDF). Providing a inline code resource is equivalent to providing a URI for a file containing the same code. |
| 1683 | "resourceUri": "A String", # [Pick one] A code resource to load from a Google Cloud Storage URI (gs://bucket/path). |
| 1684 | }, |
| 1685 | ], |
| 1686 | "query": "A String", # [Required] A query that BigQuery executes when the view is referenced. |
| 1687 | "useLegacySql": True or False, # Specifies whether to use BigQuery's legacy SQL for this view. The default value is true. If set to false, the view will use BigQuery's standard SQL: https://cloud.google.com/bigquery/sql-reference/ Queries and views that reference this view must use the same flag value. |
| 1688 | }, |
| 1689 | "selfLink": "A String", # [Output-only] A URL that can be used to access this resource again. |
| 1690 | "type": "A String", # [Output-only] Describes the table type. The following values are supported: TABLE: A normal BigQuery table. VIEW: A virtual table defined by a SQL query. SNAPSHOT: An immutable, read-only table that is a copy of another table. [TrustedTester] MATERIALIZED_VIEW: SQL query whose result is persisted. EXTERNAL: A table that references data stored in an external storage system, such as Google Cloud Storage. The default value is TABLE. |
| 1691 | "friendlyName": "A String", # [Optional] A descriptive name for this table. |
| 1692 | "streamingBuffer": { # [Output-only] Contains information regarding this table'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. |
| 1693 | "estimatedRows": "A String", # [Output-only] A lower-bound estimate of the number of rows currently in the streaming buffer. |
| 1694 | "estimatedBytes": "A String", # [Output-only] A lower-bound estimate of the number of bytes currently in the streaming buffer. |
| 1695 | "oldestEntryTime": "A String", # [Output-only] Contains the timestamp of the oldest entry in the streaming buffer, in milliseconds since the epoch, if the streaming buffer is available. |
| 1696 | }, |
| 1697 | "etag": "A String", # [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. |
| 1698 | "labels": { # 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. |
| 1699 | "a_key": "A String", |
| 1700 | }, |
| 1701 | "tableReference": { # [Required] Reference describing the ID of this table. |
| 1702 | "tableId": "A String", # [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. |
| 1703 | "datasetId": "A String", # [Required] The ID of the dataset containing this table. |
| 1704 | "projectId": "A String", # [Required] The ID of the project containing this table. |
| 1705 | }, |
| 1706 | "model": { # [Output-only, Beta] Present iff this table represents a ML model. Describes the training information for the model, and it is required to run 'PREDICT' queries. |
| 1707 | "modelOptions": { # [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. |
| 1708 | "lossType": "A String", |
| 1709 | "modelType": "A String", |
| 1710 | "labels": [ |
| 1711 | "A String", |
| 1712 | ], |
| 1713 | }, |
| 1714 | "trainingRuns": [ # [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. |
| 1715 | { |
| 1716 | "trainingOptions": { # [Output-only, Beta] Training options used by this training run. These options are mutable for subsequent training runs. Default values are explicitly stored for options not specified in the input query of the first training run. For subsequent training runs, any option not explicitly specified in the input query will be copied from the previous training run. |
| 1717 | "l1Reg": 3.14, |
| 1718 | "lineSearchInitLearnRate": 3.14, |
| 1719 | "earlyStop": True or False, |
| 1720 | "l2Reg": 3.14, |
| 1721 | "learnRateStrategy": "A String", |
| 1722 | "learnRate": 3.14, |
| 1723 | "maxIteration": "A String", |
| 1724 | "minRelProgress": 3.14, |
| 1725 | "warmStart": True or False, |
| 1726 | }, |
| 1727 | "state": "A String", # [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. |
| 1728 | "startTime": "A String", # [Output-only, Beta] Training run start time in milliseconds since the epoch. |
| 1729 | "iterationResults": [ # [Output-only, Beta] List of each iteration results. |
| 1730 | { |
| 1731 | "index": 42, # [Output-only, Beta] Index of the ML training iteration, starting from zero for each training run. |
| 1732 | "learnRate": 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. |
| 1733 | "trainingLoss": 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. |
| 1734 | "durationMs": "A String", # [Output-only, Beta] Time taken to run the training iteration in milliseconds. |
| 1735 | "evalLoss": 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. |
| 1736 | }, |
| 1737 | ], |
| 1738 | }, |
| 1739 | ], |
| 1740 | }, |
| 1741 | "encryptionConfiguration": { # Custom encryption configuration (e.g., Cloud KMS keys). |
| 1742 | "kmsKeyName": "A String", # [Optional] Describes the Cloud KMS encryption key that will be used to protect destination BigQuery table. The BigQuery Service Account associated with your project requires access to this encryption key. |
| 1743 | }, |
| 1744 | "snapshotDefinition": { # [Output-only] Snapshot definition. |
| 1745 | "baseTableReference": { # [Required] Reference describing the ID of the table that is snapshotted. |
| 1746 | "tableId": "A String", # [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. |
| 1747 | "datasetId": "A String", # [Required] The ID of the dataset containing this table. |
| 1748 | "projectId": "A String", # [Required] The ID of the project containing this table. |
| 1749 | }, |
| 1750 | "snapshotTime": "A String", # [Required] The time at which the base table was snapshot. |
| 1751 | }, |
| 1752 | "expirationTime": "A String", # [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. |
| 1753 | "numBytes": "A String", # [Output-only] The size of this table in bytes, excluding any data in the streaming buffer. |
| 1754 | "id": "A String", # [Output-only] An opaque ID uniquely identifying the table. |
| 1755 | "numRows": "A String", # [Output-only] The number of rows of data in this table, excluding any data in the streaming buffer. |
| 1756 | "timePartitioning": { # Time-based partitioning specification for this table. Only one of timePartitioning and rangePartitioning should be specified. |
| 1757 | "type": "A String", # [Required] The supported types are DAY, HOUR, MONTH, and YEAR, which will generate one partition per day, hour, month, and year, respectively. When the type is not specified, the default behavior is DAY. |
| 1758 | "expirationMs": "A String", # [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. |
| 1759 | "field": "A String", # [Beta] [Optional] If not set, the table is partitioned by pseudo column, referenced via either '_PARTITIONTIME' as TIMESTAMP type, or '_PARTITIONDATE' 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. |
| 1760 | "requirePartitionFilter": True or False, |
| 1761 | }, |
| 1762 | "numPhysicalBytes": "A String", # [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. |
| 1763 | "lastModifiedTime": "A String", # [Output-only] The time when this table was last modified, in milliseconds since the epoch. |
| 1764 | "requirePartitionFilter": false, # [Optional] If set to true, queries over this table require a partition filter that can be used for partition elimination to be specified. |
| 1765 | "materializedView": { # [Optional] Materialized view definition. |
| 1766 | "refreshIntervalMs": "A String", # [Optional] [TrustedTester] The maximum frequency at which this materialized view will be refreshed. The default value is "1800000" (30 minutes). |
| 1767 | "lastRefreshTime": "A String", # [Output-only] [TrustedTester] The time when this materialized view was last modified, in milliseconds since the epoch. |
| 1768 | "enableRefresh": True or False, # [Optional] [TrustedTester] Enable automatic refresh of the materialized view when the base table is updated. The default value is "true". |
| 1769 | "query": "A String", # [Required] A query whose result is persisted. |
| 1770 | }, |
| 1771 | "numLongTermBytes": "A String", # [Output-only] The number of bytes in the table that are considered "long-term storage". |
| 1772 | "rangePartitioning": { # [TrustedTester] Range partitioning specification for this table. Only one of timePartitioning and rangePartitioning should be specified. |
| 1773 | "range": { # [TrustedTester] [Required] Defines the ranges for range partitioning. |
| 1774 | "start": "A String", # [TrustedTester] [Required] The start of range partitioning, inclusive. |
| 1775 | "end": "A String", # [TrustedTester] [Required] The end of range partitioning, exclusive. |
| 1776 | "interval": "A String", # [TrustedTester] [Required] The width of each interval. |
| 1777 | }, |
| 1778 | "field": "A String", # [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. |
| 1779 | }, |
| 1780 | "clustering": { # [Beta] Clustering specification for the table. Must be specified with partitioning, data in the table will be first partitioned and subsequently clustered. |
| 1781 | "fields": [ # [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. |
| 1782 | "A String", |
| 1783 | ], |
| 1784 | }, |
| 1785 | "externalDataConfiguration": { # [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. |
| 1786 | "sourceFormat": "A String", # [Required] The data format. For CSV files, specify "CSV". For Google sheets, specify "GOOGLE_SHEETS". For newline-delimited JSON, specify "NEWLINE_DELIMITED_JSON". For Avro files, specify "AVRO". For Google Cloud Datastore backups, specify "DATASTORE_BACKUP". [Beta] For Google Cloud Bigtable, specify "BIGTABLE". |
| 1787 | "schema": { # [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. |
| 1788 | "fields": [ # Describes the fields in a table. |
| 1789 | { |
| 1790 | "categories": { # [Optional] The categories attached to this field, used for field-level access control. |
| 1791 | "names": [ # A list of category resource names. For example, "projects/1/taxonomies/2/categories/3". At most 5 categories are allowed. |
| 1792 | "A String", |
| 1793 | ], |
| 1794 | }, |
| 1795 | "policyTags": { |
| 1796 | "names": [ # A list of category resource names. For example, "projects/1/location/eu/taxonomies/2/policyTags/3". At most 1 policy tag is allowed. |
| 1797 | "A String", |
| 1798 | ], |
| 1799 | }, |
| 1800 | "name": "A String", # [Required] The field name. The name must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_), and must start with a letter or underscore. The maximum length is 128 characters. |
| 1801 | "type": "A String", # [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). |
| 1802 | "fields": [ # [Optional] Describes the nested schema fields if the type property is set to RECORD. |
| 1803 | # Object with schema name: TableFieldSchema |
| 1804 | ], |
| 1805 | "description": "A String", # [Optional] The field description. The maximum length is 1,024 characters. |
| 1806 | "mode": "A String", # [Optional] The field mode. Possible values include NULLABLE, REQUIRED and REPEATED. The default value is NULLABLE. |
| 1807 | }, |
| 1808 | ], |
| 1809 | }, |
| 1810 | "ignoreUnknownValues": 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'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. |
| 1811 | "maxBadRecords": 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. |
| 1812 | "hivePartitioningOptions": { # [Optional, Trusted Tester] Options to configure hive partitioning support. |
| 1813 | "sourceUriPrefix": "A String", # [Optional] When hive partition detection is requested, a common prefix for all source uris should be supplied. The prefix must end immediately before the partition key encoding begins. For example, consider files following this data layout. gs://bucket/path_to_table/dt=2019-01-01/country=BR/id=7/file.avro gs://bucket/path_to_table/dt=2018-12-31/country=CA/id=3/file.avro When hive partitioning is requested with either AUTO or STRINGS detection, the common prefix can be either of gs://bucket/path_to_table or gs://bucket/path_to_table/ (trailing slash does not matter). |
| 1814 | "requirePartitionFilter": True or False, # [Optional] If set to true, queries over this table require a partition filter that can be used for partition elimination to be specified. Note that this field should only be true when creating a permanent external table or querying a temporary external table. Hive-partitioned loads with requirePartitionFilter explicitly set to true will fail. |
| 1815 | "mode": "A String", # [Optional] When set, what mode of hive partitioning to use when reading data. The following modes are supported. (1) AUTO: automatically infer partition key name(s) and type(s). (2) STRINGS: automatically infer partition key name(s). All types are interpreted as strings. (3) CUSTOM: partition key schema is encoded in the source URI prefix. Not all storage formats support hive partitioning. Requesting hive partitioning on an unsupported format will lead to an error. Currently supported types include: AVRO, CSV, JSON, ORC and Parquet. |
| 1816 | }, |
| 1817 | "connectionId": "A String", # [Optional, Trusted Tester] Connection for external data source. |
| 1818 | "sourceUris": [ # [Required] The fully-qualified URIs that point to your data in Google Cloud. For Google Cloud Storage URIs: Each URI can contain one '*' wildcard character and it must come after the 'bucket' name. Size limits related to load jobs apply to external data sources. For Google Cloud Bigtable URIs: Exactly one URI can be specified and it has be a fully specified and valid HTTPS URL for a Google Cloud Bigtable table. For Google Cloud Datastore backups, exactly one URI can be specified. Also, the '*' wildcard character is not allowed. |
| 1819 | "A String", |
| 1820 | ], |
| 1821 | "googleSheetsOptions": { # [Optional] Additional options if sourceFormat is set to GOOGLE_SHEETS. |
| 1822 | "skipLeadingRows": "A String", # [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 > 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. |
| 1823 | "range": "A String", # [Optional] Range of a sheet to query from. Only used when non-empty. Typical format: sheet_name!top_left_cell_id:bottom_right_cell_id For example: sheet1!A1:B20 |
| 1824 | }, |
| 1825 | "autodetect": True or False, # Try to detect schema and format options automatically. Any option specified explicitly will be honored. |
| 1826 | "compression": "A String", # [Optional] The compression type of the data source. Possible values include GZIP and NONE. The default value is NONE. This setting is ignored for Google Cloud Bigtable, Google Cloud Datastore backups and Avro formats. |
| 1827 | "csvOptions": { # Additional properties to set if sourceFormat is set to CSV. |
| 1828 | "encoding": "A String", # [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. |
| 1829 | "quote": """, # [Optional] The value that is used to quote data sections in a CSV file. BigQuery converts the string to ISO-8859-1 encoding, and then uses the first byte of the encoded string to split the data in its raw, binary state. The default value is a double-quote ('"'). If your data does not contain quoted sections, set the property value to an empty string. If your data contains quoted newline characters, you must also set the allowQuotedNewlines property to true. |
| 1830 | "skipLeadingRows": "A String", # [Optional] The number of rows at the top of a CSV file that BigQuery will skip when reading the data. The default value is 0. This property is useful if you have header rows in the file that should be skipped. When autodetect is on, the behavior is the following: * skipLeadingRows unspecified - Autodetect tries to detect headers in the first row. If they are not detected, the row is read as data. Otherwise data is read starting from the second row. * skipLeadingRows is 0 - Instructs autodetect that there are no headers and data should be read starting from the first row. * skipLeadingRows = N > 0 - Autodetect skips N-1 rows and tries to detect headers in row N. If headers are not detected, row N is just skipped. Otherwise row N is used to extract column names for the detected schema. |
| 1831 | "allowJaggedRows": 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. |
| 1832 | "allowQuotedNewlines": 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. |
| 1833 | "fieldDelimiter": "A String", # [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 "\t" to specify a tab separator. The default value is a comma (','). |
| 1834 | }, |
| 1835 | "bigtableOptions": { # [Optional] Additional options if sourceFormat is set to BIGTABLE. |
| 1836 | "readRowkeyAsString": 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. |
| 1837 | "ignoreUnspecifiedColumnFamilies": 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. |
| 1838 | "columnFamilies": [ # [Optional] List of column families to expose in the table schema along with their types. This list restricts the column families that can be referenced in queries and specifies their value types. You can use this list to do type conversions - see the 'type' field for more details. If you leave this list empty, all column families are present in the table schema and their values are read as BYTES. During a query only the column families referenced in that query are read from Bigtable. |
| 1839 | { |
| 1840 | "onlyReadLatest": 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 'columns' and specifying a different setting for that column. |
| 1841 | "encoding": "A String", # [Optional] The encoding of the values when the type is not STRING. Acceptable encoding values are: TEXT - indicates values are alphanumeric text strings. BINARY - indicates values are encoded using HBase Bytes.toBytes family of functions. This can be overridden for a specific column by listing that column in 'columns' and specifying an encoding for it. |
| 1842 | "columns": [ # [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. |
| 1843 | { |
| 1844 | "fieldName": "A String", # [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. |
| 1845 | "qualifierString": "A String", |
| 1846 | "onlyReadLatest": True or False, # [Optional] If this is set, only the latest version of value in this column are exposed. 'onlyReadLatest' can also be set at the column family level. However, the setting at this level takes precedence if 'onlyReadLatest' is set at both levels. |
| 1847 | "type": "A String", # [Optional] The type to convert the value in cells of this column. The values are expected to be encoded using HBase Bytes.toBytes function when using the BINARY encoding value. Following BigQuery types are allowed (case-sensitive) - BYTES STRING INTEGER FLOAT BOOLEAN Default type is BYTES. 'type' can also be set at the column family level. However, the setting at this level takes precedence if 'type' is set at both levels. |
| 1848 | "encoding": "A String", # [Optional] The encoding of the values when the type is not STRING. Acceptable encoding values are: TEXT - indicates values are alphanumeric text strings. BINARY - indicates values are encoded using HBase Bytes.toBytes family of functions. 'encoding' can also be set at the column family level. However, the setting at this level takes precedence if 'encoding' is set at both levels. |
| 1849 | "qualifierEncoded": "A String", # [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. |
| 1850 | }, |
| 1851 | ], |
| 1852 | "type": "A String", # [Optional] The type to convert the value in cells of this column family. The values are expected to be encoded using HBase Bytes.toBytes function when using the BINARY encoding value. Following BigQuery types are allowed (case-sensitive) - BYTES STRING INTEGER FLOAT BOOLEAN Default type is BYTES. This can be overridden for a specific column by listing that column in 'columns' and specifying a type for it. |
| 1853 | "familyId": "A String", # Identifier of the column family. |
| 1854 | }, |
| 1855 | ], |
| 1856 | }, |
| 1857 | }, |
| 1858 | "description": "A String", # [Optional] A user-friendly description of this table. |
| 1859 | "creationTime": "A String", # [Output-only] The time when this table was created, in milliseconds since the epoch. |
| 1860 | "schema": { # [Optional] Describes the schema of this table. |
| 1861 | "fields": [ # Describes the fields in a table. |
| 1862 | { |
| 1863 | "categories": { # [Optional] The categories attached to this field, used for field-level access control. |
| 1864 | "names": [ # A list of category resource names. For example, "projects/1/taxonomies/2/categories/3". At most 5 categories are allowed. |
| 1865 | "A String", |
| 1866 | ], |
| 1867 | }, |
| 1868 | "policyTags": { |
| 1869 | "names": [ # A list of category resource names. For example, "projects/1/location/eu/taxonomies/2/policyTags/3". At most 1 policy tag is allowed. |
| 1870 | "A String", |
| 1871 | ], |
| 1872 | }, |
| 1873 | "name": "A String", # [Required] The field name. The name must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_), and must start with a letter or underscore. The maximum length is 128 characters. |
| 1874 | "type": "A String", # [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). |
| 1875 | "fields": [ # [Optional] Describes the nested schema fields if the type property is set to RECORD. |
| 1876 | # Object with schema name: TableFieldSchema |
| 1877 | ], |
| 1878 | "description": "A String", # [Optional] The field description. The maximum length is 1,024 characters. |
| 1879 | "mode": "A String", # [Optional] The field mode. Possible values include NULLABLE, REQUIRED and REPEATED. The default value is NULLABLE. |
| 1880 | }, |
| 1881 | ], |
| 1882 | }, |
| 1883 | "location": "A String", # [Output-only] The geographic location where the table resides. This value is inherited from the dataset. |
| 1884 | "kind": "bigquery#table", # [Output-only] The type of the resource. |
| 1885 | }</pre> |
John Asmuth | 614db98 | 2014-04-24 15:46:26 -0400 | [diff] [blame] | 1886 | </div> |
| 1887 | |
| 1888 | </body></html> |