google-cloud-bigquery 1.19.0 → 1.22.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +42 -0
- data/TROUBLESHOOTING.md +2 -8
- data/lib/google-cloud-bigquery.rb +8 -2
- data/lib/google/cloud/bigquery/convert.rb +3 -1
- data/lib/google/cloud/bigquery/copy_job.rb +15 -6
- data/lib/google/cloud/bigquery/data.rb +12 -0
- data/lib/google/cloud/bigquery/dataset.rb +119 -28
- data/lib/google/cloud/bigquery/external.rb +24 -0
- data/lib/google/cloud/bigquery/extract_job.rb +153 -45
- data/lib/google/cloud/bigquery/job.rb +198 -0
- data/lib/google/cloud/bigquery/load_job.rb +271 -32
- data/lib/google/cloud/bigquery/model.rb +164 -8
- data/lib/google/cloud/bigquery/project.rb +242 -84
- data/lib/google/cloud/bigquery/query_job.rb +277 -6
- data/lib/google/cloud/bigquery/schema.rb +2 -2
- data/lib/google/cloud/bigquery/service.rb +16 -12
- data/lib/google/cloud/bigquery/table.rb +371 -83
- data/lib/google/cloud/bigquery/time.rb +6 -0
- data/lib/google/cloud/bigquery/version.rb +1 -1
- metadata +7 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5fadedabb79035a0b983765731a3aee2af5ca5480671e4255e8644cfb6e8c68c
|
4
|
+
data.tar.gz: 9ae351ed3987f2a81e8d9046c88ab776e3ac39f37cac5c6961fa3c2daf33b8bb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: eec1a19be0af9113a94183b9c0eeaa4edf1e08b177be10c449396541d8c6970e4ec666f3fbbb0613107989afc078799beb44655e085f360e3c97846e797bba15
|
7
|
+
data.tar.gz: 5f89e947e34384131026fdafd0bdd05f05ed742f6a52b4c18ae0da83f433da2f2f090a924ff82bdf480b79eac9267b923732144a0b32773e12e8b3b846b61a28
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,47 @@
|
|
1
1
|
# Release History
|
2
2
|
|
3
|
+
### 1.22.0 / 2020-09-10
|
4
|
+
|
5
|
+
#### Features
|
6
|
+
|
7
|
+
* Add support for ML model export
|
8
|
+
* Add model support to Project#extract and #extract_job
|
9
|
+
* Add ExtractJob#model?
|
10
|
+
* Add ExtractJob#ml_tf_saved_model?
|
11
|
+
* Add ExtractJob#ml_xgboost_booster?
|
12
|
+
* Add Model#extract and #extract_job
|
13
|
+
|
14
|
+
### 1.21.2 / 2020-07-21
|
15
|
+
|
16
|
+
#### Documentation
|
17
|
+
|
18
|
+
* Update Data#each samples
|
19
|
+
|
20
|
+
### 1.21.1 / 2020-05-28
|
21
|
+
|
22
|
+
#### Documentation
|
23
|
+
|
24
|
+
* Fix a few broken links
|
25
|
+
|
26
|
+
### 1.21.0 / 2020-03-31
|
27
|
+
|
28
|
+
#### Features
|
29
|
+
|
30
|
+
* Add Job#parent_job_id and Job#script_statistics
|
31
|
+
* Add parent_job to Project#jobs
|
32
|
+
* Add Job#num_child_jobs
|
33
|
+
* Add Job#parent_job_id
|
34
|
+
* Add Job#script_statistics
|
35
|
+
|
36
|
+
### 1.20.0 / 2020-03-11
|
37
|
+
|
38
|
+
#### Features
|
39
|
+
|
40
|
+
* Add Range Partitioning
|
41
|
+
* Add range partitioning methods to Table and Table::Updater
|
42
|
+
* Add range partitioning methods to LoadJob
|
43
|
+
* Add range partitioning methods to QueryJob
|
44
|
+
|
3
45
|
### 1.19.0 / 2020-02-11
|
4
46
|
|
5
47
|
#### Features
|
data/TROUBLESHOOTING.md
CHANGED
@@ -24,14 +24,8 @@ improved, *please* create a new issue on GitHub so we can talk about it.
|
|
24
24
|
|
25
25
|
- [New issue][gh-ruby]
|
26
26
|
|
27
|
-
Or, you can ask questions on the [Google Cloud Platform Slack][slack-ruby]. You
|
28
|
-
can use the "ruby" channel for general Ruby questions, or use the
|
29
|
-
"google-cloud-ruby" channel if you have questions about this gem in particular.
|
30
|
-
|
31
27
|
[so-ruby]: http://stackoverflow.com/questions/tagged/google-cloud-platform+ruby+bigquery
|
32
28
|
|
33
|
-
[gh-search-ruby]: https://github.com/
|
34
|
-
|
35
|
-
[gh-ruby]: https://github.com/googlecloudplatform/google-cloud-ruby/issues/new
|
29
|
+
[gh-search-ruby]: https://github.com/googleapis/google-cloud-ruby/issues?q=label%3A%22api%3A+bigquery%22
|
36
30
|
|
37
|
-
[
|
31
|
+
[gh-ruby]: https://github.com/googleapis/google-cloud-ruby/issues/new
|
@@ -53,9 +53,15 @@ module Google
|
|
53
53
|
# bigquery = gcloud.bigquery
|
54
54
|
# dataset = bigquery.dataset "my_dataset"
|
55
55
|
# table = dataset.table "my_table"
|
56
|
-
#
|
57
|
-
#
|
56
|
+
#
|
57
|
+
# data = table.data
|
58
|
+
#
|
59
|
+
# # Iterate over the first page of results
|
60
|
+
# data.each do |row|
|
61
|
+
# puts row[:name]
|
58
62
|
# end
|
63
|
+
# # Retrieve the next page of results
|
64
|
+
# data = data.next if data.next?
|
59
65
|
#
|
60
66
|
# @example The default scope can be overridden with the `scope` option:
|
61
67
|
# require "google/cloud"
|
@@ -318,7 +318,9 @@ module Google
|
|
318
318
|
"parquet" => "PARQUET",
|
319
319
|
"datastore" => "DATASTORE_BACKUP",
|
320
320
|
"backup" => "DATASTORE_BACKUP",
|
321
|
-
"datastore_backup" => "DATASTORE_BACKUP"
|
321
|
+
"datastore_backup" => "DATASTORE_BACKUP",
|
322
|
+
"ml_tf_saved_model" => "ML_TF_SAVED_MODEL",
|
323
|
+
"ml_xgboost_booster" => "ML_XGBOOST_BOOSTER"
|
322
324
|
}[format.to_s.downcase]
|
323
325
|
return val unless val.nil?
|
324
326
|
format
|
@@ -272,12 +272,21 @@ module Google
|
|
272
272
|
# Sets the labels to use for the job.
|
273
273
|
#
|
274
274
|
# @param [Hash] value A hash of user-provided labels associated with
|
275
|
-
# the job. You can use these to organize and group your jobs.
|
276
|
-
#
|
277
|
-
#
|
278
|
-
#
|
279
|
-
#
|
280
|
-
#
|
275
|
+
# the job. You can use these to organize and group your jobs.
|
276
|
+
#
|
277
|
+
# The labels applied to a resource must meet the following requirements:
|
278
|
+
#
|
279
|
+
# * Each resource can have multiple labels, up to a maximum of 64.
|
280
|
+
# * Each label must be a key-value pair.
|
281
|
+
# * Keys have a minimum length of 1 character and a maximum length of
|
282
|
+
# 63 characters, and cannot be empty. Values can be empty, and have
|
283
|
+
# a maximum length of 63 characters.
|
284
|
+
# * Keys and values can contain only lowercase letters, numeric characters,
|
285
|
+
# underscores, and dashes. All characters must use UTF-8 encoding, and
|
286
|
+
# international characters are allowed.
|
287
|
+
# * The key portion of a label must be unique. However, you can use the
|
288
|
+
# same key with multiple resources.
|
289
|
+
# * Keys must start with a lowercase letter or international character.
|
281
290
|
#
|
282
291
|
# @!group Attributes
|
283
292
|
def labels= value
|
@@ -41,9 +41,12 @@ module Google
|
|
41
41
|
#
|
42
42
|
# data.count # 100000
|
43
43
|
# data.total # 164656
|
44
|
+
#
|
45
|
+
# # Iterate over the first page of results
|
44
46
|
# data.each do |row|
|
45
47
|
# puts row[:word]
|
46
48
|
# end
|
49
|
+
# # Retrieve the next page of results
|
47
50
|
# data = data.next if data.next?
|
48
51
|
#
|
49
52
|
class Data < DelegateClass(::Array)
|
@@ -117,9 +120,12 @@ module Google
|
|
117
120
|
#
|
118
121
|
# data.count # 100000
|
119
122
|
# data.total # 164656
|
123
|
+
#
|
124
|
+
# # Iterate over the first page of results
|
120
125
|
# data.each do |row|
|
121
126
|
# puts row[:word]
|
122
127
|
# end
|
128
|
+
# # Retrieve the next page of results
|
123
129
|
# data = data.next if data.next?
|
124
130
|
#
|
125
131
|
def total
|
@@ -375,9 +381,12 @@ module Google
|
|
375
381
|
#
|
376
382
|
# data.count # 100000
|
377
383
|
# data.total # 164656
|
384
|
+
#
|
385
|
+
# # Iterate over the first page of results
|
378
386
|
# data.each do |row|
|
379
387
|
# puts row[:word]
|
380
388
|
# end
|
389
|
+
# # Retrieve the next page of results
|
381
390
|
# data = data.next if data.next?
|
382
391
|
#
|
383
392
|
def next?
|
@@ -402,9 +411,12 @@ module Google
|
|
402
411
|
#
|
403
412
|
# data.count # 100000
|
404
413
|
# data.total # 164656
|
414
|
+
#
|
415
|
+
# # Iterate over the first page of results
|
405
416
|
# data.each do |row|
|
406
417
|
# puts row[:word]
|
407
418
|
# end
|
419
|
+
# # Retrieve the next page of results
|
408
420
|
# data = data.next if data.next?
|
409
421
|
#
|
410
422
|
def next
|
@@ -313,12 +313,19 @@ module Google
|
|
313
313
|
# @param [Hash<String, String>] labels A hash containing key/value
|
314
314
|
# pairs.
|
315
315
|
#
|
316
|
-
#
|
317
|
-
#
|
318
|
-
#
|
319
|
-
# *
|
320
|
-
# *
|
321
|
-
#
|
316
|
+
# The labels applied to a resource must meet the following requirements:
|
317
|
+
#
|
318
|
+
# * Each resource can have multiple labels, up to a maximum of 64.
|
319
|
+
# * Each label must be a key-value pair.
|
320
|
+
# * Keys have a minimum length of 1 character and a maximum length of
|
321
|
+
# 63 characters, and cannot be empty. Values can be empty, and have
|
322
|
+
# a maximum length of 63 characters.
|
323
|
+
# * Keys and values can contain only lowercase letters, numeric characters,
|
324
|
+
# underscores, and dashes. All characters must use UTF-8 encoding, and
|
325
|
+
# international characters are allowed.
|
326
|
+
# * The key portion of a label must be unique. However, you can use the
|
327
|
+
# same key with multiple resources.
|
328
|
+
# * Keys must start with a lowercase letter or international character.
|
322
329
|
#
|
323
330
|
# @example
|
324
331
|
# require "google/cloud/bigquery"
|
@@ -555,6 +562,40 @@ module Google
|
|
555
562
|
# end
|
556
563
|
# end
|
557
564
|
#
|
565
|
+
# @example With time partitioning and clustering.
|
566
|
+
# require "google/cloud/bigquery"
|
567
|
+
#
|
568
|
+
# bigquery = Google::Cloud::Bigquery.new
|
569
|
+
# dataset = bigquery.dataset "my_dataset"
|
570
|
+
#
|
571
|
+
# table = dataset.create_table "my_table" do |t|
|
572
|
+
# t.schema do |schema|
|
573
|
+
# schema.timestamp "dob", mode: :required
|
574
|
+
# schema.string "first_name", mode: :required
|
575
|
+
# schema.string "last_name", mode: :required
|
576
|
+
# end
|
577
|
+
# t.time_partitioning_type = "DAY"
|
578
|
+
# t.time_partitioning_field = "dob"
|
579
|
+
# t.clustering_fields = ["last_name", "first_name"]
|
580
|
+
# end
|
581
|
+
#
|
582
|
+
# @example With range partitioning.
|
583
|
+
# require "google/cloud/bigquery"
|
584
|
+
#
|
585
|
+
# bigquery = Google::Cloud::Bigquery.new
|
586
|
+
# dataset = bigquery.dataset "my_dataset"
|
587
|
+
#
|
588
|
+
# table = dataset.create_table "my_table" do |t|
|
589
|
+
# t.schema do |schema|
|
590
|
+
# schema.integer "my_table_id", mode: :required
|
591
|
+
# schema.string "my_table_data", mode: :required
|
592
|
+
# end
|
593
|
+
# t.range_partitioning_field = "my_table_id"
|
594
|
+
# t.range_partitioning_start = 0
|
595
|
+
# t.range_partitioning_interval = 10
|
596
|
+
# t.range_partitioning_end = 100
|
597
|
+
# end
|
598
|
+
#
|
558
599
|
# @!group Table
|
559
600
|
#
|
560
601
|
def create_table table_id, name: nil, description: nil
|
@@ -602,12 +643,20 @@ module Google
|
|
602
643
|
# SQL](https://cloud.google.com/bigquery/docs/reference/legacy-sql)
|
603
644
|
# dialect. Optional. The default value is false.
|
604
645
|
# @param [Array<String>, String] udfs User-defined function resources
|
605
|
-
# used in
|
606
|
-
# Google Cloud Storage URI (`gs://bucket/path`), or an inline resource
|
646
|
+
# used in a legacy SQL query. May be either a code resource to load from
|
647
|
+
# a Google Cloud Storage URI (`gs://bucket/path`), or an inline resource
|
607
648
|
# that contains code for a user-defined function (UDF). Providing an
|
608
649
|
# inline code resource is equivalent to providing a URI for a file
|
609
|
-
# containing the same code.
|
610
|
-
#
|
650
|
+
# containing the same code.
|
651
|
+
#
|
652
|
+
# This parameter is used for defining User Defined Function (UDF)
|
653
|
+
# resources only when using legacy SQL. Users of standard SQL should
|
654
|
+
# leverage either DDL (e.g. `CREATE [TEMPORARY] FUNCTION ...`) or the
|
655
|
+
# Routines API to define UDF resources.
|
656
|
+
#
|
657
|
+
# For additional information on migrating, see: [Migrating to
|
658
|
+
# standard SQL - Differences in user-defined JavaScript
|
659
|
+
# functions](https://cloud.google.com/bigquery/docs/reference/standard-sql/migrating-from-legacy-sql#differences_in_user-defined_javascript_functions)
|
611
660
|
#
|
612
661
|
# @return [Google::Cloud::Bigquery::Table] A new table object.
|
613
662
|
#
|
@@ -1129,20 +1178,36 @@ module Google
|
|
1129
1178
|
# is 1,024 characters. If `job_id` is provided, then `prefix` will not
|
1130
1179
|
# be used.
|
1131
1180
|
# @param [Hash] labels A hash of user-provided labels associated with
|
1132
|
-
# the job. You can use these to organize and group your jobs.
|
1133
|
-
#
|
1134
|
-
#
|
1135
|
-
#
|
1136
|
-
#
|
1137
|
-
#
|
1138
|
-
#
|
1181
|
+
# the job. You can use these to organize and group your jobs.
|
1182
|
+
#
|
1183
|
+
# The labels applied to a resource must meet the following requirements:
|
1184
|
+
#
|
1185
|
+
# * Each resource can have multiple labels, up to a maximum of 64.
|
1186
|
+
# * Each label must be a key-value pair.
|
1187
|
+
# * Keys have a minimum length of 1 character and a maximum length of
|
1188
|
+
# 63 characters, and cannot be empty. Values can be empty, and have
|
1189
|
+
# a maximum length of 63 characters.
|
1190
|
+
# * Keys and values can contain only lowercase letters, numeric characters,
|
1191
|
+
# underscores, and dashes. All characters must use UTF-8 encoding, and
|
1192
|
+
# international characters are allowed.
|
1193
|
+
# * The key portion of a label must be unique. However, you can use the
|
1194
|
+
# same key with multiple resources.
|
1195
|
+
# * Keys must start with a lowercase letter or international character.
|
1139
1196
|
# @param [Array<String>, String] udfs User-defined function resources
|
1140
|
-
# used in
|
1141
|
-
# Google Cloud Storage URI (`gs://bucket/path`), or an inline resource
|
1197
|
+
# used in a legacy SQL query. May be either a code resource to load from
|
1198
|
+
# a Google Cloud Storage URI (`gs://bucket/path`), or an inline resource
|
1142
1199
|
# that contains code for a user-defined function (UDF). Providing an
|
1143
1200
|
# inline code resource is equivalent to providing a URI for a file
|
1144
|
-
# containing the same code.
|
1145
|
-
#
|
1201
|
+
# containing the same code.
|
1202
|
+
#
|
1203
|
+
# This parameter is used for defining User Defined Function (UDF)
|
1204
|
+
# resources only when using legacy SQL. Users of standard SQL should
|
1205
|
+
# leverage either DDL (e.g. `CREATE [TEMPORARY] FUNCTION ...`) or the
|
1206
|
+
# Routines API to define UDF resources.
|
1207
|
+
#
|
1208
|
+
# For additional information on migrating, see: [Migrating to
|
1209
|
+
# standard SQL - Differences in user-defined JavaScript
|
1210
|
+
# functions](https://cloud.google.com/bigquery/docs/reference/standard-sql/migrating-from-legacy-sql#differences_in_user-defined_javascript_functions)
|
1146
1211
|
# @param [Integer] maximum_billing_tier Deprecated: Change the billing
|
1147
1212
|
# tier to allow high-compute queries.
|
1148
1213
|
# @yield [job] a job configuration object
|
@@ -1424,9 +1489,12 @@ module Google
|
|
1424
1489
|
#
|
1425
1490
|
# data = dataset.query "SELECT name FROM my_table"
|
1426
1491
|
#
|
1492
|
+
# # Iterate over the first page of results
|
1427
1493
|
# data.each do |row|
|
1428
1494
|
# puts row[:name]
|
1429
1495
|
# end
|
1496
|
+
# # Retrieve the next page of results
|
1497
|
+
# data = data.next if data.next?
|
1430
1498
|
#
|
1431
1499
|
# @example Query using legacy SQL:
|
1432
1500
|
# require "google/cloud/bigquery"
|
@@ -1437,9 +1505,12 @@ module Google
|
|
1437
1505
|
# data = dataset.query "SELECT name FROM my_table",
|
1438
1506
|
# legacy_sql: true
|
1439
1507
|
#
|
1508
|
+
# # Iterate over the first page of results
|
1440
1509
|
# data.each do |row|
|
1441
1510
|
# puts row[:name]
|
1442
1511
|
# end
|
1512
|
+
# # Retrieve the next page of results
|
1513
|
+
# data = data.next if data.next?
|
1443
1514
|
#
|
1444
1515
|
# @example Query using positional query parameters:
|
1445
1516
|
# require "google/cloud/bigquery"
|
@@ -1450,9 +1521,12 @@ module Google
|
|
1450
1521
|
# data = dataset.query "SELECT name FROM my_table WHERE id = ?",
|
1451
1522
|
# params: [1]
|
1452
1523
|
#
|
1524
|
+
# # Iterate over the first page of results
|
1453
1525
|
# data.each do |row|
|
1454
1526
|
# puts row[:name]
|
1455
1527
|
# end
|
1528
|
+
# # Retrieve the next page of results
|
1529
|
+
# data = data.next if data.next?
|
1456
1530
|
#
|
1457
1531
|
# @example Query using named query parameters:
|
1458
1532
|
# require "google/cloud/bigquery"
|
@@ -1463,9 +1537,12 @@ module Google
|
|
1463
1537
|
# data = dataset.query "SELECT name FROM my_table WHERE id = @id",
|
1464
1538
|
# params: { id: 1 }
|
1465
1539
|
#
|
1540
|
+
# # Iterate over the first page of results
|
1466
1541
|
# data.each do |row|
|
1467
1542
|
# puts row[:name]
|
1468
1543
|
# end
|
1544
|
+
# # Retrieve the next page of results
|
1545
|
+
# data = data.next if data.next?
|
1469
1546
|
#
|
1470
1547
|
# @example Query using named query parameters with types:
|
1471
1548
|
# require "google/cloud/bigquery"
|
@@ -1478,9 +1555,12 @@ module Google
|
|
1478
1555
|
# params: { ids: [] },
|
1479
1556
|
# types: { ids: [:INT64] }
|
1480
1557
|
#
|
1558
|
+
# # Iterate over the first page of results
|
1481
1559
|
# data.each do |row|
|
1482
1560
|
# puts row[:name]
|
1483
1561
|
# end
|
1562
|
+
# # Retrieve the next page of results
|
1563
|
+
# data = data.next if data.next?
|
1484
1564
|
#
|
1485
1565
|
# @example Execute a DDL statement:
|
1486
1566
|
# require "google/cloud/bigquery"
|
@@ -1519,9 +1599,12 @@ module Google
|
|
1519
1599
|
# query.table = dataset.table "my_table", skip_lookup: true
|
1520
1600
|
# end
|
1521
1601
|
#
|
1602
|
+
# # Iterate over the first page of results
|
1522
1603
|
# data.each do |row|
|
1523
1604
|
# puts row[:name]
|
1524
1605
|
# end
|
1606
|
+
# # Retrieve the next page of results
|
1607
|
+
# data = data.next if data.next?
|
1525
1608
|
#
|
1526
1609
|
# @!group Data
|
1527
1610
|
#
|
@@ -1724,13 +1807,21 @@ module Google
|
|
1724
1807
|
# is 1,024 characters. If `job_id` is provided, then `prefix` will not
|
1725
1808
|
# be used.
|
1726
1809
|
# @param [Hash] labels A hash of user-provided labels associated with
|
1727
|
-
# the job. You can use these to organize and group your jobs.
|
1728
|
-
#
|
1729
|
-
#
|
1730
|
-
#
|
1731
|
-
#
|
1732
|
-
#
|
1733
|
-
#
|
1810
|
+
# the job. You can use these to organize and group your jobs.
|
1811
|
+
#
|
1812
|
+
# The labels applied to a resource must meet the following requirements:
|
1813
|
+
#
|
1814
|
+
# * Each resource can have multiple labels, up to a maximum of 64.
|
1815
|
+
# * Each label must be a key-value pair.
|
1816
|
+
# * Keys have a minimum length of 1 character and a maximum length of
|
1817
|
+
# 63 characters, and cannot be empty. Values can be empty, and have
|
1818
|
+
# a maximum length of 63 characters.
|
1819
|
+
# * Keys and values can contain only lowercase letters, numeric characters,
|
1820
|
+
# underscores, and dashes. All characters must use UTF-8 encoding, and
|
1821
|
+
# international characters are allowed.
|
1822
|
+
# * The key portion of a label must be unique. However, you can use the
|
1823
|
+
# same key with multiple resources.
|
1824
|
+
# * Keys must start with a lowercase letter or international character.
|
1734
1825
|
# @yield [updater] A block for setting the schema and other
|
1735
1826
|
# options for the destination table. The schema can be omitted if the
|
1736
1827
|
# destination table already exists, or if you're loading data from a
|
@@ -45,9 +45,12 @@ module Google
|
|
45
45
|
# data = bigquery.query "SELECT * FROM my_ext_table",
|
46
46
|
# external: { my_ext_table: csv_table }
|
47
47
|
#
|
48
|
+
# # Iterate over the first page of results
|
48
49
|
# data.each do |row|
|
49
50
|
# puts row[:name]
|
50
51
|
# end
|
52
|
+
# # Retrieve the next page of results
|
53
|
+
# data = data.next if data.next?
|
51
54
|
#
|
52
55
|
module External
|
53
56
|
##
|
@@ -138,9 +141,12 @@ module Google
|
|
138
141
|
# data = bigquery.query "SELECT * FROM my_ext_table",
|
139
142
|
# external: { my_ext_table: avro_table }
|
140
143
|
#
|
144
|
+
# # Iterate over the first page of results
|
141
145
|
# data.each do |row|
|
142
146
|
# puts row[:name]
|
143
147
|
# end
|
148
|
+
# # Retrieve the next page of results
|
149
|
+
# data = data.next if data.next?
|
144
150
|
#
|
145
151
|
class DataSource
|
146
152
|
##
|
@@ -575,9 +581,12 @@ module Google
|
|
575
581
|
# data = bigquery.query "SELECT * FROM my_ext_table",
|
576
582
|
# external: { my_ext_table: csv_table }
|
577
583
|
#
|
584
|
+
# # Iterate over the first page of results
|
578
585
|
# data.each do |row|
|
579
586
|
# puts row[:name]
|
580
587
|
# end
|
588
|
+
# # Retrieve the next page of results
|
589
|
+
# data = data.next if data.next?
|
581
590
|
#
|
582
591
|
class CsvSource < External::DataSource
|
583
592
|
##
|
@@ -1037,9 +1046,12 @@ module Google
|
|
1037
1046
|
# data = bigquery.query "SELECT * FROM my_ext_table",
|
1038
1047
|
# external: { my_ext_table: json_table }
|
1039
1048
|
#
|
1049
|
+
# # Iterate over the first page of results
|
1040
1050
|
# data.each do |row|
|
1041
1051
|
# puts row[:name]
|
1042
1052
|
# end
|
1053
|
+
# # Retrieve the next page of results
|
1054
|
+
# data = data.next if data.next?
|
1043
1055
|
#
|
1044
1056
|
class JsonSource < External::DataSource
|
1045
1057
|
##
|
@@ -1173,9 +1185,12 @@ module Google
|
|
1173
1185
|
# data = bigquery.query "SELECT * FROM my_ext_table",
|
1174
1186
|
# external: { my_ext_table: sheets_table }
|
1175
1187
|
#
|
1188
|
+
# # Iterate over the first page of results
|
1176
1189
|
# data.each do |row|
|
1177
1190
|
# puts row[:name]
|
1178
1191
|
# end
|
1192
|
+
# # Retrieve the next page of results
|
1193
|
+
# data = data.next if data.next?
|
1179
1194
|
#
|
1180
1195
|
class SheetsSource < External::DataSource
|
1181
1196
|
##
|
@@ -1318,9 +1333,12 @@ module Google
|
|
1318
1333
|
# data = bigquery.query "SELECT * FROM my_ext_table",
|
1319
1334
|
# external: { my_ext_table: bigtable_table }
|
1320
1335
|
#
|
1336
|
+
# # Iterate over the first page of results
|
1321
1337
|
# data.each do |row|
|
1322
1338
|
# puts row[:name]
|
1323
1339
|
# end
|
1340
|
+
# # Retrieve the next page of results
|
1341
|
+
# data = data.next if data.next?
|
1324
1342
|
#
|
1325
1343
|
class BigtableSource < External::DataSource
|
1326
1344
|
##
|
@@ -1516,9 +1534,12 @@ module Google
|
|
1516
1534
|
# data = bigquery.query "SELECT * FROM my_ext_table",
|
1517
1535
|
# external: { my_ext_table: bigtable_table }
|
1518
1536
|
#
|
1537
|
+
# # Iterate over the first page of results
|
1519
1538
|
# data.each do |row|
|
1520
1539
|
# puts row[:name]
|
1521
1540
|
# end
|
1541
|
+
# # Retrieve the next page of results
|
1542
|
+
# data = data.next if data.next?
|
1522
1543
|
#
|
1523
1544
|
class ColumnFamily
|
1524
1545
|
##
|
@@ -2053,9 +2074,12 @@ module Google
|
|
2053
2074
|
# data = bigquery.query "SELECT * FROM my_ext_table",
|
2054
2075
|
# external: { my_ext_table: bigtable_table }
|
2055
2076
|
#
|
2077
|
+
# # Iterate over the first page of results
|
2056
2078
|
# data.each do |row|
|
2057
2079
|
# puts row[:name]
|
2058
2080
|
# end
|
2081
|
+
# # Retrieve the next page of results
|
2082
|
+
# data = data.next if data.next?
|
2059
2083
|
#
|
2060
2084
|
class Column
|
2061
2085
|
##
|