google-cloud-bigquery 1.31.0 → 1.34.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/AUTHENTICATION.md +2 -1
- data/CHANGELOG.md +67 -0
- data/lib/google/cloud/bigquery/data.rb +33 -0
- data/lib/google/cloud/bigquery/external.rb +9 -2619
- data/lib/google/cloud/bigquery/external/bigtable_source.rb +230 -0
- data/lib/google/cloud/bigquery/external/bigtable_source/column.rb +404 -0
- data/lib/google/cloud/bigquery/external/bigtable_source/column_family.rb +945 -0
- data/lib/google/cloud/bigquery/external/csv_source.rb +481 -0
- data/lib/google/cloud/bigquery/external/data_source.rb +771 -0
- data/lib/google/cloud/bigquery/external/json_source.rb +170 -0
- data/lib/google/cloud/bigquery/external/parquet_source.rb +148 -0
- data/lib/google/cloud/bigquery/external/sheets_source.rb +166 -0
- data/lib/google/cloud/bigquery/load_job.rb +203 -22
- data/lib/google/cloud/bigquery/query_job.rb +33 -0
- data/lib/google/cloud/bigquery/schema.rb +127 -28
- data/lib/google/cloud/bigquery/schema/field.rb +217 -28
- data/lib/google/cloud/bigquery/table.rb +100 -22
- data/lib/google/cloud/bigquery/version.rb +1 -1
- metadata +37 -9
@@ -163,6 +163,101 @@ module Google
|
|
163
163
|
@gapi.update! mode: verify_mode(new_mode)
|
164
164
|
end
|
165
165
|
|
166
|
+
##
|
167
|
+
# The policy tag list for the field. Policy tag identifiers are of the form
|
168
|
+
# `projects/*/locations/*/taxonomies/*/policyTags/*`. At most 1 policy tag
|
169
|
+
# is currently allowed.
|
170
|
+
#
|
171
|
+
# @see https://cloud.google.com/bigquery/docs/column-level-security-intro
|
172
|
+
# Introduction to BigQuery column-level security
|
173
|
+
#
|
174
|
+
# @return [Array<String>, nil] The policy tag list for the field, or `nil`.
|
175
|
+
#
|
176
|
+
# @example
|
177
|
+
# require "google/cloud/bigquery"
|
178
|
+
#
|
179
|
+
# bigquery = Google::Cloud::Bigquery.new
|
180
|
+
# dataset = bigquery.dataset "my_dataset"
|
181
|
+
# table = dataset.table "my_table"
|
182
|
+
#
|
183
|
+
# table.schema.field("age").policy_tags
|
184
|
+
#
|
185
|
+
def policy_tags
|
186
|
+
names = @gapi.policy_tags&.names
|
187
|
+
names.to_a if names && !names.empty?
|
188
|
+
end
|
189
|
+
|
190
|
+
##
|
191
|
+
# Updates the policy tag list for the field.
|
192
|
+
#
|
193
|
+
# @see https://cloud.google.com/bigquery/docs/column-level-security-intro
|
194
|
+
# Introduction to BigQuery column-level security
|
195
|
+
#
|
196
|
+
# @param [Array<String>, String, nil] new_policy_tags The policy tag list or
|
197
|
+
# single policy tag for the field, or `nil` to remove the existing policy tags.
|
198
|
+
# Policy tag identifiers are of the form `projects/*/locations/*/taxonomies/*/policyTags/*`.
|
199
|
+
# At most 1 policy tag is currently allowed.
|
200
|
+
#
|
201
|
+
# @example
|
202
|
+
# require "google/cloud/bigquery"
|
203
|
+
#
|
204
|
+
# bigquery = Google::Cloud::Bigquery.new
|
205
|
+
# dataset = bigquery.dataset "my_dataset"
|
206
|
+
# table = dataset.table "my_table"
|
207
|
+
#
|
208
|
+
# policy_tag = "projects/my-project/locations/us/taxonomies/my-taxonomy/policyTags/my-policy-tag"
|
209
|
+
# table.schema do |schema|
|
210
|
+
# schema.field("age").policy_tags = policy_tag
|
211
|
+
# end
|
212
|
+
#
|
213
|
+
# table.schema.field("age").policy_tags
|
214
|
+
#
|
215
|
+
def policy_tags= new_policy_tags
|
216
|
+
# If new_policy_tags is nil, send an empty array.
|
217
|
+
# Sending a nil value for policy_tags results in no change.
|
218
|
+
new_policy_tags = Array(new_policy_tags)
|
219
|
+
policy_tag_list = Google::Apis::BigqueryV2::TableFieldSchema::PolicyTags.new names: new_policy_tags
|
220
|
+
@gapi.update! policy_tags: policy_tag_list
|
221
|
+
end
|
222
|
+
|
223
|
+
##
|
224
|
+
# The maximum length of values of this field for {#string?} or {bytes?} fields. If `max_length` is not
|
225
|
+
# specified, no maximum length constraint is imposed on this field. If type = `STRING`, then `max_length`
|
226
|
+
# represents the maximum UTF-8 length of strings in this field. If type = `BYTES`, then `max_length`
|
227
|
+
# represents the maximum number of bytes in this field.
|
228
|
+
#
|
229
|
+
# @return [Integer, nil] The maximum length of values of this field, or `nil`.
|
230
|
+
#
|
231
|
+
def max_length
|
232
|
+
@gapi.max_length
|
233
|
+
end
|
234
|
+
|
235
|
+
##
|
236
|
+
# The precision (maximum number of total digits) for `NUMERIC` or `BIGNUMERIC` types. For {#numeric?} fields,
|
237
|
+
# acceptable values for precision must be `1 ≤ (precision - scale) ≤ 29` and values for scale must be `0 ≤
|
238
|
+
# scale ≤ 9`. For {#bignumeric?} fields, acceptable values for precision must be `1 ≤ (precision - scale) ≤
|
239
|
+
# 38` and values for scale must be `0 ≤ scale ≤ 38`. If the scale value is set, the precision value must be
|
240
|
+
# set as well.
|
241
|
+
#
|
242
|
+
# @return [Integer, nil] The precision for the field, or `nil`.
|
243
|
+
#
|
244
|
+
def precision
|
245
|
+
@gapi.precision
|
246
|
+
end
|
247
|
+
|
248
|
+
##
|
249
|
+
# The scale (maximum number of digits in the fractional part) for `NUMERIC` or `BIGNUMERIC` types. For
|
250
|
+
# {#numeric?} fields, acceptable values for precision must be `1 ≤ (precision - scale) ≤ 29` and values for
|
251
|
+
# scale must be `0 ≤ scale ≤ 9`. For {#bignumeric?} fields, acceptable values for precision must be `1 ≤
|
252
|
+
# (precision - scale) ≤ 38` and values for scale must be `0 ≤ scale ≤ 38`. If the scale value is set, the
|
253
|
+
# precision value must be set as well.
|
254
|
+
#
|
255
|
+
# @return [Integer, nil] The scale for the field, or `nil`.
|
256
|
+
#
|
257
|
+
def scale
|
258
|
+
@gapi.scale
|
259
|
+
end
|
260
|
+
|
166
261
|
##
|
167
262
|
# Checks if the type of the field is `STRING`.
|
168
263
|
#
|
@@ -355,11 +450,22 @@ module Google
|
|
355
450
|
# @param [Symbol] mode The field's mode. The possible values are
|
356
451
|
# `:nullable`, `:required`, and `:repeated`. The default value is
|
357
452
|
# `:nullable`.
|
358
|
-
#
|
359
|
-
|
453
|
+
# @param [Array<String>, String] policy_tags The policy tag list or
|
454
|
+
# single policy tag for the field. Policy tag identifiers are of
|
455
|
+
# the form `projects/*/locations/*/taxonomies/*/policyTags/*`.
|
456
|
+
# At most 1 policy tag is currently allowed.
|
457
|
+
# @param [Integer] max_length The maximum UTF-8 length of strings
|
458
|
+
# allowed in the field.
|
459
|
+
#
|
460
|
+
def string name, description: nil, mode: :nullable, policy_tags: nil, max_length: nil
|
360
461
|
record_check!
|
361
462
|
|
362
|
-
add_field name,
|
463
|
+
add_field name,
|
464
|
+
:string,
|
465
|
+
description: description,
|
466
|
+
mode: mode,
|
467
|
+
policy_tags: policy_tags,
|
468
|
+
max_length: max_length
|
363
469
|
end
|
364
470
|
|
365
471
|
##
|
@@ -375,11 +481,15 @@ module Google
|
|
375
481
|
# @param [Symbol] mode The field's mode. The possible values are
|
376
482
|
# `:nullable`, `:required`, and `:repeated`. The default value is
|
377
483
|
# `:nullable`.
|
484
|
+
# @param [Array<String>, String] policy_tags The policy tag list or
|
485
|
+
# single policy tag for the field. Policy tag identifiers are of
|
486
|
+
# the form `projects/*/locations/*/taxonomies/*/policyTags/*`.
|
487
|
+
# At most 1 policy tag is currently allowed.
|
378
488
|
#
|
379
|
-
def integer name, description: nil, mode: :nullable
|
489
|
+
def integer name, description: nil, mode: :nullable, policy_tags: nil
|
380
490
|
record_check!
|
381
491
|
|
382
|
-
add_field name, :integer, description: description, mode: mode
|
492
|
+
add_field name, :integer, description: description, mode: mode, policy_tags: policy_tags
|
383
493
|
end
|
384
494
|
|
385
495
|
##
|
@@ -396,11 +506,15 @@ module Google
|
|
396
506
|
# @param [Symbol] mode The field's mode. The possible values are
|
397
507
|
# `:nullable`, `:required`, and `:repeated`. The default value is
|
398
508
|
# `:nullable`.
|
509
|
+
# @param [Array<String>, String] policy_tags The policy tag list or
|
510
|
+
# single policy tag for the field. Policy tag identifiers are of
|
511
|
+
# the form `projects/*/locations/*/taxonomies/*/policyTags/*`.
|
512
|
+
# At most 1 policy tag is currently allowed.
|
399
513
|
#
|
400
|
-
def float name, description: nil, mode: :nullable
|
514
|
+
def float name, description: nil, mode: :nullable, policy_tags: nil
|
401
515
|
record_check!
|
402
516
|
|
403
|
-
add_field name, :float, description: description, mode: mode
|
517
|
+
add_field name, :float, description: description, mode: mode, policy_tags: policy_tags
|
404
518
|
end
|
405
519
|
|
406
520
|
##
|
@@ -427,11 +541,31 @@ module Google
|
|
427
541
|
# @param [Symbol] mode The field's mode. The possible values are
|
428
542
|
# `:nullable`, `:required`, and `:repeated`. The default value is
|
429
543
|
# `:nullable`.
|
430
|
-
#
|
431
|
-
|
544
|
+
# @param [Array<String>, String] policy_tags The policy tag list or
|
545
|
+
# single policy tag for the field. Policy tag identifiers are of
|
546
|
+
# the form `projects/*/locations/*/taxonomies/*/policyTags/*`.
|
547
|
+
# At most 1 policy tag is currently allowed.
|
548
|
+
# @param [Integer] precision The precision (maximum number of total
|
549
|
+
# digits) for the field. Acceptable values for precision must be:
|
550
|
+
# `1 ≤ (precision - scale) ≤ 29`. Values for scale must be:
|
551
|
+
# `0 ≤ scale ≤ 9`. If the scale value is set, the precision value
|
552
|
+
# must be set as well.
|
553
|
+
# @param [Integer] scale The scale (maximum number of digits in the
|
554
|
+
# fractional part) for the field. Acceptable values for precision
|
555
|
+
# must be: `1 ≤ (precision - scale) ≤ 29`. Values for scale must
|
556
|
+
# be: `0 ≤ scale ≤ 9`. If the scale value is set, the precision
|
557
|
+
# value must be set as well.
|
558
|
+
#
|
559
|
+
def numeric name, description: nil, mode: :nullable, policy_tags: nil, precision: nil, scale: nil
|
432
560
|
record_check!
|
433
561
|
|
434
|
-
add_field name,
|
562
|
+
add_field name,
|
563
|
+
:numeric,
|
564
|
+
description: description,
|
565
|
+
mode: mode,
|
566
|
+
policy_tags: policy_tags,
|
567
|
+
precision: precision,
|
568
|
+
scale: scale
|
435
569
|
end
|
436
570
|
|
437
571
|
##
|
@@ -458,11 +592,31 @@ module Google
|
|
458
592
|
# @param [Symbol] mode The field's mode. The possible values are
|
459
593
|
# `:nullable`, `:required`, and `:repeated`. The default value is
|
460
594
|
# `:nullable`.
|
461
|
-
#
|
462
|
-
|
595
|
+
# @param [Array<String>, String] policy_tags The policy tag list or
|
596
|
+
# single policy tag for the field. Policy tag identifiers are of
|
597
|
+
# the form `projects/*/locations/*/taxonomies/*/policyTags/*`.
|
598
|
+
# At most 1 policy tag is currently allowed.
|
599
|
+
# @param [Integer] precision The precision (maximum number of total
|
600
|
+
# digits) for the field. Acceptable values for precision must be:
|
601
|
+
# `1 ≤ (precision - scale) ≤ 38`. Values for scale must be:
|
602
|
+
# `0 ≤ scale ≤ 38`. If the scale value is set, the precision value
|
603
|
+
# must be set as well.
|
604
|
+
# @param [Integer] scale The scale (maximum number of digits in the
|
605
|
+
# fractional part) for the field. Acceptable values for precision
|
606
|
+
# must be: `1 ≤ (precision - scale) ≤ 38`. Values for scale must
|
607
|
+
# be: `0 ≤ scale ≤ 38`. If the scale value is set, the precision
|
608
|
+
# value must be set as well.
|
609
|
+
#
|
610
|
+
def bignumeric name, description: nil, mode: :nullable, policy_tags: nil, precision: nil, scale: nil
|
463
611
|
record_check!
|
464
612
|
|
465
|
-
add_field name,
|
613
|
+
add_field name,
|
614
|
+
:bignumeric,
|
615
|
+
description: description,
|
616
|
+
mode: mode,
|
617
|
+
policy_tags: policy_tags,
|
618
|
+
precision: precision,
|
619
|
+
scale: scale
|
466
620
|
end
|
467
621
|
|
468
622
|
##
|
@@ -478,11 +632,15 @@ module Google
|
|
478
632
|
# @param [Symbol] mode The field's mode. The possible values are
|
479
633
|
# `:nullable`, `:required`, and `:repeated`. The default value is
|
480
634
|
# `:nullable`.
|
635
|
+
# @param [Array<String>, String] policy_tags The policy tag list or
|
636
|
+
# single policy tag for the field. Policy tag identifiers are of
|
637
|
+
# the form `projects/*/locations/*/taxonomies/*/policyTags/*`.
|
638
|
+
# At most 1 policy tag is currently allowed.
|
481
639
|
#
|
482
|
-
def boolean name, description: nil, mode: :nullable
|
640
|
+
def boolean name, description: nil, mode: :nullable, policy_tags: nil
|
483
641
|
record_check!
|
484
642
|
|
485
|
-
add_field name, :boolean, description: description, mode: mode
|
643
|
+
add_field name, :boolean, description: description, mode: mode, policy_tags: policy_tags
|
486
644
|
end
|
487
645
|
|
488
646
|
##
|
@@ -498,11 +656,22 @@ module Google
|
|
498
656
|
# @param [Symbol] mode The field's mode. The possible values are
|
499
657
|
# `:nullable`, `:required`, and `:repeated`. The default value is
|
500
658
|
# `:nullable`.
|
501
|
-
#
|
502
|
-
|
659
|
+
# @param [Array<String>, String] policy_tags The policy tag list or
|
660
|
+
# single policy tag for the field. Policy tag identifiers are of
|
661
|
+
# the form `projects/*/locations/*/taxonomies/*/policyTags/*`.
|
662
|
+
# At most 1 policy tag is currently allowed.
|
663
|
+
# @param [Integer] max_length The maximum the maximum number of
|
664
|
+
# bytes in the field.
|
665
|
+
#
|
666
|
+
def bytes name, description: nil, mode: :nullable, policy_tags: nil, max_length: nil
|
503
667
|
record_check!
|
504
668
|
|
505
|
-
add_field name,
|
669
|
+
add_field name,
|
670
|
+
:bytes,
|
671
|
+
description: description,
|
672
|
+
mode: mode,
|
673
|
+
policy_tags: policy_tags,
|
674
|
+
max_length: max_length
|
506
675
|
end
|
507
676
|
|
508
677
|
##
|
@@ -518,11 +687,15 @@ module Google
|
|
518
687
|
# @param [Symbol] mode The field's mode. The possible values are
|
519
688
|
# `:nullable`, `:required`, and `:repeated`. The default value is
|
520
689
|
# `:nullable`.
|
690
|
+
# @param [Array<String>, String] policy_tags The policy tag list or
|
691
|
+
# single policy tag for the field. Policy tag identifiers are of
|
692
|
+
# the form `projects/*/locations/*/taxonomies/*/policyTags/*`.
|
693
|
+
# At most 1 policy tag is currently allowed.
|
521
694
|
#
|
522
|
-
def timestamp name, description: nil, mode: :nullable
|
695
|
+
def timestamp name, description: nil, mode: :nullable, policy_tags: nil
|
523
696
|
record_check!
|
524
697
|
|
525
|
-
add_field name, :timestamp, description: description, mode: mode
|
698
|
+
add_field name, :timestamp, description: description, mode: mode, policy_tags: policy_tags
|
526
699
|
end
|
527
700
|
|
528
701
|
##
|
@@ -538,11 +711,15 @@ module Google
|
|
538
711
|
# @param [Symbol] mode The field's mode. The possible values are
|
539
712
|
# `:nullable`, `:required`, and `:repeated`. The default value is
|
540
713
|
# `:nullable`.
|
714
|
+
# @param [Array<String>, String] policy_tags The policy tag list or
|
715
|
+
# single policy tag for the field. Policy tag identifiers are of
|
716
|
+
# the form `projects/*/locations/*/taxonomies/*/policyTags/*`.
|
717
|
+
# At most 1 policy tag is currently allowed.
|
541
718
|
#
|
542
|
-
def time name, description: nil, mode: :nullable
|
719
|
+
def time name, description: nil, mode: :nullable, policy_tags: nil
|
543
720
|
record_check!
|
544
721
|
|
545
|
-
add_field name, :time, description: description, mode: mode
|
722
|
+
add_field name, :time, description: description, mode: mode, policy_tags: policy_tags
|
546
723
|
end
|
547
724
|
|
548
725
|
##
|
@@ -558,11 +735,15 @@ module Google
|
|
558
735
|
# @param [Symbol] mode The field's mode. The possible values are
|
559
736
|
# `:nullable`, `:required`, and `:repeated`. The default value is
|
560
737
|
# `:nullable`.
|
738
|
+
# @param [Array<String>, String] policy_tags The policy tag list or
|
739
|
+
# single policy tag for the field. Policy tag identifiers are of
|
740
|
+
# the form `projects/*/locations/*/taxonomies/*/policyTags/*`.
|
741
|
+
# At most 1 policy tag is currently allowed.
|
561
742
|
#
|
562
|
-
def datetime name, description: nil, mode: :nullable
|
743
|
+
def datetime name, description: nil, mode: :nullable, policy_tags: nil
|
563
744
|
record_check!
|
564
745
|
|
565
|
-
add_field name, :datetime, description: description, mode: mode
|
746
|
+
add_field name, :datetime, description: description, mode: mode, policy_tags: policy_tags
|
566
747
|
end
|
567
748
|
|
568
749
|
##
|
@@ -578,11 +759,15 @@ module Google
|
|
578
759
|
# @param [Symbol] mode The field's mode. The possible values are
|
579
760
|
# `:nullable`, `:required`, and `:repeated`. The default value is
|
580
761
|
# `:nullable`.
|
762
|
+
# @param [Array<String>, String] policy_tags The policy tag list or
|
763
|
+
# single policy tag for the field. Policy tag identifiers are of
|
764
|
+
# the form `projects/*/locations/*/taxonomies/*/policyTags/*`.
|
765
|
+
# At most 1 policy tag is currently allowed.
|
581
766
|
#
|
582
|
-
def date name, description: nil, mode: :nullable
|
767
|
+
def date name, description: nil, mode: :nullable, policy_tags: nil
|
583
768
|
record_check!
|
584
769
|
|
585
|
-
add_field name, :date, description: description, mode: mode
|
770
|
+
add_field name, :date, description: description, mode: mode, policy_tags: policy_tags
|
586
771
|
end
|
587
772
|
|
588
773
|
##
|
@@ -678,7 +863,7 @@ module Google
|
|
678
863
|
"Cannot add fields to a non-RECORD field (#{type})"
|
679
864
|
end
|
680
865
|
|
681
|
-
def add_field name, type, description: nil, mode: :nullable
|
866
|
+
def add_field name, type, description: nil, mode: :nullable, policy_tags: nil, max_length: nil
|
682
867
|
frozen_check!
|
683
868
|
|
684
869
|
new_gapi = Google::Apis::BigqueryV2::TableFieldSchema.new(
|
@@ -688,7 +873,11 @@ module Google
|
|
688
873
|
mode: verify_mode(mode),
|
689
874
|
fields: []
|
690
875
|
)
|
691
|
-
|
876
|
+
if policy_tags
|
877
|
+
policy_tags = Array(policy_tags)
|
878
|
+
new_gapi.policy_tags = Google::Apis::BigqueryV2::TableFieldSchema::PolicyTags.new names: policy_tags
|
879
|
+
end
|
880
|
+
new_gapi.max_length = max_length if max_length
|
692
881
|
# Remove any existing field of this name
|
693
882
|
@gapi.fields ||= []
|
694
883
|
@gapi.fields.reject! { |f| f.name == new_gapi.name }
|
@@ -3238,6 +3238,12 @@ module Google
|
|
3238
3238
|
# @param [Symbol] mode The field's mode. The possible values are
|
3239
3239
|
# `:nullable`, `:required`, and `:repeated`. The default value is
|
3240
3240
|
# `:nullable`.
|
3241
|
+
# @param [Array<String>, String] policy_tags The policy tag list or
|
3242
|
+
# single policy tag for the field. Policy tag identifiers are of
|
3243
|
+
# the form `projects/*/locations/*/taxonomies/*/policyTags/*`.
|
3244
|
+
# At most 1 policy tag is currently allowed.
|
3245
|
+
# @param [Integer] max_length The maximum UTF-8 length of strings
|
3246
|
+
# allowed in the field.
|
3241
3247
|
#
|
3242
3248
|
# @example
|
3243
3249
|
# require "google/cloud/bigquery"
|
@@ -3249,8 +3255,8 @@ module Google
|
|
3249
3255
|
# end
|
3250
3256
|
#
|
3251
3257
|
# @!group Schema
|
3252
|
-
def string name, description: nil, mode: :nullable
|
3253
|
-
schema.string name, description: description, mode: mode
|
3258
|
+
def string name, description: nil, mode: :nullable, policy_tags: nil, max_length: nil
|
3259
|
+
schema.string name, description: description, mode: mode, policy_tags: policy_tags, max_length: max_length
|
3254
3260
|
end
|
3255
3261
|
|
3256
3262
|
##
|
@@ -3266,6 +3272,10 @@ module Google
|
|
3266
3272
|
# @param [Symbol] mode The field's mode. The possible values are
|
3267
3273
|
# `:nullable`, `:required`, and `:repeated`. The default value is
|
3268
3274
|
# `:nullable`.
|
3275
|
+
# @param [Array<String>, String] policy_tags The policy tag list or
|
3276
|
+
# single policy tag for the field. Policy tag identifiers are of
|
3277
|
+
# the form `projects/*/locations/*/taxonomies/*/policyTags/*`.
|
3278
|
+
# At most 1 policy tag is currently allowed.
|
3269
3279
|
#
|
3270
3280
|
# @example
|
3271
3281
|
# require "google/cloud/bigquery"
|
@@ -3277,8 +3287,8 @@ module Google
|
|
3277
3287
|
# end
|
3278
3288
|
#
|
3279
3289
|
# @!group Schema
|
3280
|
-
def integer name, description: nil, mode: :nullable
|
3281
|
-
schema.integer name, description: description, mode: mode
|
3290
|
+
def integer name, description: nil, mode: :nullable, policy_tags: nil
|
3291
|
+
schema.integer name, description: description, mode: mode, policy_tags: policy_tags
|
3282
3292
|
end
|
3283
3293
|
|
3284
3294
|
##
|
@@ -3294,6 +3304,10 @@ module Google
|
|
3294
3304
|
# @param [Symbol] mode The field's mode. The possible values are
|
3295
3305
|
# `:nullable`, `:required`, and `:repeated`. The default value is
|
3296
3306
|
# `:nullable`.
|
3307
|
+
# @param [Array<String>, String] policy_tags The policy tag list or
|
3308
|
+
# single policy tag for the field. Policy tag identifiers are of
|
3309
|
+
# the form `projects/*/locations/*/taxonomies/*/policyTags/*`.
|
3310
|
+
# At most 1 policy tag is currently allowed.
|
3297
3311
|
#
|
3298
3312
|
# @example
|
3299
3313
|
# require "google/cloud/bigquery"
|
@@ -3305,8 +3319,8 @@ module Google
|
|
3305
3319
|
# end
|
3306
3320
|
#
|
3307
3321
|
# @!group Schema
|
3308
|
-
def float name, description: nil, mode: :nullable
|
3309
|
-
schema.float name, description: description, mode: mode
|
3322
|
+
def float name, description: nil, mode: :nullable, policy_tags: nil
|
3323
|
+
schema.float name, description: description, mode: mode, policy_tags: policy_tags
|
3310
3324
|
end
|
3311
3325
|
|
3312
3326
|
##
|
@@ -3333,6 +3347,20 @@ module Google
|
|
3333
3347
|
# @param [Symbol] mode The field's mode. The possible values are
|
3334
3348
|
# `:nullable`, `:required`, and `:repeated`. The default value is
|
3335
3349
|
# `:nullable`.
|
3350
|
+
# @param [Array<String>, String] policy_tags The policy tag list or
|
3351
|
+
# single policy tag for the field. Policy tag identifiers are of
|
3352
|
+
# the form `projects/*/locations/*/taxonomies/*/policyTags/*`.
|
3353
|
+
# At most 1 policy tag is currently allowed.
|
3354
|
+
# @param [Integer] precision The precision (maximum number of total
|
3355
|
+
# digits) for the field. Acceptable values for precision must be:
|
3356
|
+
# `1 ≤ (precision - scale) ≤ 29`. Values for scale must be:
|
3357
|
+
# `0 ≤ scale ≤ 9`. If the scale value is set, the precision value
|
3358
|
+
# must be set as well.
|
3359
|
+
# @param [Integer] scale The scale (maximum number of digits in the
|
3360
|
+
# fractional part) for the field. Acceptable values for precision
|
3361
|
+
# must be: `1 ≤ (precision - scale) ≤ 29`. Values for scale must
|
3362
|
+
# be: `0 ≤ scale ≤ 9`. If the scale value is set, the precision
|
3363
|
+
# value must be set as well.
|
3336
3364
|
#
|
3337
3365
|
# @example
|
3338
3366
|
# require "google/cloud/bigquery"
|
@@ -3344,8 +3372,13 @@ module Google
|
|
3344
3372
|
# end
|
3345
3373
|
#
|
3346
3374
|
# @!group Schema
|
3347
|
-
def numeric name, description: nil, mode: :nullable
|
3348
|
-
schema.numeric name,
|
3375
|
+
def numeric name, description: nil, mode: :nullable, policy_tags: nil, precision: nil, scale: nil
|
3376
|
+
schema.numeric name,
|
3377
|
+
description: description,
|
3378
|
+
mode: mode,
|
3379
|
+
policy_tags: policy_tags,
|
3380
|
+
precision: precision,
|
3381
|
+
scale: scale
|
3349
3382
|
end
|
3350
3383
|
|
3351
3384
|
##
|
@@ -3372,6 +3405,20 @@ module Google
|
|
3372
3405
|
# @param [Symbol] mode The field's mode. The possible values are
|
3373
3406
|
# `:nullable`, `:required`, and `:repeated`. The default value is
|
3374
3407
|
# `:nullable`.
|
3408
|
+
# @param [Array<String>, String] policy_tags The policy tag list or
|
3409
|
+
# single policy tag for the field. Policy tag identifiers are of
|
3410
|
+
# the form `projects/*/locations/*/taxonomies/*/policyTags/*`.
|
3411
|
+
# At most 1 policy tag is currently allowed.
|
3412
|
+
# @param [Integer] precision The precision (maximum number of total
|
3413
|
+
# digits) for the field. Acceptable values for precision must be:
|
3414
|
+
# `1 ≤ (precision - scale) ≤ 38`. Values for scale must be:
|
3415
|
+
# `0 ≤ scale ≤ 38`. If the scale value is set, the precision value
|
3416
|
+
# must be set as well.
|
3417
|
+
# @param [Integer] scale The scale (maximum number of digits in the
|
3418
|
+
# fractional part) for the field. Acceptable values for precision
|
3419
|
+
# must be: `1 ≤ (precision - scale) ≤ 38`. Values for scale must
|
3420
|
+
# be: `0 ≤ scale ≤ 38`. If the scale value is set, the precision
|
3421
|
+
# value must be set as well.
|
3375
3422
|
#
|
3376
3423
|
# @example
|
3377
3424
|
# require "google/cloud/bigquery"
|
@@ -3383,8 +3430,13 @@ module Google
|
|
3383
3430
|
# end
|
3384
3431
|
#
|
3385
3432
|
# @!group Schema
|
3386
|
-
def bignumeric name, description: nil, mode: :nullable
|
3387
|
-
schema.bignumeric name,
|
3433
|
+
def bignumeric name, description: nil, mode: :nullable, policy_tags: nil, precision: nil, scale: nil
|
3434
|
+
schema.bignumeric name,
|
3435
|
+
description: description,
|
3436
|
+
mode: mode,
|
3437
|
+
policy_tags: policy_tags,
|
3438
|
+
precision: precision,
|
3439
|
+
scale: scale
|
3388
3440
|
end
|
3389
3441
|
|
3390
3442
|
##
|
@@ -3400,6 +3452,10 @@ module Google
|
|
3400
3452
|
# @param [Symbol] mode The field's mode. The possible values are
|
3401
3453
|
# `:nullable`, `:required`, and `:repeated`. The default value is
|
3402
3454
|
# `:nullable`.
|
3455
|
+
# @param [Array<String>, String] policy_tags The policy tag list or
|
3456
|
+
# single policy tag for the field. Policy tag identifiers are of
|
3457
|
+
# the form `projects/*/locations/*/taxonomies/*/policyTags/*`.
|
3458
|
+
# At most 1 policy tag is currently allowed.
|
3403
3459
|
#
|
3404
3460
|
# @example
|
3405
3461
|
# require "google/cloud/bigquery"
|
@@ -3411,8 +3467,8 @@ module Google
|
|
3411
3467
|
# end
|
3412
3468
|
#
|
3413
3469
|
# @!group Schema
|
3414
|
-
def boolean name, description: nil, mode: :nullable
|
3415
|
-
schema.boolean name, description: description, mode: mode
|
3470
|
+
def boolean name, description: nil, mode: :nullable, policy_tags: nil
|
3471
|
+
schema.boolean name, description: description, mode: mode, policy_tags: policy_tags
|
3416
3472
|
end
|
3417
3473
|
|
3418
3474
|
##
|
@@ -3428,6 +3484,12 @@ module Google
|
|
3428
3484
|
# @param [Symbol] mode The field's mode. The possible values are
|
3429
3485
|
# `:nullable`, `:required`, and `:repeated`. The default value is
|
3430
3486
|
# `:nullable`.
|
3487
|
+
# @param [Array<String>, String] policy_tags The policy tag list or
|
3488
|
+
# single policy tag for the field. Policy tag identifiers are of
|
3489
|
+
# the form `projects/*/locations/*/taxonomies/*/policyTags/*`.
|
3490
|
+
# At most 1 policy tag is currently allowed.
|
3491
|
+
# @param [Integer] max_length The maximum the maximum number of
|
3492
|
+
# bytes in the field.
|
3431
3493
|
#
|
3432
3494
|
# @example
|
3433
3495
|
# require "google/cloud/bigquery"
|
@@ -3439,8 +3501,8 @@ module Google
|
|
3439
3501
|
# end
|
3440
3502
|
#
|
3441
3503
|
# @!group Schema
|
3442
|
-
def bytes name, description: nil, mode: :nullable
|
3443
|
-
schema.bytes name, description: description, mode: mode
|
3504
|
+
def bytes name, description: nil, mode: :nullable, policy_tags: nil, max_length: nil
|
3505
|
+
schema.bytes name, description: description, mode: mode, policy_tags: policy_tags, max_length: max_length
|
3444
3506
|
end
|
3445
3507
|
|
3446
3508
|
##
|
@@ -3456,6 +3518,10 @@ module Google
|
|
3456
3518
|
# @param [Symbol] mode The field's mode. The possible values are
|
3457
3519
|
# `:nullable`, `:required`, and `:repeated`. The default value is
|
3458
3520
|
# `:nullable`.
|
3521
|
+
# @param [Array<String>, String] policy_tags The policy tag list or
|
3522
|
+
# single policy tag for the field. Policy tag identifiers are of
|
3523
|
+
# the form `projects/*/locations/*/taxonomies/*/policyTags/*`.
|
3524
|
+
# At most 1 policy tag is currently allowed.
|
3459
3525
|
#
|
3460
3526
|
# @example
|
3461
3527
|
# require "google/cloud/bigquery"
|
@@ -3467,8 +3533,8 @@ module Google
|
|
3467
3533
|
# end
|
3468
3534
|
#
|
3469
3535
|
# @!group Schema
|
3470
|
-
def timestamp name, description: nil, mode: :nullable
|
3471
|
-
schema.timestamp name, description: description, mode: mode
|
3536
|
+
def timestamp name, description: nil, mode: :nullable, policy_tags: nil
|
3537
|
+
schema.timestamp name, description: description, mode: mode, policy_tags: policy_tags
|
3472
3538
|
end
|
3473
3539
|
|
3474
3540
|
##
|
@@ -3484,6 +3550,10 @@ module Google
|
|
3484
3550
|
# @param [Symbol] mode The field's mode. The possible values are
|
3485
3551
|
# `:nullable`, `:required`, and `:repeated`. The default value is
|
3486
3552
|
# `:nullable`.
|
3553
|
+
# @param [Array<String>, String] policy_tags The policy tag list or
|
3554
|
+
# single policy tag for the field. Policy tag identifiers are of
|
3555
|
+
# the form `projects/*/locations/*/taxonomies/*/policyTags/*`.
|
3556
|
+
# At most 1 policy tag is currently allowed.
|
3487
3557
|
#
|
3488
3558
|
# @example
|
3489
3559
|
# require "google/cloud/bigquery"
|
@@ -3495,8 +3565,8 @@ module Google
|
|
3495
3565
|
# end
|
3496
3566
|
#
|
3497
3567
|
# @!group Schema
|
3498
|
-
def time name, description: nil, mode: :nullable
|
3499
|
-
schema.time name, description: description, mode: mode
|
3568
|
+
def time name, description: nil, mode: :nullable, policy_tags: nil
|
3569
|
+
schema.time name, description: description, mode: mode, policy_tags: policy_tags
|
3500
3570
|
end
|
3501
3571
|
|
3502
3572
|
##
|
@@ -3512,6 +3582,10 @@ module Google
|
|
3512
3582
|
# @param [Symbol] mode The field's mode. The possible values are
|
3513
3583
|
# `:nullable`, `:required`, and `:repeated`. The default value is
|
3514
3584
|
# `:nullable`.
|
3585
|
+
# @param [Array<String>, String] policy_tags The policy tag list or
|
3586
|
+
# single policy tag for the field. Policy tag identifiers are of
|
3587
|
+
# the form `projects/*/locations/*/taxonomies/*/policyTags/*`.
|
3588
|
+
# At most 1 policy tag is currently allowed.
|
3515
3589
|
#
|
3516
3590
|
# @example
|
3517
3591
|
# require "google/cloud/bigquery"
|
@@ -3523,8 +3597,8 @@ module Google
|
|
3523
3597
|
# end
|
3524
3598
|
#
|
3525
3599
|
# @!group Schema
|
3526
|
-
def datetime name, description: nil, mode: :nullable
|
3527
|
-
schema.datetime name, description: description, mode: mode
|
3600
|
+
def datetime name, description: nil, mode: :nullable, policy_tags: nil
|
3601
|
+
schema.datetime name, description: description, mode: mode, policy_tags: policy_tags
|
3528
3602
|
end
|
3529
3603
|
|
3530
3604
|
##
|
@@ -3540,6 +3614,10 @@ module Google
|
|
3540
3614
|
# @param [Symbol] mode The field's mode. The possible values are
|
3541
3615
|
# `:nullable`, `:required`, and `:repeated`. The default value is
|
3542
3616
|
# `:nullable`.
|
3617
|
+
# @param [Array<String>, String] policy_tags The policy tag list or
|
3618
|
+
# single policy tag for the field. Policy tag identifiers are of
|
3619
|
+
# the form `projects/*/locations/*/taxonomies/*/policyTags/*`.
|
3620
|
+
# At most 1 policy tag is currently allowed.
|
3543
3621
|
#
|
3544
3622
|
# @example
|
3545
3623
|
# require "google/cloud/bigquery"
|
@@ -3551,8 +3629,8 @@ module Google
|
|
3551
3629
|
# end
|
3552
3630
|
#
|
3553
3631
|
# @!group Schema
|
3554
|
-
def date name, description: nil, mode: :nullable
|
3555
|
-
schema.date name, description: description, mode: mode
|
3632
|
+
def date name, description: nil, mode: :nullable, policy_tags: nil
|
3633
|
+
schema.date name, description: description, mode: mode, policy_tags: policy_tags
|
3556
3634
|
end
|
3557
3635
|
|
3558
3636
|
##
|