blob: 5592d2c60a11b07b360c6848cd333f6ab4fbc265 [file] [log] [blame]
John Asmuth614db982014-04-24 15:46:26 -04001<html><body>
2<style>
3
4body, h1, h2, h3, div, span, p, pre, a {
5 margin: 0;
6 padding: 0;
7 border: 0;
8 font-weight: inherit;
9 font-style: inherit;
10 font-size: 100%;
11 font-family: inherit;
12 vertical-align: baseline;
13}
14
15body {
16 font-size: 13px;
17 padding: 1em;
18}
19
20h1 {
21 font-size: 26px;
22 margin-bottom: 1em;
23}
24
25h2 {
26 font-size: 24px;
27 margin-bottom: 1em;
28}
29
30h3 {
31 font-size: 20px;
32 margin-bottom: 1em;
33 margin-top: 1em;
34}
35
36pre, code {
37 line-height: 1.5;
38 font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
39}
40
41pre {
42 margin-top: 0.5em;
43}
44
45h1, h2, h3, p {
46 font-family: Arial, sans serif;
47}
48
49h1, h2, h3 {
50 border-bottom: solid #CCC 1px;
51}
52
53.toc_element {
54 margin-top: 0.5em;
55}
56
57.firstline {
58 margin-left: 2 em;
59}
60
61.method {
62 margin-top: 1em;
63 border: solid 1px #CCC;
64 padding: 1em;
65 background: #EEE;
66}
67
68.details {
69 font-weight: bold;
70 font-size: 14px;
71}
72
73</style>
74
75<h1><a href="bigquery_v2.html">BigQuery API</a> . <a href="bigquery_v2.tabledata.html">tabledata</a></h1>
76<h2>Instance Methods</h2>
77<p class="toc_element">
78 <code><a href="#insertAll">insertAll(projectId, datasetId, tableId, body)</a></code></p>
Nathaniel Manista4f877e52015-06-15 16:44:50 +000079<p class="firstline">Streams data into BigQuery one record at a time without needing to run a load job. Requires the WRITER dataset role.</p>
John Asmuth614db982014-04-24 15:46:26 -040080<p class="toc_element">
81 <code><a href="#list">list(projectId, datasetId, tableId, pageToken=None, maxResults=None, startIndex=None)</a></code></p>
Nathaniel Manista4f877e52015-06-15 16:44:50 +000082<p class="firstline">Retrieves table data from a specified set of rows. Requires the READER dataset role.</p>
John Asmuth614db982014-04-24 15:46:26 -040083<h3>Method Details</h3>
84<div class="method">
85 <code class="details" id="insertAll">insertAll(projectId, datasetId, tableId, body)</code>
Nathaniel Manista4f877e52015-06-15 16:44:50 +000086 <pre>Streams data into BigQuery one record at a time without needing to run a load job. Requires the WRITER dataset role.
John Asmuth614db982014-04-24 15:46:26 -040087
88Args:
89 projectId: string, Project ID of the destination table. (required)
90 datasetId: string, Dataset ID of the destination table. (required)
91 tableId: string, Table ID of the destination table. (required)
92 body: object, The request body. (required)
93 The object takes the form of:
94
95{
Nathaniel Manista4f877e52015-06-15 16:44:50 +000096 "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.
John Asmuth614db982014-04-24 15:46:26 -040097 "kind": "bigquery#tableDataInsertAllRequest", # The resource type of the response.
98 "rows": [ # The rows to insert.
99 {
100 "insertId": "A String", # [Optional] A unique ID for each row. BigQuery uses this property to detect duplicate insertion requests on a best-effort basis.
101 "json": { # Represents a single JSON object. # [Required] A JSON object that contains a row of data. The object's properties and values must match the destination table's schema.
102 "a_key": "",
103 },
104 },
105 ],
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000106 "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.
John Asmuth614db982014-04-24 15:46:26 -0400107 }
108
109
110Returns:
111 An object of the form:
112
113 {
114 "kind": "bigquery#tableDataInsertAllResponse", # The resource type of the response.
115 "insertErrors": [ # An array of errors for rows that were not inserted.
116 {
117 "index": 42, # The index of the row that error applies to.
118 "errors": [ # Error information for the row indicated by the index property.
119 {
120 "debugInfo": "A String", # Debugging information. This property is internal to Google and should not be used.
121 "message": "A String", # A human-readable description of the error.
122 "reason": "A String", # A short error code that summarizes the error.
123 "location": "A String", # Specifies where the error occurred, if present.
124 },
125 ],
126 },
127 ],
128 }</pre>
129</div>
130
131<div class="method">
132 <code class="details" id="list">list(projectId, datasetId, tableId, pageToken=None, maxResults=None, startIndex=None)</code>
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000133 <pre>Retrieves table data from a specified set of rows. Requires the READER dataset role.
John Asmuth614db982014-04-24 15:46:26 -0400134
135Args:
136 projectId: string, Project ID of the table to read (required)
137 datasetId: string, Dataset ID of the table to read (required)
138 tableId: string, Table ID of the table to read (required)
139 pageToken: string, Page token, returned by a previous call, identifying the result set
140 maxResults: integer, Maximum number of results to return
141 startIndex: string, Zero-based index of the starting row to read
142
143Returns:
144 An object of the form:
145
146 {
147 "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.
148 "kind": "bigquery#tableDataList", # The resource type of the response.
149 "etag": "A String", # A hash of this page of results.
150 "rows": [ # Rows of results.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000151 {
152 "f": [ # Represents a single row in the result set, consisting of one or more fields.
153 {
John Asmuth614db982014-04-24 15:46:26 -0400154 "v": "",
155 },
156 ],
157 },
158 ],
159 "totalRows": "A String", # The total number of rows in the complete table.
160 }</pre>
161</div>
162
163</body></html>