bigbroda 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (131) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +25 -0
  3. data/.pryrc +3 -0
  4. data/.rspec +2 -0
  5. data/.rvmrc +1 -0
  6. data/Gemfile +18 -0
  7. data/LICENSE.txt +22 -0
  8. data/README.md +408 -0
  9. data/Rakefile +12 -0
  10. data/google_bigquery.gemspec +30 -0
  11. data/lib/.DS_Store +0 -0
  12. data/lib/active_record/.DS_Store +0 -0
  13. data/lib/active_record/connection_adapters/bigquery_adapter.rb +949 -0
  14. data/lib/active_record/tasks/bigquery_database_tasks.rb +42 -0
  15. data/lib/generators/.DS_Store +0 -0
  16. data/lib/generators/google_bigquery/.DS_Store +0 -0
  17. data/lib/generators/google_bigquery/install/install_generator.rb +21 -0
  18. data/lib/generators/templates/README +11 -0
  19. data/lib/generators/templates/bigquery.rb.erb +7 -0
  20. data/lib/google_bigquery/auth.rb +27 -0
  21. data/lib/google_bigquery/client.rb +52 -0
  22. data/lib/google_bigquery/config.rb +17 -0
  23. data/lib/google_bigquery/dataset.rb +77 -0
  24. data/lib/google_bigquery/engine.rb +21 -0
  25. data/lib/google_bigquery/jobs.rb +173 -0
  26. data/lib/google_bigquery/project.rb +16 -0
  27. data/lib/google_bigquery/railtie.rb +39 -0
  28. data/lib/google_bigquery/table.rb +63 -0
  29. data/lib/google_bigquery/table_data.rb +23 -0
  30. data/lib/google_bigquery/version.rb +3 -0
  31. data/lib/google_bigquery.rb +27 -0
  32. data/spec/.DS_Store +0 -0
  33. data/spec/dummy/.DS_Store +0 -0
  34. data/spec/dummy/.gitignore +20 -0
  35. data/spec/dummy/README.rdoc +261 -0
  36. data/spec/dummy/Rakefile +7 -0
  37. data/spec/dummy/app/assets/javascripts/application.js +16 -0
  38. data/spec/dummy/app/assets/stylesheets/application.css.scss +13 -0
  39. data/spec/dummy/app/controllers/application_controller.rb +4 -0
  40. data/spec/dummy/app/helpers/application_helper.rb +3 -0
  41. data/spec/dummy/app/mailers/.gitkeep +0 -0
  42. data/spec/dummy/app/models/log_data.rb +3 -0
  43. data/spec/dummy/app/models/post.rb +3 -0
  44. data/spec/dummy/app/models/user.rb +4 -0
  45. data/spec/dummy/app/views/layouts/application.html.haml +32 -0
  46. data/spec/dummy/config/application.rb +23 -0
  47. data/spec/dummy/config/boot.rb +11 -0
  48. data/spec/dummy/config/database.yml +32 -0
  49. data/spec/dummy/config/environment.rb +6 -0
  50. data/spec/dummy/config/environments/development.rb +29 -0
  51. data/spec/dummy/config/environments/production.rb +80 -0
  52. data/spec/dummy/config/environments/test.rb +36 -0
  53. data/spec/dummy/config/initializers/backtrace_silencers.rb +8 -0
  54. data/spec/dummy/config/initializers/bigquery.rb +19 -0
  55. data/spec/dummy/config/initializers/inflections.rb +16 -0
  56. data/spec/dummy/config/initializers/mime_types.rb +6 -0
  57. data/spec/dummy/config/initializers/secret_token.rb +8 -0
  58. data/spec/dummy/config/initializers/session_store.rb +9 -0
  59. data/spec/dummy/config/initializers/wrap_parameters.rb +15 -0
  60. data/spec/dummy/config/locales/devise.en.yml +58 -0
  61. data/spec/dummy/config/locales/en.yml +5 -0
  62. data/spec/dummy/config/locales/simple_form.en.yml +26 -0
  63. data/spec/dummy/config/routes.rb +4 -0
  64. data/spec/dummy/config.ru +4 -0
  65. data/spec/dummy/db/migrate/20140224051640_create_users.rb +11 -0
  66. data/spec/dummy/db/migrate/20140224063709_add_last_name_to_user.rb +5 -0
  67. data/spec/dummy/db/migrate/20140225014314_create_log_data.rb +12 -0
  68. data/spec/dummy/db/migrate/20140227015551_create_posts.rb +9 -0
  69. data/spec/dummy/db/schema.rb +39 -0
  70. data/spec/dummy/db/schema_migrations.json +1 -0
  71. data/spec/dummy/lib/assets/.gitkeep +0 -0
  72. data/spec/dummy/lib/templates/erb/scaffold/_form.html.erb +13 -0
  73. data/spec/dummy/log/.gitkeep +0 -0
  74. data/spec/dummy/public/404.html +26 -0
  75. data/spec/dummy/public/422.html +26 -0
  76. data/spec/dummy/public/500.html +25 -0
  77. data/spec/dummy/public/favicon.ico +0 -0
  78. data/spec/dummy/script/rails +6 -0
  79. data/spec/dummy/test/fixtures/log_data.yml +9 -0
  80. data/spec/dummy/test/fixtures/posts.yml +11 -0
  81. data/spec/dummy/test/fixtures/users.yml +11 -0
  82. data/spec/dummy/test/models/log_data_test.rb +7 -0
  83. data/spec/dummy/test/models/post_test.rb +7 -0
  84. data/spec/dummy/test/models/user_test.rb +7 -0
  85. data/spec/fixtures/.DS_Store +0 -0
  86. data/spec/fixtures/configs/account_config.yml-example +6 -0
  87. data/spec/fixtures/keys/.DS_Store +0 -0
  88. data/spec/fixtures/keys/example-privatekey-p12 +0 -0
  89. data/spec/fixtures/vcr_cassettes/ActiveRecord_Adapter/.DS_Store +0 -0
  90. data/spec/fixtures/vcr_cassettes/ActiveRecord_Adapter/adapter/simple_quering.yml +324 -0
  91. data/spec/fixtures/vcr_cassettes/ActiveRecord_Adapter/after_each.yml +154 -0
  92. data/spec/fixtures/vcr_cassettes/ActiveRecord_Adapter/authorize_config.yml +367 -0
  93. data/spec/fixtures/vcr_cassettes/ActiveRecord_Adapter/create_each.yml +195 -0
  94. data/spec/fixtures/vcr_cassettes/ActiveRecord_Adapter/migrations/_down/adds_the_email_at_utc_hour_column.yml +575 -0
  95. data/spec/fixtures/vcr_cassettes/ActiveRecord_Adapter/migrations/_up/adds_the_created_at_updated_at_column.yml +644 -0
  96. data/spec/fixtures/vcr_cassettes/ActiveRecord_Adapter/migrations/add_column/adds_published_column.yml +779 -0
  97. data/spec/fixtures/vcr_cassettes/ActiveRecord_Adapter/migrations/associations/users_posts.yml +1464 -0
  98. data/spec/fixtures/vcr_cassettes/ActiveRecord_Adapter/migrations/remove_column/should_raise_error.yml +713 -0
  99. data/spec/fixtures/vcr_cassettes/Dataset/_list.yml +64 -0
  100. data/spec/fixtures/vcr_cassettes/Dataset/authorize_config.yml +367 -0
  101. data/spec/fixtures/vcr_cassettes/Dataset/operations/_get_delete.yml +237 -0
  102. data/spec/fixtures/vcr_cassettes/Dataset/operations/_patch_delete.yml +240 -0
  103. data/spec/fixtures/vcr_cassettes/Dataset/operations/_update_delete.yml +297 -0
  104. data/spec/fixtures/vcr_cassettes/Dataset/operations/create_delete.yml +173 -0
  105. data/spec/fixtures/vcr_cassettes/Project/_list.yml +64 -0
  106. data/spec/fixtures/vcr_cassettes/Project/authorize_config.yml +2166 -0
  107. data/spec/fixtures/vcr_cassettes/Table/authorize_config.yml +367 -0
  108. data/spec/fixtures/vcr_cassettes/Table/operations/creation_edition/_create_delete.yml +404 -0
  109. data/spec/fixtures/vcr_cassettes/Table/operations/creation_edition/_create_update_delete.yml +471 -0
  110. data/spec/fixtures/vcr_cassettes/Table/operations/list.yml +232 -0
  111. data/spec/fixtures/vcr_cassettes/TableData/authorize_config.yml +2166 -0
  112. data/spec/fixtures/vcr_cassettes/TableData/create_each.yml +135 -0
  113. data/spec/fixtures/vcr_cassettes/TableData/delete_each.yml +154 -0
  114. data/spec/fixtures/vcr_cassettes/TableData/insertAll2.yml +189 -0
  115. data/spec/fixtures/vcr_cassettes/auth.yml +2168 -0
  116. data/spec/fixtures/vcr_cassettes/authorize_config.yml +2166 -0
  117. data/spec/fixtures/vcr_cassettes/datasets.yml +119 -0
  118. data/spec/fixtures/vcr_cassettes/delete_each_dataset.yml +48 -0
  119. data/spec/functional/adapter/adapter_spec.rb +213 -0
  120. data/spec/functional/auth_spec.rb +24 -0
  121. data/spec/functional/client_spec.rb +9 -0
  122. data/spec/functional/config_spec.rb +24 -0
  123. data/spec/functional/dataset_spec.rb +77 -0
  124. data/spec/functional/project_spec.rb +24 -0
  125. data/spec/functional/table_data_spec.rb +61 -0
  126. data/spec/functional/table_spec.rb +105 -0
  127. data/spec/models/user_spec.rb +0 -0
  128. data/spec/spec_helper.rb +48 -0
  129. data/spec/support/models.rb +11 -0
  130. data/spec/support/schema.rb +43 -0
  131. metadata +370 -0
@@ -0,0 +1,2166 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://accounts.google.com/o/oauth2/token
6
+ body:
7
+ encoding: ASCII-8BIT
8
+ string: grant_type=urn%3Aietf%3Aparams%3Aoauth%3Agrant-type%3Ajwt-bearer&assertion=eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJpc3MiOiI5ODU4ODQ2OTk1MTJAZGV2ZWxvcGVyLmdzZXJ2aWNlYWNjb3VudC5jb20iLCJzY29wZSI6Imh0dHBzOi8vd3d3Lmdvb2dsZWFwaXMuY29tL2F1dGgvYmlncXVlcnkiLCJhdWQiOiJodHRwczovL2FjY291bnRzLmdvb2dsZS5jb20vby9vYXV0aDIvdG9rZW4iLCJleHAiOjEzOTMzNzY5MDYsImlhdCI6MTM5MzM3Njc4Nn0.Hi_syUbje5NA7sQW2XRf268e1C0F82Sh4ykzqh2wQHdROwXQ7tCVMsmMS_Li0Nxuxf01Q8VPz-7rfqrASQ-8xGayAv-IqNALqXVvamZ0Ea3H-WXWBxJ-d67JRLeyTqArRP9mgs0RTQWuoTpi1rN1Mw6Tdv9NNJG4gT3CMOvG4tk
9
+ headers:
10
+ Cache-Control:
11
+ - no-store
12
+ Content-Type:
13
+ - application/x-www-form-urlencoded
14
+ Accept-Encoding:
15
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
16
+ Accept:
17
+ - '*/*'
18
+ User-Agent:
19
+ - Ruby
20
+ response:
21
+ status:
22
+ code: 200
23
+ message: OK
24
+ headers:
25
+ Cache-Control:
26
+ - no-cache, no-store, max-age=0, must-revalidate
27
+ Pragma:
28
+ - no-cache
29
+ Expires:
30
+ - Fri, 01 Jan 1990 00:00:00 GMT
31
+ Date:
32
+ - Wed, 26 Feb 2014 01:07:28 GMT
33
+ Content-Type:
34
+ - application/json
35
+ X-Content-Type-Options:
36
+ - nosniff
37
+ X-Frame-Options:
38
+ - SAMEORIGIN
39
+ X-Xss-Protection:
40
+ - 1; mode=block
41
+ Server:
42
+ - GSE
43
+ Alternate-Protocol:
44
+ - 443:quic
45
+ Transfer-Encoding:
46
+ - chunked
47
+ body:
48
+ encoding: UTF-8
49
+ string: |-
50
+ {
51
+ "access_token" : "ya29.1.AADtN_XSQUKfaCs6ZfiN50_0c4fKBJ-qkWXSHzi86KvpsZE75iZrVKWK3dztrW_c",
52
+ "token_type" : "Bearer",
53
+ "expires_in" : 3600
54
+ }
55
+ http_version:
56
+ recorded_at: Wed, 26 Feb 2014 01:07:28 GMT
57
+ - request:
58
+ method: get
59
+ uri: https://www.googleapis.com/discovery/v1/apis/bigquery/v2/rest
60
+ body:
61
+ encoding: UTF-8
62
+ string: ''
63
+ headers:
64
+ User-Agent:
65
+ - |-
66
+ google-api-ruby-client/0.7.1 Mac OS X/10.9
67
+ (gzip)
68
+ Accept-Encoding:
69
+ - gzip
70
+ Content-Type:
71
+ - ''
72
+ Accept:
73
+ - '*/*'
74
+ response:
75
+ status:
76
+ code: 200
77
+ message: OK
78
+ headers:
79
+ Expires:
80
+ - Wed, 26 Feb 2014 01:11:08 GMT
81
+ Date:
82
+ - Wed, 26 Feb 2014 01:06:08 GMT
83
+ Etag:
84
+ - '"R6H4aXXmd1SZaWpEcGSkC2StmNw/gitrYZaX91RziVB33gywCD8BWks"'
85
+ Content-Type:
86
+ - application/json; charset=UTF-8
87
+ X-Content-Type-Options:
88
+ - nosniff
89
+ X-Frame-Options:
90
+ - SAMEORIGIN
91
+ X-Xss-Protection:
92
+ - 1; mode=block
93
+ Content-Length:
94
+ - '69424'
95
+ Server:
96
+ - GSE
97
+ Age:
98
+ - '81'
99
+ Cache-Control:
100
+ - public, max-age=300, must-revalidate, no-transform
101
+ Alternate-Protocol:
102
+ - 443:quic
103
+ body:
104
+ encoding: UTF-8
105
+ string: |
106
+ {
107
+ "kind": "discovery#restDescription",
108
+ "etag": "\"R6H4aXXmd1SZaWpEcGSkC2StmNw/gitrYZaX91RziVB33gywCD8BWks\"",
109
+ "discoveryVersion": "v1",
110
+ "id": "bigquery:v2",
111
+ "name": "bigquery",
112
+ "version": "v2",
113
+ "title": "BigQuery API",
114
+ "description": "A data platform for customers to create, manage, share and query data.",
115
+ "ownerDomain": "google.com",
116
+ "ownerName": "Google",
117
+ "icons": {
118
+ "x16": "http://www.google.com/images/icons/product/search-16.gif",
119
+ "x32": "http://www.google.com/images/icons/product/search-32.gif"
120
+ },
121
+ "documentationLink": "https://developers.google.com/bigquery/docs/overview",
122
+ "protocol": "rest",
123
+ "baseUrl": "https://www.googleapis.com/bigquery/v2/",
124
+ "basePath": "/bigquery/v2/",
125
+ "rootUrl": "https://www.googleapis.com/",
126
+ "servicePath": "bigquery/v2/",
127
+ "batchPath": "batch",
128
+ "parameters": {
129
+ "alt": {
130
+ "type": "string",
131
+ "description": "Data format for the response.",
132
+ "default": "json",
133
+ "enum": [
134
+ "csv",
135
+ "json"
136
+ ],
137
+ "enumDescriptions": [
138
+ "Responses with Content-Type of text/csv",
139
+ "Responses with Content-Type of application/json"
140
+ ],
141
+ "location": "query"
142
+ },
143
+ "fields": {
144
+ "type": "string",
145
+ "description": "Selector specifying which fields to include in a partial response.",
146
+ "location": "query"
147
+ },
148
+ "key": {
149
+ "type": "string",
150
+ "description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.",
151
+ "location": "query"
152
+ },
153
+ "oauth_token": {
154
+ "type": "string",
155
+ "description": "OAuth 2.0 token for the current user.",
156
+ "location": "query"
157
+ },
158
+ "prettyPrint": {
159
+ "type": "boolean",
160
+ "description": "Returns response with indentations and line breaks.",
161
+ "default": "true",
162
+ "location": "query"
163
+ },
164
+ "quotaUser": {
165
+ "type": "string",
166
+ "description": "Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided.",
167
+ "location": "query"
168
+ },
169
+ "userIp": {
170
+ "type": "string",
171
+ "description": "IP address of the site where the request originates. Use this if you want to enforce per-user limits.",
172
+ "location": "query"
173
+ }
174
+ },
175
+ "auth": {
176
+ "oauth2": {
177
+ "scopes": {
178
+ "https://www.googleapis.com/auth/bigquery": {
179
+ "description": "View and manage your data in Google BigQuery"
180
+ },
181
+ "https://www.googleapis.com/auth/cloud-platform": {
182
+ "description": "View and manage your data across Google Cloud Platform services"
183
+ },
184
+ "https://www.googleapis.com/auth/devstorage.full_control": {
185
+ "description": "Manage your data and permissions in Google Cloud Storage"
186
+ },
187
+ "https://www.googleapis.com/auth/devstorage.read_only": {
188
+ "description": "View your data in Google Cloud Storage"
189
+ },
190
+ "https://www.googleapis.com/auth/devstorage.read_write": {
191
+ "description": "Manage your data in Google Cloud Storage"
192
+ }
193
+ }
194
+ }
195
+ },
196
+ "schemas": {
197
+ "Dataset": {
198
+ "id": "Dataset",
199
+ "type": "object",
200
+ "properties": {
201
+ "access": {
202
+ "type": "array",
203
+ "description": "[Optional] Describes users' rights on the dataset. You can assign the same role to multiple users, and assign multiple roles to the same user.\nDefault values assigned to a new dataset are as follows: OWNER - Project owners, dataset creator READER - Project readers WRITER - Project writers\nSee ACLs and Rights for a description of these rights. If you specify any of these roles when creating a dataset, the assigned roles will overwrite the defaults listed above.\nTo revoke rights to a dataset, call datasets.update() and omit the names of anyone whose rights you wish to revoke. However, every dataset must have at least one entity granted OWNER role.\nEach access object can have only one of the following members: userByEmail, groupByEmail, domain, or allAuthenticatedUsers.",
204
+ "items": {
205
+ "type": "object",
206
+ "properties": {
207
+ "domain": {
208
+ "type": "string",
209
+ "description": "[Pick one] A domain to grant access to. Any users signed in with the domain specified will be granted the specified access. Example: \"example.com\"."
210
+ },
211
+ "groupByEmail": {
212
+ "type": "string",
213
+ "description": "[Pick one] A fully-qualified email address of a mailing list to grant access to. This must be either a Google Groups mailing list (ends in @googlegroups.com) or a group managed by an enterprise version of Google Groups."
214
+ },
215
+ "role": {
216
+ "type": "string",
217
+ "description": "[Required] Describes the rights granted to the user specified by the other member of the access object. The following string values are supported: READER - User can call any list() or get() method on any collection or resource. WRITER - User can call any method on any collection except for datasets, on which they can call list() and get(). OWNER - User can call any method. The dataset creator is granted this role by default."
218
+ },
219
+ "specialGroup": {
220
+ "type": "string",
221
+ "description": "[Pick one] A special group to grant access to. The valid values are: projectOwners: Owners of the enclosing project. projectReaders: Readers of the enclosing project. projectWriters: Writers of the enclosing project. allAuthenticatedUsers: All authenticated BigQuery users."
222
+ },
223
+ "userByEmail": {
224
+ "type": "string",
225
+ "description": "[Pick one] A fully qualified email address of a user to grant access to. For example: fred@example.com."
226
+ }
227
+ }
228
+ }
229
+ },
230
+ "creationTime": {
231
+ "type": "string",
232
+ "description": "[Output-only] The time when this dataset was created, in milliseconds since the epoch.",
233
+ "format": "int64"
234
+ },
235
+ "datasetReference": {
236
+ "$ref": "DatasetReference",
237
+ "description": "[Required] Reference identifying dataset."
238
+ },
239
+ "description": {
240
+ "type": "string",
241
+ "description": "[Optional] A user-friendly string description for the dataset. This might be shown in BigQuery UI for browsing the dataset."
242
+ },
243
+ "etag": {
244
+ "type": "string",
245
+ "description": "[Output-only] A hash of this resource."
246
+ },
247
+ "friendlyName": {
248
+ "type": "string",
249
+ "description": "[Optional] A descriptive name for this dataset, which might be shown in any BigQuery user interfaces for browsing the dataset. Use datasetId for making API calls."
250
+ },
251
+ "id": {
252
+ "type": "string",
253
+ "description": "[Output-only] The fully-qualified unique name of this dataset in the format projectId:datasetId. The dataset name without the project name is given in the datasetId field. When creating a new dataset, leave this field blank, and instead specify the datasetId field."
254
+ },
255
+ "kind": {
256
+ "type": "string",
257
+ "description": "[Output-only] The resource type.",
258
+ "default": "bigquery#dataset"
259
+ },
260
+ "lastModifiedTime": {
261
+ "type": "string",
262
+ "description": "[Output-only] The date when this dataset or any of its tables was last modified, in milliseconds since the epoch.",
263
+ "format": "int64"
264
+ },
265
+ "selfLink": {
266
+ "type": "string",
267
+ "description": "[Output-only] An URL that can be used to access this resource again. You can use this URL in Get or Update requests to this resource."
268
+ }
269
+ }
270
+ },
271
+ "DatasetList": {
272
+ "id": "DatasetList",
273
+ "type": "object",
274
+ "properties": {
275
+ "datasets": {
276
+ "type": "array",
277
+ "description": "An array of the dataset resources in the project. Each resource contains basic information. For full information about a particular dataset resource, use the Datasets: get method. This property is omitted when there are no datasets in the project.",
278
+ "items": {
279
+ "type": "object",
280
+ "properties": {
281
+ "datasetReference": {
282
+ "$ref": "DatasetReference",
283
+ "description": "The dataset reference. Use this property to access specific parts of the dataset's ID, such as project ID or dataset ID."
284
+ },
285
+ "friendlyName": {
286
+ "type": "string",
287
+ "description": "A descriptive name for the dataset, if one exists."
288
+ },
289
+ "id": {
290
+ "type": "string",
291
+ "description": "The fully-qualified, unique, opaque ID of the dataset."
292
+ },
293
+ "kind": {
294
+ "type": "string",
295
+ "description": "The resource type. This property always returns the value \"bigquery#dataset\".",
296
+ "default": "bigquery#dataset"
297
+ }
298
+ }
299
+ }
300
+ },
301
+ "etag": {
302
+ "type": "string",
303
+ "description": "A hash value of the results page. You can use this property to determine if the page has changed since the last request."
304
+ },
305
+ "kind": {
306
+ "type": "string",
307
+ "description": "The list type. This property always returns the value \"bigquery#datasetList\".",
308
+ "default": "bigquery#datasetList"
309
+ },
310
+ "nextPageToken": {
311
+ "type": "string",
312
+ "description": "A token that can be used to request the next results page. This property is omitted on the final results page."
313
+ }
314
+ }
315
+ },
316
+ "DatasetReference": {
317
+ "id": "DatasetReference",
318
+ "type": "object",
319
+ "properties": {
320
+ "datasetId": {
321
+ "type": "string",
322
+ "description": "[Required] A unique ID for this dataset, without the project name.",
323
+ "annotations": {
324
+ "required": [
325
+ "bigquery.datasets.update"
326
+ ]
327
+ }
328
+ },
329
+ "projectId": {
330
+ "type": "string",
331
+ "description": "[Optional] The ID of the container project.",
332
+ "annotations": {
333
+ "required": [
334
+ "bigquery.datasets.update"
335
+ ]
336
+ }
337
+ }
338
+ }
339
+ },
340
+ "ErrorProto": {
341
+ "id": "ErrorProto",
342
+ "type": "object",
343
+ "properties": {
344
+ "debugInfo": {
345
+ "type": "string",
346
+ "description": "Debugging information. This property is internal to Google and should not be used."
347
+ },
348
+ "location": {
349
+ "type": "string",
350
+ "description": "Specifies where the error occurred, if present."
351
+ },
352
+ "message": {
353
+ "type": "string",
354
+ "description": "A human-readable description of the error."
355
+ },
356
+ "reason": {
357
+ "type": "string",
358
+ "description": "A short error code that summarizes the error."
359
+ }
360
+ }
361
+ },
362
+ "GetQueryResultsResponse": {
363
+ "id": "GetQueryResultsResponse",
364
+ "type": "object",
365
+ "properties": {
366
+ "cacheHit": {
367
+ "type": "boolean",
368
+ "description": "Whether the query result was fetched from the query cache."
369
+ },
370
+ "etag": {
371
+ "type": "string",
372
+ "description": "A hash of this response."
373
+ },
374
+ "jobComplete": {
375
+ "type": "boolean",
376
+ "description": "Whether the query has completed or not. If rows or totalRows are present, this will always be true. If this is false, totalRows will not be available."
377
+ },
378
+ "jobReference": {
379
+ "$ref": "JobReference",
380
+ "description": "Reference to the BigQuery Job that was created to run the query. This field will be present even if the original request timed out, in which case GetQueryResults can be used to read the results once the query has completed. Since this API only returns the first page of results, subsequent pages can be fetched via the same mechanism (GetQueryResults)."
381
+ },
382
+ "kind": {
383
+ "type": "string",
384
+ "description": "The resource type of the response.",
385
+ "default": "bigquery#getQueryResultsResponse"
386
+ },
387
+ "pageToken": {
388
+ "type": "string",
389
+ "description": "A token used for paging results."
390
+ },
391
+ "rows": {
392
+ "type": "array",
393
+ "description": "An object with as many results as can be contained within the maximum permitted reply size. To get any additional rows, you can call GetQueryResults and specify the jobReference returned above. Present only when the query completes successfully.",
394
+ "items": {
395
+ "$ref": "TableRow"
396
+ }
397
+ },
398
+ "schema": {
399
+ "$ref": "TableSchema",
400
+ "description": "The schema of the results. Present only when the query completes successfully."
401
+ },
402
+ "totalRows": {
403
+ "type": "string",
404
+ "description": "The total number of rows in the complete query result set, which can be more than the number of rows in this single page of results. Present only when the query completes successfully.",
405
+ "format": "uint64"
406
+ }
407
+ }
408
+ },
409
+ "Job": {
410
+ "id": "Job",
411
+ "type": "object",
412
+ "properties": {
413
+ "configuration": {
414
+ "$ref": "JobConfiguration",
415
+ "description": "[Required] Describes the job configuration."
416
+ },
417
+ "etag": {
418
+ "type": "string",
419
+ "description": "[Output-only] A hash of this resource."
420
+ },
421
+ "id": {
422
+ "type": "string",
423
+ "description": "[Output-only] Opaque ID field of the job"
424
+ },
425
+ "jobReference": {
426
+ "$ref": "JobReference",
427
+ "description": "[Optional] Reference describing the unique-per-user name of the job."
428
+ },
429
+ "kind": {
430
+ "type": "string",
431
+ "description": "[Output-only] The type of the resource.",
432
+ "default": "bigquery#job"
433
+ },
434
+ "selfLink": {
435
+ "type": "string",
436
+ "description": "[Output-only] A URL that can be used to access this resource again."
437
+ },
438
+ "statistics": {
439
+ "$ref": "JobStatistics",
440
+ "description": "[Output-only] Information about the job, including starting time and ending time of the job."
441
+ },
442
+ "status": {
443
+ "$ref": "JobStatus",
444
+ "description": "[Output-only] The status of this job. Examine this value when polling an asynchronous job to see if the job is complete."
445
+ }
446
+ }
447
+ },
448
+ "JobConfiguration": {
449
+ "id": "JobConfiguration",
450
+ "type": "object",
451
+ "properties": {
452
+ "copy": {
453
+ "$ref": "JobConfigurationTableCopy",
454
+ "description": "[Pick one] Copies a table."
455
+ },
456
+ "dryRun": {
457
+ "type": "boolean",
458
+ "description": "[Optional] If set, don't actually run this job. A valid query will return a mostly empty response with some processing statistics, while an invalid query will return the same error it would if it wasn't a dry run. Behavior of non-query jobs is undefined."
459
+ },
460
+ "extract": {
461
+ "$ref": "JobConfigurationExtract",
462
+ "description": "[Pick one] Configures an extract job."
463
+ },
464
+ "link": {
465
+ "$ref": "JobConfigurationLink",
466
+ "description": "[Pick one] Configures a link job."
467
+ },
468
+ "load": {
469
+ "$ref": "JobConfigurationLoad",
470
+ "description": "[Pick one] Configures a load job."
471
+ },
472
+ "query": {
473
+ "$ref": "JobConfigurationQuery",
474
+ "description": "[Pick one] Configures a query job."
475
+ }
476
+ }
477
+ },
478
+ "JobConfigurationExtract": {
479
+ "id": "JobConfigurationExtract",
480
+ "type": "object",
481
+ "properties": {
482
+ "destinationFormat": {
483
+ "type": "string",
484
+ "description": "[Experimental] Optional and defaults to CSV. Format with which files should be exported. To export to CSV, specify \"CSV\". Tables with nested or repeated fields cannot be exported as CSV. To export to newline-delimited JSON, specify \"NEWLINE_DELIMITED_JSON\"."
485
+ },
486
+ "destinationUri": {
487
+ "type": "string",
488
+ "description": "[Pick one] DEPRECATED: Use destinationUris instead, passing only one URI as necessary. The fully-qualified Google Cloud Storage URI where the extracted table should be written."
489
+ },
490
+ "destinationUris": {
491
+ "type": "array",
492
+ "description": "[Pick one] A list of fully-qualified Google Cloud Storage URIs where the extracted table should be written.",
493
+ "items": {
494
+ "type": "string"
495
+ }
496
+ },
497
+ "fieldDelimiter": {
498
+ "type": "string",
499
+ "description": "[Optional] Delimiter to use between fields in the exported data. Default is ','"
500
+ },
501
+ "printHeader": {
502
+ "type": "boolean",
503
+ "description": "[Optional] Whether to print out a header row in the results. Default is true."
504
+ },
505
+ "sourceTable": {
506
+ "$ref": "TableReference",
507
+ "description": "[Required] A reference to the table being exported."
508
+ }
509
+ }
510
+ },
511
+ "JobConfigurationLink": {
512
+ "id": "JobConfigurationLink",
513
+ "type": "object",
514
+ "properties": {
515
+ "createDisposition": {
516
+ "type": "string",
517
+ "description": "[Optional] Whether or not to create a new table, if none exists."
518
+ },
519
+ "destinationTable": {
520
+ "$ref": "TableReference",
521
+ "description": "[Required] The destination table of the link job."
522
+ },
523
+ "sourceUri": {
524
+ "type": "array",
525
+ "description": "[Required] URI of source table to link.",
526
+ "items": {
527
+ "type": "string"
528
+ }
529
+ },
530
+ "writeDisposition": {
531
+ "type": "string",
532
+ "description": "[Optional] Whether to overwrite an existing table (WRITE_TRUNCATE), append to an existing table (WRITE_APPEND), or require that the the table is empty (WRITE_EMPTY). Default is WRITE_APPEND."
533
+ }
534
+ }
535
+ },
536
+ "JobConfigurationLoad": {
537
+ "id": "JobConfigurationLoad",
538
+ "type": "object",
539
+ "properties": {
540
+ "allowJaggedRows": {
541
+ "type": "boolean",
542
+ "description": "[Optional] Accept rows that are missing trailing optional columns. The missing values are treated as nulls. Default is false which treats short rows as errors. Only applicable to CSV, ignored for other formats."
543
+ },
544
+ "allowQuotedNewlines": {
545
+ "type": "boolean",
546
+ "description": "Indicates if BigQuery should allow quoted data sections that contain newline characters in a CSV file. The default value is false."
547
+ },
548
+ "createDisposition": {
549
+ "type": "string",
550
+ "description": "[Optional] Specifies whether the job is allowed to create new tables. The following values are supported: CREATE_IF_NEEDED: If the table does not exist, BigQuery creates the table. CREATE_NEVER: The table must already exist. If it does not, a 'notFound' error is returned in the job result. The default value is CREATE_IF_NEEDED. Creation, truncation and append actions occur as one atomic update upon job completion."
551
+ },
552
+ "destinationTable": {
553
+ "$ref": "TableReference",
554
+ "description": "[Required] The destination table to load the data into."
555
+ },
556
+ "encoding": {
557
+ "type": "string",
558
+ "description": "[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."
559
+ },
560
+ "fieldDelimiter": {
561
+ "type": "string",
562
+ "description": "[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 (',')."
563
+ },
564
+ "ignoreUnknownValues": {
565
+ "type": "boolean",
566
+ "description": "[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. For CSV this ignores extra values at the end of a line. For JSON this ignores named values that do not match any column name."
567
+ },
568
+ "maxBadRecords": {
569
+ "type": "integer",
570
+ "description": "[Optional] The maximum number of bad records that BigQuery can ignore when running the job. If the number of bad records exceeds this value, an 'invalid' error is returned in the job result and the job fails. The default value is 0, which requires that all records are valid.",
571
+ "format": "int32"
572
+ },
573
+ "quote": {
574
+ "type": "string",
575
+ "description": "[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."
576
+ },
577
+ "schema": {
578
+ "$ref": "TableSchema",
579
+ "description": "[Optional] The schema for the destination table. The schema can be omitted if the destination table already exists or if the schema can be inferred from the loaded data."
580
+ },
581
+ "schemaInline": {
582
+ "type": "string",
583
+ "description": "[Deprecated] The inline schema. For CSV schemas, specify as \"Field1:Type1[,Field2:Type2]*\". For example, \"foo:STRING, bar:INTEGER, baz:FLOAT\"."
584
+ },
585
+ "schemaInlineFormat": {
586
+ "type": "string",
587
+ "description": "[Deprecated] The format of the schemaInline property."
588
+ },
589
+ "skipLeadingRows": {
590
+ "type": "integer",
591
+ "description": "[Optional] The number of rows at the top of a CSV file that BigQuery will skip when loading the data. The default value is 0. This property is useful if you have header rows in the file that should be skipped.",
592
+ "format": "int32"
593
+ },
594
+ "sourceFormat": {
595
+ "type": "string",
596
+ "description": "[Optional] The format of the data files. For CSV files, specify \"CSV\". For datastore backups, specify \"DATASTORE_BACKUP\". For newline-delimited JSON, specify \"NEWLINE_DELIMITED_JSON\". The default value is CSV."
597
+ },
598
+ "sourceUris": {
599
+ "type": "array",
600
+ "description": "[Required] The fully-qualified URIs that point to your data on Google Cloud Storage.",
601
+ "items": {
602
+ "type": "string"
603
+ }
604
+ },
605
+ "writeDisposition": {
606
+ "type": "string",
607
+ "description": "[Optional] Specifies the action that occurs if the destination table already exists. Each action is atomic and only occurs if BigQuery is able to fully load the data and the load job completes without error. The following values are supported: WRITE_TRUNCATE: If the table already exists, BigQuery overwrites the table. WRITE_APPEND: If the table already exists, BigQuery appends the data to the table. WRITE_EMPTY: If the table already exists, a 'duplicate' error is returned in the job result. Creation, truncation and append actions occur as one atomic update upon job completion."
608
+ }
609
+ }
610
+ },
611
+ "JobConfigurationQuery": {
612
+ "id": "JobConfigurationQuery",
613
+ "type": "object",
614
+ "properties": {
615
+ "allowLargeResults": {
616
+ "type": "boolean",
617
+ "description": "If true, allows the query to produce arbitrarily large result tables at a slight cost in performance. Requires destination_table to be set."
618
+ },
619
+ "createDisposition": {
620
+ "type": "string",
621
+ "description": "[Optional] Whether to create the table if it doesn't already exist (CREATE_IF_NEEDED) or to require the table already exist (CREATE_NEVER). Default is CREATE_IF_NEEDED."
622
+ },
623
+ "defaultDataset": {
624
+ "$ref": "DatasetReference",
625
+ "description": "[Optional] Specifies the default dataset to assume for unqualified table names in the query."
626
+ },
627
+ "destinationTable": {
628
+ "$ref": "TableReference",
629
+ "description": "[Optional] Describes the table where the query results should be stored. If not present, a new table will be created to store the results."
630
+ },
631
+ "preserveNulls": {
632
+ "type": "boolean",
633
+ "description": "[Experimental] If set, preserve null values in table data, rather than mapping null values to the column's default value. This flag currently defaults to false, but the default will soon be changed to true. Shortly afterward, this flag will be removed completely. Please specify true if possible, and false only if you need to force the old behavior while updating client code."
634
+ },
635
+ "priority": {
636
+ "type": "string",
637
+ "description": "[Optional] Specifies a priority for the query. Default is INTERACTIVE. Alternative is BATCH."
638
+ },
639
+ "query": {
640
+ "type": "string",
641
+ "description": "[Required] BigQuery SQL query to execute."
642
+ },
643
+ "useQueryCache": {
644
+ "type": "boolean",
645
+ "description": "[Optional] Whether to look for the result in the query cache. The query cache is a best-effort cache that will be flushed whenever tables in the query are modified. Moreover, the query cache is only available when a query does not have a destination table specified."
646
+ },
647
+ "writeDisposition": {
648
+ "type": "string",
649
+ "description": "[Optional] Whether to overwrite an existing table (WRITE_TRUNCATE), append to an existing table (WRITE_APPEND), or require that the the table is empty (WRITE_EMPTY). Default is WRITE_EMPTY."
650
+ }
651
+ }
652
+ },
653
+ "JobConfigurationTableCopy": {
654
+ "id": "JobConfigurationTableCopy",
655
+ "type": "object",
656
+ "properties": {
657
+ "createDisposition": {
658
+ "type": "string",
659
+ "description": "[Optional] Whether or not to create a new table, if none exists."
660
+ },
661
+ "destinationTable": {
662
+ "$ref": "TableReference",
663
+ "description": "[Required] The destination table"
664
+ },
665
+ "sourceTable": {
666
+ "$ref": "TableReference",
667
+ "description": "[Required] Source table to copy."
668
+ },
669
+ "writeDisposition": {
670
+ "type": "string",
671
+ "description": "[Optional] Whether or not to append or require the table to be empty."
672
+ }
673
+ }
674
+ },
675
+ "JobList": {
676
+ "id": "JobList",
677
+ "type": "object",
678
+ "properties": {
679
+ "etag": {
680
+ "type": "string",
681
+ "description": "A hash of this page of results."
682
+ },
683
+ "jobs": {
684
+ "type": "array",
685
+ "description": "List of jobs that were requested.",
686
+ "items": {
687
+ "type": "object",
688
+ "properties": {
689
+ "configuration": {
690
+ "$ref": "JobConfiguration",
691
+ "description": "[Full-projection-only] Specifies the job configuration."
692
+ },
693
+ "errorResult": {
694
+ "$ref": "ErrorProto",
695
+ "description": "A result object that will be present only if the job has failed."
696
+ },
697
+ "id": {
698
+ "type": "string",
699
+ "description": "Unique opaque ID of the job."
700
+ },
701
+ "jobReference": {
702
+ "$ref": "JobReference",
703
+ "description": "Job reference uniquely identifying the job."
704
+ },
705
+ "kind": {
706
+ "type": "string",
707
+ "description": "The resource type.",
708
+ "default": "bigquery#job"
709
+ },
710
+ "state": {
711
+ "type": "string",
712
+ "description": "Running state of the job. When the state is DONE, errorResult can be checked to determine whether the job succeeded or failed."
713
+ },
714
+ "statistics": {
715
+ "$ref": "JobStatistics",
716
+ "description": "[Output-only] Information about the job, including starting time and ending time of the job."
717
+ },
718
+ "status": {
719
+ "$ref": "JobStatus",
720
+ "description": "[Full-projection-only] Describes the state of the job."
721
+ },
722
+ "user_email": {
723
+ "type": "string",
724
+ "description": "[Full-projection-only] User who ran the job."
725
+ }
726
+ }
727
+ }
728
+ },
729
+ "kind": {
730
+ "type": "string",
731
+ "description": "The resource type of the response.",
732
+ "default": "bigquery#jobList"
733
+ },
734
+ "nextPageToken": {
735
+ "type": "string",
736
+ "description": "A token to request the next page of results."
737
+ },
738
+ "totalItems": {
739
+ "type": "integer",
740
+ "description": "Total number of jobs in this collection.",
741
+ "format": "int32"
742
+ }
743
+ }
744
+ },
745
+ "JobReference": {
746
+ "id": "JobReference",
747
+ "type": "object",
748
+ "properties": {
749
+ "jobId": {
750
+ "type": "string",
751
+ "description": "[Required] ID of the job.",
752
+ "annotations": {
753
+ "required": [
754
+ "bigquery.jobs.getQueryResults"
755
+ ]
756
+ }
757
+ },
758
+ "projectId": {
759
+ "type": "string",
760
+ "description": "[Required] Project ID being billed for the job.",
761
+ "annotations": {
762
+ "required": [
763
+ "bigquery.jobs.getQueryResults"
764
+ ]
765
+ }
766
+ }
767
+ }
768
+ },
769
+ "JobStatistics": {
770
+ "id": "JobStatistics",
771
+ "type": "object",
772
+ "properties": {
773
+ "creationTime": {
774
+ "type": "string",
775
+ "description": "[Output-only] Creation time of this job, in milliseconds since the epoch. This field will be present on all jobs.",
776
+ "format": "int64"
777
+ },
778
+ "endTime": {
779
+ "type": "string",
780
+ "description": "[Output-only] End time of this job, in milliseconds since the epoch. This field will be present whenever a job is in the DONE state.",
781
+ "format": "int64"
782
+ },
783
+ "load": {
784
+ "$ref": "JobStatistics3",
785
+ "description": "[Output-only] Statistics for a load job."
786
+ },
787
+ "query": {
788
+ "$ref": "JobStatistics2",
789
+ "description": "[Output-only] Statistics for a query job."
790
+ },
791
+ "startTime": {
792
+ "type": "string",
793
+ "description": "[Output-only] Start time of this job, in milliseconds since the epoch. This field will be present when the job transitions from the PENDING state to either RUNNING or DONE.",
794
+ "format": "int64"
795
+ },
796
+ "totalBytesProcessed": {
797
+ "type": "string",
798
+ "description": "[Output-only] [Deprecated] Use the bytes processed in the query statistics instead.",
799
+ "format": "int64"
800
+ }
801
+ }
802
+ },
803
+ "JobStatistics2": {
804
+ "id": "JobStatistics2",
805
+ "type": "object",
806
+ "properties": {
807
+ "cacheHit": {
808
+ "type": "boolean",
809
+ "description": "[Output-only] Whether the query result was fetched from the query cache."
810
+ },
811
+ "totalBytesProcessed": {
812
+ "type": "string",
813
+ "description": "[Output-only] Total bytes processed for this job.",
814
+ "format": "int64"
815
+ }
816
+ }
817
+ },
818
+ "JobStatistics3": {
819
+ "id": "JobStatistics3",
820
+ "type": "object",
821
+ "properties": {
822
+ "inputFileBytes": {
823
+ "type": "string",
824
+ "description": "[Output-only] Number of bytes of source data in a joad job.",
825
+ "format": "int64"
826
+ },
827
+ "inputFiles": {
828
+ "type": "string",
829
+ "description": "[Output-only] Number of source files in a load job.",
830
+ "format": "int64"
831
+ },
832
+ "outputBytes": {
833
+ "type": "string",
834
+ "description": "[Output-only] Size of the loaded data in bytes. Note that while an import job is in the running state, this value may change.",
835
+ "format": "int64"
836
+ },
837
+ "outputRows": {
838
+ "type": "string",
839
+ "description": "[Output-only] Number of rows imported in a load job. Note that while an import job is in the running state, this value may change.",
840
+ "format": "int64"
841
+ }
842
+ }
843
+ },
844
+ "JobStatus": {
845
+ "id": "JobStatus",
846
+ "type": "object",
847
+ "properties": {
848
+ "errorResult": {
849
+ "$ref": "ErrorProto",
850
+ "description": "[Output-only] Final error result of the job. If present, indicates that the job has completed and was unsuccessful."
851
+ },
852
+ "errors": {
853
+ "type": "array",
854
+ "description": "[Output-only] All errors encountered during the running of the job. Errors here do not necessarily mean that the job has completed or was unsuccessful.",
855
+ "items": {
856
+ "$ref": "ErrorProto"
857
+ }
858
+ },
859
+ "state": {
860
+ "type": "string",
861
+ "description": "[Output-only] Running state of the job."
862
+ }
863
+ }
864
+ },
865
+ "JsonObject": {
866
+ "id": "JsonObject",
867
+ "type": "object",
868
+ "description": "Represents a single JSON object.",
869
+ "additionalProperties": {
870
+ "$ref": "JsonValue"
871
+ }
872
+ },
873
+ "JsonValue": {
874
+ "id": "JsonValue",
875
+ "type": "any"
876
+ },
877
+ "ProjectList": {
878
+ "id": "ProjectList",
879
+ "type": "object",
880
+ "properties": {
881
+ "etag": {
882
+ "type": "string",
883
+ "description": "A hash of the page of results"
884
+ },
885
+ "kind": {
886
+ "type": "string",
887
+ "description": "The type of list.",
888
+ "default": "bigquery#projectList"
889
+ },
890
+ "nextPageToken": {
891
+ "type": "string",
892
+ "description": "A token to request the next page of results."
893
+ },
894
+ "projects": {
895
+ "type": "array",
896
+ "description": "Projects to which you have at least READ access.",
897
+ "items": {
898
+ "type": "object",
899
+ "properties": {
900
+ "friendlyName": {
901
+ "type": "string",
902
+ "description": "A descriptive name for this project."
903
+ },
904
+ "id": {
905
+ "type": "string",
906
+ "description": "An opaque ID of this project."
907
+ },
908
+ "kind": {
909
+ "type": "string",
910
+ "description": "The resource type.",
911
+ "default": "bigquery#project"
912
+ },
913
+ "numericId": {
914
+ "type": "string",
915
+ "description": "The numeric ID of this project.",
916
+ "format": "uint64"
917
+ },
918
+ "projectReference": {
919
+ "$ref": "ProjectReference",
920
+ "description": "A unique reference to this project."
921
+ }
922
+ }
923
+ }
924
+ },
925
+ "totalItems": {
926
+ "type": "integer",
927
+ "description": "The total number of projects in the list.",
928
+ "format": "int32"
929
+ }
930
+ }
931
+ },
932
+ "ProjectReference": {
933
+ "id": "ProjectReference",
934
+ "type": "object",
935
+ "properties": {
936
+ "projectId": {
937
+ "type": "string",
938
+ "description": "[Required] ID of the project. Can be either the numeric ID or the assigned ID of the project."
939
+ }
940
+ }
941
+ },
942
+ "QueryRequest": {
943
+ "id": "QueryRequest",
944
+ "type": "object",
945
+ "properties": {
946
+ "defaultDataset": {
947
+ "$ref": "DatasetReference",
948
+ "description": "[Optional] Specifies the default datasetId and projectId to assume for any unqualified table names in the query. If not set, all table names in the query string must be qualified in the format 'datasetId.tableId'."
949
+ },
950
+ "dryRun": {
951
+ "type": "boolean",
952
+ "description": "[Optional] If set, don't actually run the query. A valid query will return an empty response, while an invalid query will return the same error it would if it wasn't a dry run. The default value is false."
953
+ },
954
+ "kind": {
955
+ "type": "string",
956
+ "description": "The resource type of the request.",
957
+ "default": "bigquery#queryRequest"
958
+ },
959
+ "maxResults": {
960
+ "type": "integer",
961
+ "description": "[Optional] The maximum number of rows of data to return per page of results. Setting this flag to a small value such as 1000 and then paging through results might improve reliability when the query result set is large. In addition to this limit, responses are also limited to 10 MB. By default, there is no maximum row count, and only the byte limit applies.",
962
+ "format": "uint32"
963
+ },
964
+ "preserveNulls": {
965
+ "type": "boolean",
966
+ "description": "[Deprecated] If set to false, maps null values in the query response to the column's default value. Only specify if you have older code that can not handle null values in the query response. The default value is true. This flag is deprecated and will be ignored in a future version of BigQuery."
967
+ },
968
+ "query": {
969
+ "type": "string",
970
+ "description": "[Required] A query string, following the BigQuery query syntax, of the query to execute. Example: \"SELECT count(f1) FROM [myProjectId:myDatasetId.myTableId]\".",
971
+ "annotations": {
972
+ "required": [
973
+ "bigquery.jobs.query"
974
+ ]
975
+ }
976
+ },
977
+ "timeoutMs": {
978
+ "type": "integer",
979
+ "description": "[Optional] How long to wait for the query to complete, in milliseconds, before the request times out and returns. Note that this is only a timeout for the request, not the query. If the query takes longer to run than the timeout value, the call returns without any results and with the 'jobComplete' flag set to false. You can call GetQueryResults() to wait for the query to complete and read the results. The default value is 10000 milliseconds (10 seconds).",
980
+ "format": "uint32"
981
+ },
982
+ "useQueryCache": {
983
+ "type": "boolean",
984
+ "description": "[Optional] Whether to look for the result in the query cache. The query cache is a best-effort cache that will be flushed whenever tables in the query are modified. The default value is true."
985
+ }
986
+ }
987
+ },
988
+ "QueryResponse": {
989
+ "id": "QueryResponse",
990
+ "type": "object",
991
+ "properties": {
992
+ "cacheHit": {
993
+ "type": "boolean",
994
+ "description": "Whether the query result was fetched from the query cache."
995
+ },
996
+ "jobComplete": {
997
+ "type": "boolean",
998
+ "description": "Whether the query has completed or not. If rows or totalRows are present, this will always be true. If this is false, totalRows will not be available."
999
+ },
1000
+ "jobReference": {
1001
+ "$ref": "JobReference",
1002
+ "description": "Reference to the Job that was created to run the query. This field will be present even if the original request timed out, in which case GetQueryResults can be used to read the results once the query has completed. Since this API only returns the first page of results, subsequent pages can be fetched via the same mechanism (GetQueryResults)."
1003
+ },
1004
+ "kind": {
1005
+ "type": "string",
1006
+ "description": "The resource type.",
1007
+ "default": "bigquery#queryResponse"
1008
+ },
1009
+ "pageToken": {
1010
+ "type": "string",
1011
+ "description": "A token used for paging results."
1012
+ },
1013
+ "rows": {
1014
+ "type": "array",
1015
+ "description": "An object with as many results as can be contained within the maximum permitted reply size. To get any additional rows, you can call GetQueryResults and specify the jobReference returned above.",
1016
+ "items": {
1017
+ "$ref": "TableRow"
1018
+ }
1019
+ },
1020
+ "schema": {
1021
+ "$ref": "TableSchema",
1022
+ "description": "The schema of the results. Present only when the query completes successfully."
1023
+ },
1024
+ "totalBytesProcessed": {
1025
+ "type": "string",
1026
+ "description": "The total number of bytes processed for this query. If this query was a dry run, this is the number of bytes that would be processed if the query were run.",
1027
+ "format": "int64"
1028
+ },
1029
+ "totalRows": {
1030
+ "type": "string",
1031
+ "description": "The total number of rows in the complete query result set, which can be more than the number of rows in this single page of results.",
1032
+ "format": "uint64"
1033
+ }
1034
+ }
1035
+ },
1036
+ "Table": {
1037
+ "id": "Table",
1038
+ "type": "object",
1039
+ "properties": {
1040
+ "creationTime": {
1041
+ "type": "string",
1042
+ "description": "[Output-only] The time when this table was created, in milliseconds since the epoch.",
1043
+ "format": "int64"
1044
+ },
1045
+ "description": {
1046
+ "type": "string",
1047
+ "description": "[Optional] A user-friendly description of this table."
1048
+ },
1049
+ "etag": {
1050
+ "type": "string",
1051
+ "description": "[Output-only] A hash of this resource."
1052
+ },
1053
+ "expirationTime": {
1054
+ "type": "string",
1055
+ "description": "[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.",
1056
+ "format": "int64"
1057
+ },
1058
+ "friendlyName": {
1059
+ "type": "string",
1060
+ "description": "[Optional] A descriptive name for this table."
1061
+ },
1062
+ "id": {
1063
+ "type": "string",
1064
+ "description": "[Output-only] An opaque ID uniquely identifying the table."
1065
+ },
1066
+ "kind": {
1067
+ "type": "string",
1068
+ "description": "[Output-only] The type of the resource.",
1069
+ "default": "bigquery#table"
1070
+ },
1071
+ "lastModifiedTime": {
1072
+ "type": "string",
1073
+ "description": "[Output-only] The time when this table was last modified, in milliseconds since the epoch.",
1074
+ "format": "int64"
1075
+ },
1076
+ "numBytes": {
1077
+ "type": "string",
1078
+ "description": "[Output-only] The size of the table in bytes.",
1079
+ "format": "int64"
1080
+ },
1081
+ "numRows": {
1082
+ "type": "string",
1083
+ "description": "[Output-only] The number of rows of data in this table.",
1084
+ "format": "uint64"
1085
+ },
1086
+ "schema": {
1087
+ "$ref": "TableSchema",
1088
+ "description": "[Optional] Describes the schema of this table."
1089
+ },
1090
+ "selfLink": {
1091
+ "type": "string",
1092
+ "description": "[Output-only] A URL that can be used to access this resource again."
1093
+ },
1094
+ "tableReference": {
1095
+ "$ref": "TableReference",
1096
+ "description": "[Required] Reference describing the ID of this table."
1097
+ },
1098
+ "type": {
1099
+ "type": "string",
1100
+ "description": "[Output-only] Describes the type of this table. Possible values are TABLE, VIEW. - TABLE type indicates it is a normal BigQuery table. - VIEW type shares many of the properties of tables, but instead of storing data it is defined by a query. A view may have additional limitations."
1101
+ },
1102
+ "view": {
1103
+ "$ref": "ViewDefinition",
1104
+ "description": "[Experimental] Describes the view definition when table is of type view."
1105
+ }
1106
+ }
1107
+ },
1108
+ "TableCell": {
1109
+ "id": "TableCell",
1110
+ "type": "object",
1111
+ "description": "Represents a single cell in the result set. Users of the java client can detect whether their value result is null by calling 'com.google.api.client.util.Data.isNull(cell.getV())'.",
1112
+ "properties": {
1113
+ "v": {
1114
+ "type": "any"
1115
+ }
1116
+ }
1117
+ },
1118
+ "TableDataInsertAllRequest": {
1119
+ "id": "TableDataInsertAllRequest",
1120
+ "type": "object",
1121
+ "properties": {
1122
+ "kind": {
1123
+ "type": "string",
1124
+ "description": "The resource type of the response.",
1125
+ "default": "bigquery#tableDataInsertAllRequest"
1126
+ },
1127
+ "rows": {
1128
+ "type": "array",
1129
+ "description": "The rows to insert.",
1130
+ "items": {
1131
+ "type": "object",
1132
+ "properties": {
1133
+ "insertId": {
1134
+ "type": "string",
1135
+ "description": "[Optional] A unique ID for each row. BigQuery uses this property to detect duplicate insertion requests on a best-effort basis."
1136
+ },
1137
+ "json": {
1138
+ "$ref": "JsonObject",
1139
+ "description": "[Required] A JSON object that contains a row of data. The object's properties and values must match the destination table's schema."
1140
+ }
1141
+ }
1142
+ }
1143
+ }
1144
+ }
1145
+ },
1146
+ "TableDataInsertAllResponse": {
1147
+ "id": "TableDataInsertAllResponse",
1148
+ "type": "object",
1149
+ "properties": {
1150
+ "insertErrors": {
1151
+ "type": "array",
1152
+ "description": "An array of errors for rows that were not inserted.",
1153
+ "items": {
1154
+ "type": "object",
1155
+ "properties": {
1156
+ "errors": {
1157
+ "type": "array",
1158
+ "description": "Error information for the row indicated by the index property.",
1159
+ "items": {
1160
+ "$ref": "ErrorProto"
1161
+ }
1162
+ },
1163
+ "index": {
1164
+ "type": "integer",
1165
+ "description": "The index of the row that error applies to.",
1166
+ "format": "uint32"
1167
+ }
1168
+ }
1169
+ }
1170
+ },
1171
+ "kind": {
1172
+ "type": "string",
1173
+ "description": "The resource type of the response.",
1174
+ "default": "bigquery#tableDataInsertAllResponse"
1175
+ }
1176
+ }
1177
+ },
1178
+ "TableDataList": {
1179
+ "id": "TableDataList",
1180
+ "type": "object",
1181
+ "properties": {
1182
+ "etag": {
1183
+ "type": "string",
1184
+ "description": "A hash of this page of results."
1185
+ },
1186
+ "kind": {
1187
+ "type": "string",
1188
+ "description": "The resource type of the response.",
1189
+ "default": "bigquery#tableDataList"
1190
+ },
1191
+ "pageToken": {
1192
+ "type": "string",
1193
+ "description": "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."
1194
+ },
1195
+ "rows": {
1196
+ "type": "array",
1197
+ "description": "Rows of results.",
1198
+ "items": {
1199
+ "$ref": "TableRow"
1200
+ }
1201
+ },
1202
+ "totalRows": {
1203
+ "type": "string",
1204
+ "description": "The total number of rows in the complete table.",
1205
+ "format": "int64"
1206
+ }
1207
+ }
1208
+ },
1209
+ "TableFieldSchema": {
1210
+ "id": "TableFieldSchema",
1211
+ "type": "object",
1212
+ "properties": {
1213
+ "description": {
1214
+ "type": "string",
1215
+ "description": "[Optional] The field description."
1216
+ },
1217
+ "fields": {
1218
+ "type": "array",
1219
+ "description": "[Optional] Describes the nested schema fields if the type property is set to RECORD.",
1220
+ "items": {
1221
+ "$ref": "TableFieldSchema"
1222
+ }
1223
+ },
1224
+ "mode": {
1225
+ "type": "string",
1226
+ "description": "[Optional] The field mode. Possible values include NULLABLE, REQUIRED and REPEATED. The default value is NULLABLE."
1227
+ },
1228
+ "name": {
1229
+ "type": "string",
1230
+ "description": "[Required] The field name."
1231
+ },
1232
+ "type": {
1233
+ "type": "string",
1234
+ "description": "[Required] The field data type. Possible values include STRING, INTEGER, FLOAT, BOOLEAN, TIMESTAMP or RECORD (where RECORD indicates that the field contains a nested schema)."
1235
+ }
1236
+ }
1237
+ },
1238
+ "TableList": {
1239
+ "id": "TableList",
1240
+ "type": "object",
1241
+ "properties": {
1242
+ "etag": {
1243
+ "type": "string",
1244
+ "description": "A hash of this page of results."
1245
+ },
1246
+ "kind": {
1247
+ "type": "string",
1248
+ "description": "The type of list.",
1249
+ "default": "bigquery#tableList"
1250
+ },
1251
+ "nextPageToken": {
1252
+ "type": "string",
1253
+ "description": "A token to request the next page of results."
1254
+ },
1255
+ "tables": {
1256
+ "type": "array",
1257
+ "description": "Tables in the requested dataset.",
1258
+ "items": {
1259
+ "type": "object",
1260
+ "properties": {
1261
+ "friendlyName": {
1262
+ "type": "string",
1263
+ "description": "The user-friendly name for this table."
1264
+ },
1265
+ "id": {
1266
+ "type": "string",
1267
+ "description": "An opaque ID of the table"
1268
+ },
1269
+ "kind": {
1270
+ "type": "string",
1271
+ "description": "The resource type.",
1272
+ "default": "bigquery#table"
1273
+ },
1274
+ "tableReference": {
1275
+ "$ref": "TableReference",
1276
+ "description": "A reference uniquely identifying the table."
1277
+ },
1278
+ "type": {
1279
+ "type": "string",
1280
+ "description": "The type of table. Possible values are: TABLE, VIEW."
1281
+ }
1282
+ }
1283
+ }
1284
+ },
1285
+ "totalItems": {
1286
+ "type": "integer",
1287
+ "description": "The total number of tables in the dataset.",
1288
+ "format": "int32"
1289
+ }
1290
+ }
1291
+ },
1292
+ "TableReference": {
1293
+ "id": "TableReference",
1294
+ "type": "object",
1295
+ "properties": {
1296
+ "datasetId": {
1297
+ "type": "string",
1298
+ "description": "[Required] ID of the dataset containing the table.",
1299
+ "annotations": {
1300
+ "required": [
1301
+ "bigquery.tables.update"
1302
+ ]
1303
+ }
1304
+ },
1305
+ "projectId": {
1306
+ "type": "string",
1307
+ "description": "[Required] ID of the project billed for storage of the table.",
1308
+ "annotations": {
1309
+ "required": [
1310
+ "bigquery.tables.update"
1311
+ ]
1312
+ }
1313
+ },
1314
+ "tableId": {
1315
+ "type": "string",
1316
+ "description": "[Required] ID of the table.",
1317
+ "annotations": {
1318
+ "required": [
1319
+ "bigquery.tables.update"
1320
+ ]
1321
+ }
1322
+ }
1323
+ }
1324
+ },
1325
+ "TableRow": {
1326
+ "id": "TableRow",
1327
+ "type": "object",
1328
+ "description": "Represents a single row in the result set, consisting of one or more fields.",
1329
+ "properties": {
1330
+ "f": {
1331
+ "type": "array",
1332
+ "items": {
1333
+ "$ref": "TableCell"
1334
+ }
1335
+ }
1336
+ }
1337
+ },
1338
+ "TableSchema": {
1339
+ "id": "TableSchema",
1340
+ "type": "object",
1341
+ "properties": {
1342
+ "fields": {
1343
+ "type": "array",
1344
+ "description": "Describes the fields in a table.",
1345
+ "items": {
1346
+ "$ref": "TableFieldSchema"
1347
+ }
1348
+ }
1349
+ }
1350
+ },
1351
+ "ViewDefinition": {
1352
+ "id": "ViewDefinition",
1353
+ "type": "object",
1354
+ "properties": {
1355
+ "query": {
1356
+ "type": "string",
1357
+ "description": "[Required] SQL query that gets executed when this view is referenced (e.g. 'SELECT field1, field2 FROM [dataset.table]')"
1358
+ }
1359
+ }
1360
+ }
1361
+ },
1362
+ "resources": {
1363
+ "datasets": {
1364
+ "methods": {
1365
+ "delete": {
1366
+ "id": "bigquery.datasets.delete",
1367
+ "path": "projects/{projectId}/datasets/{datasetId}",
1368
+ "httpMethod": "DELETE",
1369
+ "description": "Deletes the dataset specified by the datasetId value. Before you can delete a dataset, you must delete all its tables, either manually or by specifying deleteContents. Immediately after deletion, you can create another dataset with the same name.",
1370
+ "parameters": {
1371
+ "datasetId": {
1372
+ "type": "string",
1373
+ "description": "Dataset ID of dataset being deleted",
1374
+ "required": true,
1375
+ "location": "path"
1376
+ },
1377
+ "deleteContents": {
1378
+ "type": "boolean",
1379
+ "description": "If True, delete all the tables in the dataset. If False and the dataset contains tables, the request will fail. Default is False",
1380
+ "location": "query"
1381
+ },
1382
+ "projectId": {
1383
+ "type": "string",
1384
+ "description": "Project ID of the dataset being deleted",
1385
+ "required": true,
1386
+ "location": "path"
1387
+ }
1388
+ },
1389
+ "parameterOrder": [
1390
+ "projectId",
1391
+ "datasetId"
1392
+ ],
1393
+ "scopes": [
1394
+ "https://www.googleapis.com/auth/bigquery",
1395
+ "https://www.googleapis.com/auth/cloud-platform"
1396
+ ]
1397
+ },
1398
+ "get": {
1399
+ "id": "bigquery.datasets.get",
1400
+ "path": "projects/{projectId}/datasets/{datasetId}",
1401
+ "httpMethod": "GET",
1402
+ "description": "Returns the dataset specified by datasetID.",
1403
+ "parameters": {
1404
+ "datasetId": {
1405
+ "type": "string",
1406
+ "description": "Dataset ID of the requested dataset",
1407
+ "required": true,
1408
+ "location": "path"
1409
+ },
1410
+ "projectId": {
1411
+ "type": "string",
1412
+ "description": "Project ID of the requested dataset",
1413
+ "required": true,
1414
+ "location": "path"
1415
+ }
1416
+ },
1417
+ "parameterOrder": [
1418
+ "projectId",
1419
+ "datasetId"
1420
+ ],
1421
+ "response": {
1422
+ "$ref": "Dataset"
1423
+ },
1424
+ "scopes": [
1425
+ "https://www.googleapis.com/auth/bigquery",
1426
+ "https://www.googleapis.com/auth/cloud-platform"
1427
+ ]
1428
+ },
1429
+ "insert": {
1430
+ "id": "bigquery.datasets.insert",
1431
+ "path": "projects/{projectId}/datasets",
1432
+ "httpMethod": "POST",
1433
+ "description": "Creates a new empty dataset.",
1434
+ "parameters": {
1435
+ "projectId": {
1436
+ "type": "string",
1437
+ "description": "Project ID of the new dataset",
1438
+ "required": true,
1439
+ "location": "path"
1440
+ }
1441
+ },
1442
+ "parameterOrder": [
1443
+ "projectId"
1444
+ ],
1445
+ "request": {
1446
+ "$ref": "Dataset"
1447
+ },
1448
+ "response": {
1449
+ "$ref": "Dataset"
1450
+ },
1451
+ "scopes": [
1452
+ "https://www.googleapis.com/auth/bigquery",
1453
+ "https://www.googleapis.com/auth/cloud-platform"
1454
+ ]
1455
+ },
1456
+ "list": {
1457
+ "id": "bigquery.datasets.list",
1458
+ "path": "projects/{projectId}/datasets",
1459
+ "httpMethod": "GET",
1460
+ "description": "Lists all the datasets in the specified project to which the caller has read access; however, a project owner can list (but not necessarily get) all datasets in his project.",
1461
+ "parameters": {
1462
+ "all": {
1463
+ "type": "boolean",
1464
+ "description": "Whether to list all datasets, including hidden ones",
1465
+ "location": "query"
1466
+ },
1467
+ "maxResults": {
1468
+ "type": "integer",
1469
+ "description": "The maximum number of results to return",
1470
+ "format": "uint32",
1471
+ "location": "query"
1472
+ },
1473
+ "pageToken": {
1474
+ "type": "string",
1475
+ "description": "Page token, returned by a previous call, to request the next page of results",
1476
+ "location": "query"
1477
+ },
1478
+ "projectId": {
1479
+ "type": "string",
1480
+ "description": "Project ID of the datasets to be listed",
1481
+ "required": true,
1482
+ "location": "path"
1483
+ }
1484
+ },
1485
+ "parameterOrder": [
1486
+ "projectId"
1487
+ ],
1488
+ "response": {
1489
+ "$ref": "DatasetList"
1490
+ },
1491
+ "scopes": [
1492
+ "https://www.googleapis.com/auth/bigquery",
1493
+ "https://www.googleapis.com/auth/cloud-platform"
1494
+ ]
1495
+ },
1496
+ "patch": {
1497
+ "id": "bigquery.datasets.patch",
1498
+ "path": "projects/{projectId}/datasets/{datasetId}",
1499
+ "httpMethod": "PATCH",
1500
+ "description": "Updates information in an existing dataset. The update method replaces the entire dataset resource, whereas the patch method only replaces fields that are provided in the submitted dataset resource. This method supports patch semantics.",
1501
+ "parameters": {
1502
+ "datasetId": {
1503
+ "type": "string",
1504
+ "description": "Dataset ID of the dataset being updated",
1505
+ "required": true,
1506
+ "location": "path"
1507
+ },
1508
+ "projectId": {
1509
+ "type": "string",
1510
+ "description": "Project ID of the dataset being updated",
1511
+ "required": true,
1512
+ "location": "path"
1513
+ }
1514
+ },
1515
+ "parameterOrder": [
1516
+ "projectId",
1517
+ "datasetId"
1518
+ ],
1519
+ "request": {
1520
+ "$ref": "Dataset"
1521
+ },
1522
+ "response": {
1523
+ "$ref": "Dataset"
1524
+ },
1525
+ "scopes": [
1526
+ "https://www.googleapis.com/auth/bigquery",
1527
+ "https://www.googleapis.com/auth/cloud-platform"
1528
+ ]
1529
+ },
1530
+ "update": {
1531
+ "id": "bigquery.datasets.update",
1532
+ "path": "projects/{projectId}/datasets/{datasetId}",
1533
+ "httpMethod": "PUT",
1534
+ "description": "Updates information in an existing dataset. The update method replaces the entire dataset resource, whereas the patch method only replaces fields that are provided in the submitted dataset resource.",
1535
+ "parameters": {
1536
+ "datasetId": {
1537
+ "type": "string",
1538
+ "description": "Dataset ID of the dataset being updated",
1539
+ "required": true,
1540
+ "location": "path"
1541
+ },
1542
+ "projectId": {
1543
+ "type": "string",
1544
+ "description": "Project ID of the dataset being updated",
1545
+ "required": true,
1546
+ "location": "path"
1547
+ }
1548
+ },
1549
+ "parameterOrder": [
1550
+ "projectId",
1551
+ "datasetId"
1552
+ ],
1553
+ "request": {
1554
+ "$ref": "Dataset"
1555
+ },
1556
+ "response": {
1557
+ "$ref": "Dataset"
1558
+ },
1559
+ "scopes": [
1560
+ "https://www.googleapis.com/auth/bigquery",
1561
+ "https://www.googleapis.com/auth/cloud-platform"
1562
+ ]
1563
+ }
1564
+ }
1565
+ },
1566
+ "jobs": {
1567
+ "methods": {
1568
+ "get": {
1569
+ "id": "bigquery.jobs.get",
1570
+ "path": "projects/{projectId}/jobs/{jobId}",
1571
+ "httpMethod": "GET",
1572
+ "description": "Retrieves the specified job by ID.",
1573
+ "parameters": {
1574
+ "jobId": {
1575
+ "type": "string",
1576
+ "description": "Job ID of the requested job",
1577
+ "required": true,
1578
+ "location": "path"
1579
+ },
1580
+ "projectId": {
1581
+ "type": "string",
1582
+ "description": "Project ID of the requested job",
1583
+ "required": true,
1584
+ "location": "path"
1585
+ }
1586
+ },
1587
+ "parameterOrder": [
1588
+ "projectId",
1589
+ "jobId"
1590
+ ],
1591
+ "response": {
1592
+ "$ref": "Job"
1593
+ },
1594
+ "scopes": [
1595
+ "https://www.googleapis.com/auth/bigquery",
1596
+ "https://www.googleapis.com/auth/cloud-platform"
1597
+ ]
1598
+ },
1599
+ "getQueryResults": {
1600
+ "id": "bigquery.jobs.getQueryResults",
1601
+ "path": "projects/{projectId}/queries/{jobId}",
1602
+ "httpMethod": "GET",
1603
+ "description": "Retrieves the results of a query job.",
1604
+ "parameters": {
1605
+ "jobId": {
1606
+ "type": "string",
1607
+ "description": "Job ID of the query job",
1608
+ "required": true,
1609
+ "location": "path"
1610
+ },
1611
+ "maxResults": {
1612
+ "type": "integer",
1613
+ "description": "Maximum number of results to read",
1614
+ "format": "uint32",
1615
+ "location": "query"
1616
+ },
1617
+ "pageToken": {
1618
+ "type": "string",
1619
+ "description": "Page token, returned by a previous call, to request the next page of results",
1620
+ "location": "query"
1621
+ },
1622
+ "projectId": {
1623
+ "type": "string",
1624
+ "description": "Project ID of the query job",
1625
+ "required": true,
1626
+ "location": "path"
1627
+ },
1628
+ "startIndex": {
1629
+ "type": "string",
1630
+ "description": "Zero-based index of the starting row",
1631
+ "format": "uint64",
1632
+ "location": "query"
1633
+ },
1634
+ "timeoutMs": {
1635
+ "type": "integer",
1636
+ "description": "How long to wait for the query to complete, in milliseconds, before returning. Default is to return immediately. If the timeout passes before the job completes, the request will fail with a TIMEOUT error",
1637
+ "format": "uint32",
1638
+ "location": "query"
1639
+ }
1640
+ },
1641
+ "parameterOrder": [
1642
+ "projectId",
1643
+ "jobId"
1644
+ ],
1645
+ "response": {
1646
+ "$ref": "GetQueryResultsResponse"
1647
+ },
1648
+ "scopes": [
1649
+ "https://www.googleapis.com/auth/bigquery",
1650
+ "https://www.googleapis.com/auth/cloud-platform"
1651
+ ]
1652
+ },
1653
+ "insert": {
1654
+ "id": "bigquery.jobs.insert",
1655
+ "path": "projects/{projectId}/jobs",
1656
+ "httpMethod": "POST",
1657
+ "description": "Starts a new asynchronous job.",
1658
+ "parameters": {
1659
+ "projectId": {
1660
+ "type": "string",
1661
+ "description": "Project ID of the project that will be billed for the job",
1662
+ "required": true,
1663
+ "location": "path"
1664
+ }
1665
+ },
1666
+ "parameterOrder": [
1667
+ "projectId"
1668
+ ],
1669
+ "request": {
1670
+ "$ref": "Job"
1671
+ },
1672
+ "response": {
1673
+ "$ref": "Job"
1674
+ },
1675
+ "scopes": [
1676
+ "https://www.googleapis.com/auth/bigquery",
1677
+ "https://www.googleapis.com/auth/cloud-platform",
1678
+ "https://www.googleapis.com/auth/devstorage.full_control",
1679
+ "https://www.googleapis.com/auth/devstorage.read_only",
1680
+ "https://www.googleapis.com/auth/devstorage.read_write"
1681
+ ],
1682
+ "supportsMediaUpload": true,
1683
+ "mediaUpload": {
1684
+ "accept": [
1685
+ "*/*"
1686
+ ],
1687
+ "protocols": {
1688
+ "simple": {
1689
+ "multipart": true,
1690
+ "path": "/upload/bigquery/v2/projects/{projectId}/jobs"
1691
+ },
1692
+ "resumable": {
1693
+ "multipart": true,
1694
+ "path": "/resumable/upload/bigquery/v2/projects/{projectId}/jobs"
1695
+ }
1696
+ }
1697
+ }
1698
+ },
1699
+ "list": {
1700
+ "id": "bigquery.jobs.list",
1701
+ "path": "projects/{projectId}/jobs",
1702
+ "httpMethod": "GET",
1703
+ "description": "Lists all the Jobs in the specified project that were started by the user.",
1704
+ "parameters": {
1705
+ "allUsers": {
1706
+ "type": "boolean",
1707
+ "description": "Whether to display jobs owned by all users in the project. Default false",
1708
+ "location": "query"
1709
+ },
1710
+ "maxResults": {
1711
+ "type": "integer",
1712
+ "description": "Maximum number of results to return",
1713
+ "format": "uint32",
1714
+ "location": "query"
1715
+ },
1716
+ "pageToken": {
1717
+ "type": "string",
1718
+ "description": "Page token, returned by a previous call, to request the next page of results",
1719
+ "location": "query"
1720
+ },
1721
+ "projectId": {
1722
+ "type": "string",
1723
+ "description": "Project ID of the jobs to list",
1724
+ "required": true,
1725
+ "location": "path"
1726
+ },
1727
+ "projection": {
1728
+ "type": "string",
1729
+ "description": "Restrict information returned to a set of selected fields",
1730
+ "enum": [
1731
+ "full",
1732
+ "minimal"
1733
+ ],
1734
+ "enumDescriptions": [
1735
+ "Includes all job data",
1736
+ "Does not include the job configuration"
1737
+ ],
1738
+ "location": "query"
1739
+ },
1740
+ "stateFilter": {
1741
+ "type": "string",
1742
+ "description": "Filter for job state",
1743
+ "enum": [
1744
+ "done",
1745
+ "pending",
1746
+ "running"
1747
+ ],
1748
+ "enumDescriptions": [
1749
+ "Finished jobs",
1750
+ "Pending jobs",
1751
+ "Running jobs"
1752
+ ],
1753
+ "repeated": true,
1754
+ "location": "query"
1755
+ }
1756
+ },
1757
+ "parameterOrder": [
1758
+ "projectId"
1759
+ ],
1760
+ "response": {
1761
+ "$ref": "JobList"
1762
+ },
1763
+ "scopes": [
1764
+ "https://www.googleapis.com/auth/bigquery",
1765
+ "https://www.googleapis.com/auth/cloud-platform"
1766
+ ]
1767
+ },
1768
+ "query": {
1769
+ "id": "bigquery.jobs.query",
1770
+ "path": "projects/{projectId}/queries",
1771
+ "httpMethod": "POST",
1772
+ "description": "Runs a BigQuery SQL query synchronously and returns query results if the query completes within a specified timeout.",
1773
+ "parameters": {
1774
+ "projectId": {
1775
+ "type": "string",
1776
+ "description": "Project ID of the project billed for the query",
1777
+ "required": true,
1778
+ "location": "path"
1779
+ }
1780
+ },
1781
+ "parameterOrder": [
1782
+ "projectId"
1783
+ ],
1784
+ "request": {
1785
+ "$ref": "QueryRequest"
1786
+ },
1787
+ "response": {
1788
+ "$ref": "QueryResponse"
1789
+ },
1790
+ "scopes": [
1791
+ "https://www.googleapis.com/auth/bigquery",
1792
+ "https://www.googleapis.com/auth/cloud-platform"
1793
+ ]
1794
+ }
1795
+ }
1796
+ },
1797
+ "projects": {
1798
+ "methods": {
1799
+ "list": {
1800
+ "id": "bigquery.projects.list",
1801
+ "path": "projects",
1802
+ "httpMethod": "GET",
1803
+ "description": "Lists the projects to which you have at least read access.",
1804
+ "parameters": {
1805
+ "maxResults": {
1806
+ "type": "integer",
1807
+ "description": "Maximum number of results to return",
1808
+ "format": "uint32",
1809
+ "location": "query"
1810
+ },
1811
+ "pageToken": {
1812
+ "type": "string",
1813
+ "description": "Page token, returned by a previous call, to request the next page of results",
1814
+ "location": "query"
1815
+ }
1816
+ },
1817
+ "response": {
1818
+ "$ref": "ProjectList"
1819
+ },
1820
+ "scopes": [
1821
+ "https://www.googleapis.com/auth/bigquery",
1822
+ "https://www.googleapis.com/auth/cloud-platform"
1823
+ ]
1824
+ }
1825
+ }
1826
+ },
1827
+ "tabledata": {
1828
+ "methods": {
1829
+ "insertAll": {
1830
+ "id": "bigquery.tabledata.insertAll",
1831
+ "path": "projects/{projectId}/datasets/{datasetId}/tables/{tableId}/insertAll",
1832
+ "httpMethod": "POST",
1833
+ "description": "Inserts the supplied rows into the table.",
1834
+ "parameters": {
1835
+ "datasetId": {
1836
+ "type": "string",
1837
+ "description": "Dataset ID of the destination table.",
1838
+ "required": true,
1839
+ "location": "path"
1840
+ },
1841
+ "projectId": {
1842
+ "type": "string",
1843
+ "description": "Project ID of the destination table.",
1844
+ "required": true,
1845
+ "location": "path"
1846
+ },
1847
+ "tableId": {
1848
+ "type": "string",
1849
+ "description": "Table ID of the destination table.",
1850
+ "required": true,
1851
+ "location": "path"
1852
+ }
1853
+ },
1854
+ "parameterOrder": [
1855
+ "projectId",
1856
+ "datasetId",
1857
+ "tableId"
1858
+ ],
1859
+ "request": {
1860
+ "$ref": "TableDataInsertAllRequest"
1861
+ },
1862
+ "response": {
1863
+ "$ref": "TableDataInsertAllResponse"
1864
+ },
1865
+ "scopes": [
1866
+ "https://www.googleapis.com/auth/bigquery",
1867
+ "https://www.googleapis.com/auth/cloud-platform"
1868
+ ]
1869
+ },
1870
+ "list": {
1871
+ "id": "bigquery.tabledata.list",
1872
+ "path": "projects/{projectId}/datasets/{datasetId}/tables/{tableId}/data",
1873
+ "httpMethod": "GET",
1874
+ "description": "Retrieves table data from a specified set of rows.",
1875
+ "parameters": {
1876
+ "datasetId": {
1877
+ "type": "string",
1878
+ "description": "Dataset ID of the table to read",
1879
+ "required": true,
1880
+ "location": "path"
1881
+ },
1882
+ "maxResults": {
1883
+ "type": "integer",
1884
+ "description": "Maximum number of results to return",
1885
+ "format": "uint32",
1886
+ "location": "query"
1887
+ },
1888
+ "pageToken": {
1889
+ "type": "string",
1890
+ "description": "Page token, returned by a previous call, identifying the result set",
1891
+ "location": "query"
1892
+ },
1893
+ "projectId": {
1894
+ "type": "string",
1895
+ "description": "Project ID of the table to read",
1896
+ "required": true,
1897
+ "location": "path"
1898
+ },
1899
+ "startIndex": {
1900
+ "type": "string",
1901
+ "description": "Zero-based index of the starting row to read",
1902
+ "format": "uint64",
1903
+ "location": "query"
1904
+ },
1905
+ "tableId": {
1906
+ "type": "string",
1907
+ "description": "Table ID of the table to read",
1908
+ "required": true,
1909
+ "location": "path"
1910
+ }
1911
+ },
1912
+ "parameterOrder": [
1913
+ "projectId",
1914
+ "datasetId",
1915
+ "tableId"
1916
+ ],
1917
+ "response": {
1918
+ "$ref": "TableDataList"
1919
+ },
1920
+ "scopes": [
1921
+ "https://www.googleapis.com/auth/bigquery",
1922
+ "https://www.googleapis.com/auth/cloud-platform"
1923
+ ]
1924
+ }
1925
+ }
1926
+ },
1927
+ "tables": {
1928
+ "methods": {
1929
+ "delete": {
1930
+ "id": "bigquery.tables.delete",
1931
+ "path": "projects/{projectId}/datasets/{datasetId}/tables/{tableId}",
1932
+ "httpMethod": "DELETE",
1933
+ "description": "Deletes the table specified by tableId from the dataset. If the table contains data, all the data will be deleted.",
1934
+ "parameters": {
1935
+ "datasetId": {
1936
+ "type": "string",
1937
+ "description": "Dataset ID of the table to delete",
1938
+ "required": true,
1939
+ "location": "path"
1940
+ },
1941
+ "projectId": {
1942
+ "type": "string",
1943
+ "description": "Project ID of the table to delete",
1944
+ "required": true,
1945
+ "location": "path"
1946
+ },
1947
+ "tableId": {
1948
+ "type": "string",
1949
+ "description": "Table ID of the table to delete",
1950
+ "required": true,
1951
+ "location": "path"
1952
+ }
1953
+ },
1954
+ "parameterOrder": [
1955
+ "projectId",
1956
+ "datasetId",
1957
+ "tableId"
1958
+ ],
1959
+ "scopes": [
1960
+ "https://www.googleapis.com/auth/bigquery",
1961
+ "https://www.googleapis.com/auth/cloud-platform"
1962
+ ]
1963
+ },
1964
+ "get": {
1965
+ "id": "bigquery.tables.get",
1966
+ "path": "projects/{projectId}/datasets/{datasetId}/tables/{tableId}",
1967
+ "httpMethod": "GET",
1968
+ "description": "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.",
1969
+ "parameters": {
1970
+ "datasetId": {
1971
+ "type": "string",
1972
+ "description": "Dataset ID of the requested table",
1973
+ "required": true,
1974
+ "location": "path"
1975
+ },
1976
+ "projectId": {
1977
+ "type": "string",
1978
+ "description": "Project ID of the requested table",
1979
+ "required": true,
1980
+ "location": "path"
1981
+ },
1982
+ "tableId": {
1983
+ "type": "string",
1984
+ "description": "Table ID of the requested table",
1985
+ "required": true,
1986
+ "location": "path"
1987
+ }
1988
+ },
1989
+ "parameterOrder": [
1990
+ "projectId",
1991
+ "datasetId",
1992
+ "tableId"
1993
+ ],
1994
+ "response": {
1995
+ "$ref": "Table"
1996
+ },
1997
+ "scopes": [
1998
+ "https://www.googleapis.com/auth/bigquery",
1999
+ "https://www.googleapis.com/auth/cloud-platform"
2000
+ ]
2001
+ },
2002
+ "insert": {
2003
+ "id": "bigquery.tables.insert",
2004
+ "path": "projects/{projectId}/datasets/{datasetId}/tables",
2005
+ "httpMethod": "POST",
2006
+ "description": "Creates a new, empty table in the dataset.",
2007
+ "parameters": {
2008
+ "datasetId": {
2009
+ "type": "string",
2010
+ "description": "Dataset ID of the new table",
2011
+ "required": true,
2012
+ "location": "path"
2013
+ },
2014
+ "projectId": {
2015
+ "type": "string",
2016
+ "description": "Project ID of the new table",
2017
+ "required": true,
2018
+ "location": "path"
2019
+ }
2020
+ },
2021
+ "parameterOrder": [
2022
+ "projectId",
2023
+ "datasetId"
2024
+ ],
2025
+ "request": {
2026
+ "$ref": "Table"
2027
+ },
2028
+ "response": {
2029
+ "$ref": "Table"
2030
+ },
2031
+ "scopes": [
2032
+ "https://www.googleapis.com/auth/bigquery",
2033
+ "https://www.googleapis.com/auth/cloud-platform"
2034
+ ]
2035
+ },
2036
+ "list": {
2037
+ "id": "bigquery.tables.list",
2038
+ "path": "projects/{projectId}/datasets/{datasetId}/tables",
2039
+ "httpMethod": "GET",
2040
+ "description": "Lists all tables in the specified dataset.",
2041
+ "parameters": {
2042
+ "datasetId": {
2043
+ "type": "string",
2044
+ "description": "Dataset ID of the tables to list",
2045
+ "required": true,
2046
+ "location": "path"
2047
+ },
2048
+ "maxResults": {
2049
+ "type": "integer",
2050
+ "description": "Maximum number of results to return",
2051
+ "format": "uint32",
2052
+ "location": "query"
2053
+ },
2054
+ "pageToken": {
2055
+ "type": "string",
2056
+ "description": "Page token, returned by a previous call, to request the next page of results",
2057
+ "location": "query"
2058
+ },
2059
+ "projectId": {
2060
+ "type": "string",
2061
+ "description": "Project ID of the tables to list",
2062
+ "required": true,
2063
+ "location": "path"
2064
+ }
2065
+ },
2066
+ "parameterOrder": [
2067
+ "projectId",
2068
+ "datasetId"
2069
+ ],
2070
+ "response": {
2071
+ "$ref": "TableList"
2072
+ },
2073
+ "scopes": [
2074
+ "https://www.googleapis.com/auth/bigquery",
2075
+ "https://www.googleapis.com/auth/cloud-platform"
2076
+ ]
2077
+ },
2078
+ "patch": {
2079
+ "id": "bigquery.tables.patch",
2080
+ "path": "projects/{projectId}/datasets/{datasetId}/tables/{tableId}",
2081
+ "httpMethod": "PATCH",
2082
+ "description": "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.",
2083
+ "parameters": {
2084
+ "datasetId": {
2085
+ "type": "string",
2086
+ "description": "Dataset ID of the table to update",
2087
+ "required": true,
2088
+ "location": "path"
2089
+ },
2090
+ "projectId": {
2091
+ "type": "string",
2092
+ "description": "Project ID of the table to update",
2093
+ "required": true,
2094
+ "location": "path"
2095
+ },
2096
+ "tableId": {
2097
+ "type": "string",
2098
+ "description": "Table ID of the table to update",
2099
+ "required": true,
2100
+ "location": "path"
2101
+ }
2102
+ },
2103
+ "parameterOrder": [
2104
+ "projectId",
2105
+ "datasetId",
2106
+ "tableId"
2107
+ ],
2108
+ "request": {
2109
+ "$ref": "Table"
2110
+ },
2111
+ "response": {
2112
+ "$ref": "Table"
2113
+ },
2114
+ "scopes": [
2115
+ "https://www.googleapis.com/auth/bigquery",
2116
+ "https://www.googleapis.com/auth/cloud-platform"
2117
+ ]
2118
+ },
2119
+ "update": {
2120
+ "id": "bigquery.tables.update",
2121
+ "path": "projects/{projectId}/datasets/{datasetId}/tables/{tableId}",
2122
+ "httpMethod": "PUT",
2123
+ "description": "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.",
2124
+ "parameters": {
2125
+ "datasetId": {
2126
+ "type": "string",
2127
+ "description": "Dataset ID of the table to update",
2128
+ "required": true,
2129
+ "location": "path"
2130
+ },
2131
+ "projectId": {
2132
+ "type": "string",
2133
+ "description": "Project ID of the table to update",
2134
+ "required": true,
2135
+ "location": "path"
2136
+ },
2137
+ "tableId": {
2138
+ "type": "string",
2139
+ "description": "Table ID of the table to update",
2140
+ "required": true,
2141
+ "location": "path"
2142
+ }
2143
+ },
2144
+ "parameterOrder": [
2145
+ "projectId",
2146
+ "datasetId",
2147
+ "tableId"
2148
+ ],
2149
+ "request": {
2150
+ "$ref": "Table"
2151
+ },
2152
+ "response": {
2153
+ "$ref": "Table"
2154
+ },
2155
+ "scopes": [
2156
+ "https://www.googleapis.com/auth/bigquery",
2157
+ "https://www.googleapis.com/auth/cloud-platform"
2158
+ ]
2159
+ }
2160
+ }
2161
+ }
2162
+ }
2163
+ }
2164
+ http_version:
2165
+ recorded_at: Wed, 26 Feb 2014 01:07:29 GMT
2166
+ recorded_with: VCR 2.8.0