| 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.tabledata.html">tabledata</a></h1> |
| 76 |
<h2>Instance Methods</h2> |
| 77 |
<p class="toc_element"> |
| 78 |
<code><a href="#close">close()</a></code></p> |
| 79 |
<p class="firstline">Close httplib2 connections.</p> |
| 80 |
<p class="toc_element"> |
| 81 |
<code><a href="#insertAll">insertAll(projectId, datasetId, tableId, body=None, x__xgafv=None)</a></code></p> |
| 82 |
<p class="firstline">Streams data into BigQuery one record at a time without needing to run a load job. # IAM Permissions Requires the following IAM permission(s) to use this method: - `bigquery.tables.updateData` on the table. - `bigquery.tables.get` on the table. - `bigquery.datasets.get` on the dataset.</p> |
| 83 |
<p class="toc_element"> |
| 84 |
<code><a href="#list">list(projectId, datasetId, tableId, formatOptions_timestampOutputFormat=None, formatOptions_useInt64Timestamp=None, maxResults=None, pageToken=None, selectedFields=None, startIndex=None, x__xgafv=None)</a></code></p> |
| 85 |
<p class="firstline">List the content of a table in rows. # IAM Permissions Requires the `bigquery.tables.getData` permission on the table.</p> |
| 86 |
<p class="toc_element"> |
| 87 |
<code><a href="#list_next">list_next()</a></code></p> |
| 88 |
<p class="firstline">Retrieves the next page of results.</p> |
| 89 |
<h3>Method Details</h3> |
| 90 |
<div class="method"> |
| 91 |
<code class="details" id="close">close()</code> |
| 92 |
<pre>Close httplib2 connections.</pre> |
| 93 |
</div> |
| 94 |
|
| 95 |
<div class="method"> |
| 96 |
<code class="details" id="insertAll">insertAll(projectId, datasetId, tableId, body=None, x__xgafv=None)</code> |
| 97 |
<pre>Streams data into BigQuery one record at a time without needing to run a load job. # IAM Permissions Requires the following IAM permission(s) to use this method: - `bigquery.tables.updateData` on the table. - `bigquery.tables.get` on the table. - `bigquery.datasets.get` on the dataset. |
| 98 |
|
| 99 |
Args: |
| 100 |
projectId: string, Required. Project ID of the destination. (required) |
| 101 |
datasetId: string, Required. Dataset ID of the destination. (required) |
| 102 |
tableId: string, Required. Table ID of the destination. (required) |
| 103 |
body: object, The request body. |
| 104 |
The object takes the form of: |
| 105 |
|
| 106 |
{ # Request for sending a single streaming insert. |
| 107 |
"ignoreUnknownValues": True or False, # Optional. Accept rows that contain values that do not match the schema. The unknown values are ignored. Default is false, which treats unknown values as errors. |
| 108 |
"kind": "bigquery#tableDataInsertAllRequest", # Optional. The resource type of the response. The value is not checked at the backend. Historically, it has been set to "bigquery#tableDataInsertAllRequest" but you are not required to set it. |
| 109 |
"rows": [ |
| 110 |
{ # Data for a single insertion row. |
| 111 |
"insertId": "A String", # Insertion ID for best-effort deduplication. This feature is not recommended, and users seeking stronger insertion semantics are encouraged to use other mechanisms such as the BigQuery Write API. |
| 112 |
"json": { # Represents a single JSON object. # Data for a single row. |
| 113 |
"a_key": "", |
| 114 |
}, |
| 115 |
}, |
| 116 |
], |
| 117 |
"skipInvalidRows": True or False, # Optional. Insert all valid rows of a request, even if invalid rows exist. The default value is false, which causes the entire request to fail if any invalid rows exist. |
| 118 |
"templateSuffix": "A String", # Optional. If specified, treats the destination table as a base template, and inserts the rows into an instance table named "{destination}{templateSuffix}". BigQuery will manage creation of the instance table, using the schema of the base template table. See https://cloud.google.com/bigquery/streaming-data-into-bigquery#template-tables for considerations when working with templates tables. |
| 119 |
"traceId": "A String", # Optional. Unique request trace id. Used for debugging purposes only. It is case-sensitive, limited to up to 36 ASCII characters. A UUID is recommended. |
| 120 |
} |
| 121 |
|
| 122 |
x__xgafv: string, V1 error format. |
| 123 |
Allowed values |
| 124 |
1 - v1 error format |
| 125 |
2 - v2 error format |
| 126 |
|
| 127 |
Returns: |
| 128 |
An object of the form: |
| 129 |
|
| 130 |
{ # Describes the format of a streaming insert response. |
| 131 |
"insertErrors": [ # Describes specific errors encountered while processing the request. |
| 132 |
{ # Error details about a single row's insertion. |
| 133 |
"errors": [ # Error information for the row indicated by the index property. |
| 134 |
{ # Error details. |
| 135 |
"debugInfo": "A String", # Debugging information. This property is internal to Google and should not be used. |
| 136 |
"location": "A String", # Specifies where the error occurred, if present. |
| 137 |
"message": "A String", # A human-readable description of the error. |
| 138 |
"reason": "A String", # A short error code that summarizes the error. |
| 139 |
}, |
| 140 |
], |
| 141 |
"index": 42, # The index of the row that error applies to. |
| 142 |
}, |
| 143 |
], |
| 144 |
"kind": "bigquery#tableDataInsertAllResponse", # Returns "bigquery#tableDataInsertAllResponse". |
| 145 |
}</pre> |
| 146 |
</div> |
| 147 |
|
| 148 |
<div class="method"> |
| 149 |
<code class="details" id="list">list(projectId, datasetId, tableId, formatOptions_timestampOutputFormat=None, formatOptions_useInt64Timestamp=None, maxResults=None, pageToken=None, selectedFields=None, startIndex=None, x__xgafv=None)</code> |
| 150 |
<pre>List the content of a table in rows. # IAM Permissions Requires the `bigquery.tables.getData` permission on the table. |
| 151 |
|
| 152 |
Args: |
| 153 |
projectId: string, Required. Project id of the table to list. (required) |
| 154 |
datasetId: string, Required. Dataset id of the table to list. (required) |
| 155 |
tableId: string, Required. Table id of the table to list. (required) |
| 156 |
formatOptions_timestampOutputFormat: string, Optional. The API output format for a timestamp. This offers more explicit control over the timestamp output format as compared to the existing `use_int64_timestamp` option. |
| 157 |
Allowed values |
| 158 |
TIMESTAMP_OUTPUT_FORMAT_UNSPECIFIED - Corresponds to default API output behavior, which is FLOAT64. |
| 159 |
FLOAT64 - Timestamp is output as float64 seconds since Unix epoch. |
| 160 |
INT64 - Timestamp is output as int64 microseconds since Unix epoch. |
| 161 |
ISO8601_STRING - Timestamp is output as ISO 8601 String ("YYYY-MM-DDTHH:MM:SS.FFFFFFFFFFFFZ"). |
| 162 |
formatOptions_useInt64Timestamp: boolean, Optional. Output timestamp as usec int64. Default is false. |
| 163 |
maxResults: integer, Row limit of the table. |
| 164 |
pageToken: string, To retrieve the next page of table data, set this field to the string provided in the pageToken field of the response body from your previous call to tabledata.list. |
| 165 |
selectedFields: string, Subset of fields to return, supports select into sub fields. Example: selected_fields = "a,e.d.f"; |
| 166 |
startIndex: string, Start row index of the table. |
| 167 |
x__xgafv: string, V1 error format. |
| 168 |
Allowed values |
| 169 |
1 - v1 error format |
| 170 |
2 - v2 error format |
| 171 |
|
| 172 |
Returns: |
| 173 |
An object of the form: |
| 174 |
|
| 175 |
{ |
| 176 |
"etag": "A String", # A hash of this page of results. |
| 177 |
"kind": "bigquery#tableDataList", # The resource type of the response. |
| 178 |
"pageToken": "A String", # A token used for paging results. Providing this token instead of the startIndex parameter can help you retrieve stable results when an underlying table is changing. |
| 179 |
"rows": [ # Rows of results. |
| 180 |
{ |
| 181 |
"f": [ # Represents a single row in the result set, consisting of one or more fields. |
| 182 |
{ |
| 183 |
"v": "", |
| 184 |
}, |
| 185 |
], |
| 186 |
}, |
| 187 |
], |
| 188 |
"totalRows": "A String", # Total rows of the entire table. In order to show default value 0 we have to present it as string. |
| 189 |
}</pre> |
| 190 |
</div> |
| 191 |
|
| 192 |
<div class="method"> |
| 193 |
<code class="details" id="list_next">list_next()</code> |
| 194 |
<pre>Retrieves the next page of results. |
| 195 |
|
| 196 |
Args: |
| 197 |
previous_request: The request for the previous page. (required) |
| 198 |
previous_response: The response from the request for the previous page. (required) |
| 199 |
|
| 200 |
Returns: |
| 201 |
A request object that you can call 'execute()' on to request the next |
| 202 |
page. Returns None if there are no more items in the collection. |
| 203 |
</pre> |
| 204 |
</div> |
| 205 |
|
| 206 |
</body></html> |