google-cloud-bigquery 1.30.0 → 1.31.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 +7 -0
- data/lib/google/cloud/bigquery/load_job.rb +23 -16
- data/lib/google/cloud/bigquery/query_job.rb +23 -16
- data/lib/google/cloud/bigquery/table.rb +66 -17
- data/lib/google/cloud/bigquery/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 413b609d23c55aea401129708c06ef5d61a1f9df5227331b2a903eb0c7ec8443
|
4
|
+
data.tar.gz: a7bdf477a21c41e62cbe55f9ff105313b2ae2efee5c7e8798a66becbfd5a7e36
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 52fe14d19dd4c3694776c63535faf63939eeb38a5416da85bf2a3355702354d7c1e9be18c88d951423cd57e319e454a65fec3a6cd81cca0e846e649a8c06a3e6
|
7
|
+
data.tar.gz: cc147d654b6339846b1e00c365c39e6010d1c8ff0fbe39d0dafb3dbc4c9aa4b2442c979fadc69e4ac68b67d56f8b53f85033412d1094f089598c7e4d8b79c2e7
|
data/CHANGELOG.md
CHANGED
@@ -484,7 +484,7 @@ module Google
|
|
484
484
|
# Checks if the destination table will be time partitioned. See
|
485
485
|
# [Partitioned Tables](https://cloud.google.com/bigquery/docs/partitioned-tables).
|
486
486
|
#
|
487
|
-
# @return [Boolean
|
487
|
+
# @return [Boolean] `true` when the table will be time-partitioned,
|
488
488
|
# or `false` otherwise.
|
489
489
|
#
|
490
490
|
# @!group Attributes
|
@@ -560,10 +560,15 @@ module Google
|
|
560
560
|
###
|
561
561
|
# Checks if the destination table will be clustered.
|
562
562
|
#
|
563
|
+
# See {LoadJob::Updater#clustering_fields=}, {Table#clustering_fields} and
|
564
|
+
# {Table#clustering_fields=}.
|
565
|
+
#
|
563
566
|
# @see https://cloud.google.com/bigquery/docs/clustered-tables
|
564
|
-
# Introduction to
|
567
|
+
# Introduction to clustered tables
|
568
|
+
# @see https://cloud.google.com/bigquery/docs/creating-clustered-tables
|
569
|
+
# Creating and using clustered tables
|
565
570
|
#
|
566
|
-
# @return [Boolean
|
571
|
+
# @return [Boolean] `true` when the table will be clustered,
|
567
572
|
# or `false` otherwise.
|
568
573
|
#
|
569
574
|
# @!group Attributes
|
@@ -578,14 +583,16 @@ module Google
|
|
578
583
|
# be first partitioned and subsequently clustered. The order of the
|
579
584
|
# returned fields determines the sort order of the data.
|
580
585
|
#
|
581
|
-
#
|
586
|
+
# BigQuery supports clustering for both partitioned and non-partitioned
|
587
|
+
# tables.
|
588
|
+
#
|
589
|
+
# See {LoadJob::Updater#clustering_fields=}, {Table#clustering_fields} and
|
590
|
+
# {Table#clustering_fields=}.
|
582
591
|
#
|
583
|
-
# @see https://cloud.google.com/bigquery/docs/partitioned-tables
|
584
|
-
# Partitioned Tables
|
585
592
|
# @see https://cloud.google.com/bigquery/docs/clustered-tables
|
586
|
-
# Introduction to
|
593
|
+
# Introduction to clustered tables
|
587
594
|
# @see https://cloud.google.com/bigquery/docs/creating-clustered-tables
|
588
|
-
# Creating and
|
595
|
+
# Creating and using clustered tables
|
589
596
|
#
|
590
597
|
# @return [Array<String>, nil] The clustering fields, or `nil` if the
|
591
598
|
# destination table will not be clustered.
|
@@ -1819,23 +1826,23 @@ module Google
|
|
1819
1826
|
end
|
1820
1827
|
|
1821
1828
|
##
|
1822
|
-
# Sets
|
1823
|
-
# clustered. Must be specified with time-based partitioning, data in
|
1824
|
-
# the table will be first partitioned and subsequently clustered.
|
1829
|
+
# Sets the list of fields on which data should be clustered.
|
1825
1830
|
#
|
1826
1831
|
# Only top-level, non-repeated, simple-type fields are supported. When
|
1827
1832
|
# you cluster a table using multiple columns, the order of columns you
|
1828
1833
|
# specify is important. The order of the specified columns determines
|
1829
1834
|
# the sort order of the data.
|
1830
1835
|
#
|
1831
|
-
#
|
1836
|
+
# BigQuery supports clustering for both partitioned and non-partitioned
|
1837
|
+
# tables.
|
1838
|
+
#
|
1839
|
+
# See {LoadJob#clustering_fields}, {Table#clustering_fields} and
|
1840
|
+
# {Table#clustering_fields=}.
|
1832
1841
|
#
|
1833
|
-
# @see https://cloud.google.com/bigquery/docs/partitioned-tables
|
1834
|
-
# Partitioned Tables
|
1835
1842
|
# @see https://cloud.google.com/bigquery/docs/clustered-tables
|
1836
|
-
# Introduction to
|
1843
|
+
# Introduction to clustered tables
|
1837
1844
|
# @see https://cloud.google.com/bigquery/docs/creating-clustered-tables
|
1838
|
-
# Creating and
|
1845
|
+
# Creating and using clustered tables
|
1839
1846
|
#
|
1840
1847
|
# @param [Array<String>] fields The clustering fields. Only top-level,
|
1841
1848
|
# non-repeated, simple-type fields are supported.
|
@@ -514,7 +514,7 @@ module Google
|
|
514
514
|
# Checks if the destination table will be time-partitioned. See
|
515
515
|
# [Partitioned Tables](https://cloud.google.com/bigquery/docs/partitioned-tables).
|
516
516
|
#
|
517
|
-
# @return [Boolean
|
517
|
+
# @return [Boolean] `true` when the table will be time-partitioned,
|
518
518
|
# or `false` otherwise.
|
519
519
|
#
|
520
520
|
# @!group Attributes
|
@@ -589,10 +589,15 @@ module Google
|
|
589
589
|
###
|
590
590
|
# Checks if the destination table will be clustered.
|
591
591
|
#
|
592
|
+
# See {QueryJob::Updater#clustering_fields=}, {Table#clustering_fields} and
|
593
|
+
# {Table#clustering_fields=}.
|
594
|
+
#
|
592
595
|
# @see https://cloud.google.com/bigquery/docs/clustered-tables
|
593
|
-
# Introduction to
|
596
|
+
# Introduction to clustered tables
|
597
|
+
# @see https://cloud.google.com/bigquery/docs/creating-clustered-tables
|
598
|
+
# Creating and using clustered tables
|
594
599
|
#
|
595
|
-
# @return [Boolean
|
600
|
+
# @return [Boolean] `true` when the table will be clustered,
|
596
601
|
# or `false` otherwise.
|
597
602
|
#
|
598
603
|
# @!group Attributes
|
@@ -607,14 +612,16 @@ module Google
|
|
607
612
|
# be first partitioned and subsequently clustered. The order of the
|
608
613
|
# returned fields determines the sort order of the data.
|
609
614
|
#
|
610
|
-
#
|
615
|
+
# BigQuery supports clustering for both partitioned and non-partitioned
|
616
|
+
# tables.
|
617
|
+
#
|
618
|
+
# See {QueryJob::Updater#clustering_fields=}, {Table#clustering_fields} and
|
619
|
+
# {Table#clustering_fields=}.
|
611
620
|
#
|
612
|
-
# @see https://cloud.google.com/bigquery/docs/partitioned-tables
|
613
|
-
# Partitioned Tables
|
614
621
|
# @see https://cloud.google.com/bigquery/docs/clustered-tables
|
615
|
-
# Introduction to
|
622
|
+
# Introduction to clustered tables
|
616
623
|
# @see https://cloud.google.com/bigquery/docs/creating-clustered-tables
|
617
|
-
# Creating and
|
624
|
+
# Creating and using clustered tables
|
618
625
|
#
|
619
626
|
# @return [Array<String>, nil] The clustering fields, or `nil` if the
|
620
627
|
# destination table will not be clustered.
|
@@ -1445,23 +1452,23 @@ module Google
|
|
1445
1452
|
end
|
1446
1453
|
|
1447
1454
|
##
|
1448
|
-
# Sets
|
1449
|
-
# clustered. Must be specified with time-based partitioning, data in
|
1450
|
-
# the table will be first partitioned and subsequently clustered.
|
1455
|
+
# Sets the list of fields on which data should be clustered.
|
1451
1456
|
#
|
1452
1457
|
# Only top-level, non-repeated, simple-type fields are supported. When
|
1453
1458
|
# you cluster a table using multiple columns, the order of columns you
|
1454
1459
|
# specify is important. The order of the specified columns determines
|
1455
1460
|
# the sort order of the data.
|
1456
1461
|
#
|
1457
|
-
#
|
1462
|
+
# BigQuery supports clustering for both partitioned and non-partitioned
|
1463
|
+
# tables.
|
1464
|
+
#
|
1465
|
+
# See {QueryJob#clustering_fields}, {Table#clustering_fields} and
|
1466
|
+
# {Table#clustering_fields=}.
|
1458
1467
|
#
|
1459
|
-
# @see https://cloud.google.com/bigquery/docs/partitioned-tables
|
1460
|
-
# Partitioned Tables
|
1461
1468
|
# @see https://cloud.google.com/bigquery/docs/clustered-tables
|
1462
|
-
# Introduction to
|
1469
|
+
# Introduction to clustered tables
|
1463
1470
|
# @see https://cloud.google.com/bigquery/docs/creating-clustered-tables
|
1464
|
-
# Creating and
|
1471
|
+
# Creating and using clustered tables
|
1465
1472
|
#
|
1466
1473
|
# @param [Array<String>] fields The clustering fields. Only top-level,
|
1467
1474
|
# non-repeated, simple-type fields are supported.
|
@@ -471,8 +471,13 @@ module Google
|
|
471
471
|
###
|
472
472
|
# Checks if the table is clustered.
|
473
473
|
#
|
474
|
+
# See {Table::Updater#clustering_fields=}, {Table#clustering_fields} and
|
475
|
+
# {Table#clustering_fields=}.
|
476
|
+
#
|
474
477
|
# @see https://cloud.google.com/bigquery/docs/clustered-tables
|
475
|
-
# Introduction to
|
478
|
+
# Introduction to clustered tables
|
479
|
+
# @see https://cloud.google.com/bigquery/docs/creating-clustered-tables
|
480
|
+
# Creating and using clustered tables
|
476
481
|
#
|
477
482
|
# @return [Boolean, nil] `true` when the table is clustered, or
|
478
483
|
# `false` otherwise, if the object is a resource (see {#resource?});
|
@@ -491,14 +496,16 @@ module Google
|
|
491
496
|
# first partitioned and subsequently clustered. The order of the
|
492
497
|
# returned fields determines the sort order of the data.
|
493
498
|
#
|
494
|
-
#
|
499
|
+
# BigQuery supports clustering for both partitioned and non-partitioned
|
500
|
+
# tables.
|
501
|
+
#
|
502
|
+
# See {Table::Updater#clustering_fields=}, {Table#clustering_fields=} and
|
503
|
+
# {Table#clustering?}.
|
495
504
|
#
|
496
|
-
# @see https://cloud.google.com/bigquery/docs/partitioned-tables
|
497
|
-
# Partitioned Tables
|
498
505
|
# @see https://cloud.google.com/bigquery/docs/clustered-tables
|
499
|
-
# Introduction to
|
506
|
+
# Introduction to clustered tables
|
500
507
|
# @see https://cloud.google.com/bigquery/docs/creating-clustered-tables
|
501
|
-
# Creating and
|
508
|
+
# Creating and using clustered tables
|
502
509
|
#
|
503
510
|
# @return [Array<String>, nil] The clustering fields, or `nil` if the
|
504
511
|
# table is not clustered or if the table is a reference (see
|
@@ -512,6 +519,53 @@ module Google
|
|
512
519
|
@gapi.clustering.fields if clustering?
|
513
520
|
end
|
514
521
|
|
522
|
+
##
|
523
|
+
# Updates the list of fields on which data should be clustered.
|
524
|
+
#
|
525
|
+
# Only top-level, non-repeated, simple-type fields are supported. When
|
526
|
+
# you cluster a table using multiple columns, the order of columns you
|
527
|
+
# specify is important. The order of the specified columns determines
|
528
|
+
# the sort order of the data.
|
529
|
+
#
|
530
|
+
# BigQuery supports clustering for both partitioned and non-partitioned
|
531
|
+
# tables.
|
532
|
+
#
|
533
|
+
# See {Table::Updater#clustering_fields=}, {Table#clustering_fields} and
|
534
|
+
# {Table#clustering?}.
|
535
|
+
#
|
536
|
+
# @see https://cloud.google.com/bigquery/docs/clustered-tables
|
537
|
+
# Introduction to clustered tables
|
538
|
+
# @see https://cloud.google.com/bigquery/docs/creating-clustered-tables
|
539
|
+
# Creating and using clustered tables
|
540
|
+
# @see https://cloud.google.com/bigquery/docs/creating-clustered-tables#modifying-cluster-spec
|
541
|
+
# Modifying clustering specification
|
542
|
+
#
|
543
|
+
# @param [Array<String>, nil] fields The clustering fields, or `nil` to
|
544
|
+
# remove the clustering configuration. Only top-level, non-repeated,
|
545
|
+
# simple-type fields are supported.
|
546
|
+
#
|
547
|
+
# @example
|
548
|
+
# require "google/cloud/bigquery"
|
549
|
+
#
|
550
|
+
# bigquery = Google::Cloud::Bigquery.new
|
551
|
+
# dataset = bigquery.dataset "my_dataset"
|
552
|
+
# table = dataset.table "my_table"
|
553
|
+
#
|
554
|
+
# table.clustering_fields = ["last_name", "first_name"]
|
555
|
+
#
|
556
|
+
# @!group Attributes
|
557
|
+
#
|
558
|
+
def clustering_fields= fields
|
559
|
+
reload! unless resource_full?
|
560
|
+
if fields
|
561
|
+
@gapi.clustering ||= Google::Apis::BigqueryV2::Clustering.new
|
562
|
+
@gapi.clustering.fields = fields
|
563
|
+
else
|
564
|
+
@gapi.clustering = nil
|
565
|
+
end
|
566
|
+
patch_gapi! :clustering
|
567
|
+
end
|
568
|
+
|
515
569
|
##
|
516
570
|
# The combined Project ID, Dataset ID, and Table ID for this table, in
|
517
571
|
# the format specified by the [Legacy SQL Query
|
@@ -3062,27 +3116,22 @@ module Google
|
|
3062
3116
|
end
|
3063
3117
|
|
3064
3118
|
##
|
3065
|
-
# Sets
|
3066
|
-
# specified with time-based partitioning, data in the table will be
|
3067
|
-
# first partitioned and subsequently clustered.
|
3119
|
+
# Sets the list of fields on which data should be clustered.
|
3068
3120
|
#
|
3069
3121
|
# Only top-level, non-repeated, simple-type fields are supported. When
|
3070
3122
|
# you cluster a table using multiple columns, the order of columns you
|
3071
3123
|
# specify is important. The order of the specified columns determines
|
3072
3124
|
# the sort order of the data.
|
3073
3125
|
#
|
3074
|
-
#
|
3075
|
-
#
|
3076
|
-
# on an existing table.
|
3126
|
+
# BigQuery supports clustering for both partitioned and non-partitioned
|
3127
|
+
# tables.
|
3077
3128
|
#
|
3078
|
-
# See {Table#clustering_fields}.
|
3129
|
+
# See {Table#clustering_fields} and {Table#clustering_fields=}.
|
3079
3130
|
#
|
3080
|
-
# @see https://cloud.google.com/bigquery/docs/partitioned-tables
|
3081
|
-
# Partitioned Tables
|
3082
3131
|
# @see https://cloud.google.com/bigquery/docs/clustered-tables
|
3083
|
-
# Introduction to
|
3132
|
+
# Introduction to clustered tables
|
3084
3133
|
# @see https://cloud.google.com/bigquery/docs/creating-clustered-tables
|
3085
|
-
# Creating and
|
3134
|
+
# Creating and using clustered tables
|
3086
3135
|
#
|
3087
3136
|
# @param [Array<String>] fields The clustering fields. Only top-level,
|
3088
3137
|
# non-repeated, simple-type fields are supported.
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: google-cloud-bigquery
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.31.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mike Moore
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2021-04-
|
12
|
+
date: 2021-04-28 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: concurrent-ruby
|
@@ -291,7 +291,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
291
291
|
- !ruby/object:Gem::Version
|
292
292
|
version: '0'
|
293
293
|
requirements: []
|
294
|
-
rubygems_version: 3.2.
|
294
|
+
rubygems_version: 3.2.16
|
295
295
|
signing_key:
|
296
296
|
specification_version: 4
|
297
297
|
summary: API Client library for Google BigQuery
|