google-cloud-bigquery 1.64.0 → 1.64.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6ecf06feb2dbf7b6ae67eb02660b8d994e2ec367d7000a5c3cc7752606b3b6d5
4
- data.tar.gz: 4ea541f6cc936f19f60a816f9c6159d48b6fed5488084a96757ec857d8198c7b
3
+ metadata.gz: 683ca461e78108a90ed5e1e33b284f5f53d0f70a6430fff2446452f2ac6ad551
4
+ data.tar.gz: 2d77aed359a89c0e4f1ce900d5bc29a46d82c0a4898778b4353d18759a2f9e5e
5
5
  SHA512:
6
- metadata.gz: 822e3f496d70d7b5bd8f079132345273435c01aba6eafb11490467312b2b45ac949838a290d9bc457bb095a6708ce96dc74f4d9a01cd3b5f44ec5b99dd10cfe9
7
- data.tar.gz: 5ca9a63ae1294459f9c35a974a43b4672f6d14572b81f105be1d036d5a8382a51b42dd302b084eb94a6395c68a6470e802cb67ea66496a613d27ad15fa7e7166
6
+ metadata.gz: 560155ede98638fadfab876963726cdb5351d29ba4bcfc48043ae55a8f0d3a8ef226af83f2b4bf839622a380ddda43edd9f8f6f03c9c636ec2b027361ee4fe04
7
+ data.tar.gz: f9901fa4efaca332b69489fac95052c4fabb5e48ee6de67cb791f82dfe8b178ea404e34a447f73ae85c09c06729cc49d6dacd4c086f367b455227c58e1240a26
data/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # Release History
2
2
 
3
+ ### 1.64.1 (2026-10-22)
4
+
5
+ #### Bug Fixes
6
+
7
+ * Avoid method redefinition warnings on require ([#36649](https://github.com/googleapis/google-cloud-ruby/issues/36649)) ([1373baf](https://github.com/googleapis/google-cloud-ruby/commit/1373bafc9f74534c99f2496cb376787ce8bafba4)), refs [#36647](https://github.com/googleapis/google-cloud-ruby/issues/36647)
8
+
3
9
  ### 1.64.0 (2026-05-11)
4
10
 
5
11
  #### Features
@@ -561,383 +561,6 @@ module Google
561
561
  raise ArgumentError, "Cannot modify external data source when frozen"
562
562
  end
563
563
  end
564
-
565
- ##
566
- # # BigtableSource::Column
567
- #
568
- # A Bigtable column to expose in the table schema along with its
569
- # types.
570
- #
571
- # @example
572
- # require "google/cloud/bigquery"
573
- #
574
- # bigquery = Google::Cloud::Bigquery.new
575
- #
576
- # bigtable_url = "https://googleapis.com/bigtable/projects/..."
577
- # bigtable_table = bigquery.external bigtable_url do |bt|
578
- # bt.rowkey_as_string = true
579
- # bt.add_family "user" do |u|
580
- # u.add_string "name"
581
- # u.add_string "email"
582
- # u.add_integer "age"
583
- # u.add_boolean "active"
584
- # end
585
- # end
586
- #
587
- # data = bigquery.query "SELECT * FROM my_ext_table",
588
- # external: { my_ext_table: bigtable_table }
589
- #
590
- # # Iterate over the first page of results
591
- # data.each do |row|
592
- # puts row[:name]
593
- # end
594
- # # Retrieve the next page of results
595
- # data = data.next if data.next?
596
- #
597
- class Column
598
- ##
599
- # @private Create an empty BigtableSource::Column object.
600
- def initialize
601
- @gapi = Google::Apis::BigqueryV2::BigtableColumn.new
602
- end
603
-
604
- ##
605
- # Qualifier of the column. Columns in the parent column family that
606
- # has this exact qualifier are exposed as `.` field. If the
607
- # qualifier is valid UTF-8 string, it will be represented as a UTF-8
608
- # string. Otherwise, it will represented as a ASCII-8BIT string.
609
- #
610
- # If the qualifier is not a valid BigQuery field identifier (does
611
- # not match `[a-zA-Z][a-zA-Z0-9_]*`) a valid identifier must be
612
- # provided as `field_name`.
613
- #
614
- # @return [String]
615
- #
616
- # @example
617
- # require "google/cloud/bigquery"
618
- #
619
- # bigquery = Google::Cloud::Bigquery.new
620
- #
621
- # bigtable_url = "https://googleapis.com/bigtable/projects/..."
622
- # bigtable_table = bigquery.external bigtable_url do |bt|
623
- # bt.add_family "user" do |u|
624
- # u.add_string "name" do |col|
625
- # col.qualifier # "user"
626
- # col.qualifier = "User"
627
- # col.qualifier # "User"
628
- # end
629
- # end
630
- # end
631
- #
632
- def qualifier
633
- @gapi.qualifier_string || Base64.strict_decode64(@gapi.qualifier_encoded.to_s)
634
- end
635
-
636
- ##
637
- # Set the qualifier of the column. Columns in the parent column
638
- # family that has this exact qualifier are exposed as `.` field.
639
- # Values that are valid UTF-8 strings will be treated as such. All
640
- # other values will be treated as `BINARY`.
641
- #
642
- # @param [String] new_qualifier New qualifier value
643
- #
644
- # @example
645
- # require "google/cloud/bigquery"
646
- #
647
- # bigquery = Google::Cloud::Bigquery.new
648
- #
649
- # bigtable_url = "https://googleapis.com/bigtable/projects/..."
650
- # bigtable_table = bigquery.external bigtable_url do |bt|
651
- # bt.add_family "user" do |u|
652
- # u.add_string "name" do |col|
653
- # col.qualifier # "user"
654
- # col.qualifier = "User"
655
- # col.qualifier # "User"
656
- # end
657
- # end
658
- # end
659
- #
660
- def qualifier= new_qualifier
661
- frozen_check!
662
- raise ArgumentError if new_qualifier.nil?
663
-
664
- utf8_qualifier = new_qualifier.encode Encoding::UTF_8
665
- if utf8_qualifier.valid_encoding?
666
- @gapi.qualifier_string = utf8_qualifier
667
- if @gapi.instance_variables.include? :@qualifier_encoded
668
- @gapi.remove_instance_variable :@qualifier_encoded
669
- end
670
- else
671
- @gapi.qualifier_encoded = Base64.strict_encode64 new_qualifier
672
- if @gapi.instance_variables.include? :@qualifier_string
673
- @gapi.remove_instance_variable :@qualifier_string
674
- end
675
- end
676
- rescue EncodingError
677
- @gapi.qualifier_encoded = Base64.strict_encode64 new_qualifier
678
- @gapi.remove_instance_variable :@qualifier_string if @gapi.instance_variables.include? :@qualifier_string
679
- end
680
-
681
- ##
682
- # The encoding of the values when the type is not `STRING`.
683
- #
684
- # @return [String]
685
- #
686
- # @example
687
- # require "google/cloud/bigquery"
688
- #
689
- # bigquery = Google::Cloud::Bigquery.new
690
- #
691
- # bigtable_url = "https://googleapis.com/bigtable/projects/..."
692
- # bigtable_table = bigquery.external bigtable_url do |bt|
693
- # bt.add_family "user" do |u|
694
- # u.add_bytes "name" do |col|
695
- # col.encoding = "TEXT"
696
- # col.encoding # "TEXT"
697
- # end
698
- # end
699
- # end
700
- #
701
- def encoding
702
- @gapi.encoding
703
- end
704
-
705
- ##
706
- # Set the encoding of the values when the type is not `STRING`.
707
- # Acceptable encoding values are:
708
- #
709
- # * `TEXT` - indicates values are alphanumeric text strings.
710
- # * `BINARY` - indicates values are encoded using HBase
711
- # `Bytes.toBytes` family of functions. This can be overridden on a
712
- # column.
713
- #
714
- # @param [String] new_encoding New encoding value
715
- #
716
- # @example
717
- # require "google/cloud/bigquery"
718
- #
719
- # bigquery = Google::Cloud::Bigquery.new
720
- #
721
- # bigtable_url = "https://googleapis.com/bigtable/projects/..."
722
- # bigtable_table = bigquery.external bigtable_url do |bt|
723
- # bt.add_family "user" do |u|
724
- # u.add_bytes "name" do |col|
725
- # col.encoding = "TEXT"
726
- # col.encoding # "TEXT"
727
- # end
728
- # end
729
- # end
730
- #
731
- def encoding= new_encoding
732
- frozen_check!
733
- @gapi.encoding = new_encoding
734
- end
735
-
736
- ##
737
- # If the qualifier is not a valid BigQuery field identifier (does
738
- # not match `[a-zA-Z][a-zA-Z0-9_]*`) a valid identifier must be
739
- # provided as the column field name and is used as field name in
740
- # queries.
741
- #
742
- # @return [String]
743
- #
744
- # @example
745
- # require "google/cloud/bigquery"
746
- #
747
- # bigquery = Google::Cloud::Bigquery.new
748
- #
749
- # bigtable_url = "https://googleapis.com/bigtable/projects/..."
750
- # bigtable_table = bigquery.external bigtable_url do |bt|
751
- # bt.add_family "user" do |u|
752
- # u.add_string "001_name", as: "user" do |col|
753
- # col.field_name # "user"
754
- # col.field_name = "User"
755
- # col.field_name # "User"
756
- # end
757
- # end
758
- # end
759
- #
760
- def field_name
761
- @gapi.field_name
762
- end
763
-
764
- ##
765
- # Sets the identifier to be used as the column field name in queries
766
- # when the qualifier is not a valid BigQuery field identifier (does
767
- # not match `[a-zA-Z][a-zA-Z0-9_]*`).
768
- #
769
- # @param [String] new_field_name New field_name value
770
- #
771
- # @example
772
- # require "google/cloud/bigquery"
773
- #
774
- # bigquery = Google::Cloud::Bigquery.new
775
- #
776
- # bigtable_url = "https://googleapis.com/bigtable/projects/..."
777
- # bigtable_table = bigquery.external bigtable_url do |bt|
778
- # bt.add_family "user" do |u|
779
- # u.add_string "001_name", as: "user" do |col|
780
- # col.field_name # "user"
781
- # col.field_name = "User"
782
- # col.field_name # "User"
783
- # end
784
- # end
785
- # end
786
- #
787
- def field_name= new_field_name
788
- frozen_check!
789
- @gapi.field_name = new_field_name
790
- end
791
-
792
- ##
793
- # Whether only the latest version of value in this column are
794
- # exposed. Can also be set at the column family level. However, this
795
- # value takes precedence when set at both levels.
796
- #
797
- # @return [Boolean]
798
- #
799
- # @example
800
- # require "google/cloud/bigquery"
801
- #
802
- # bigquery = Google::Cloud::Bigquery.new
803
- #
804
- # bigtable_url = "https://googleapis.com/bigtable/projects/..."
805
- # bigtable_table = bigquery.external bigtable_url do |bt|
806
- # bt.add_family "user" do |u|
807
- # u.add_string "name" do |col|
808
- # col.latest = true
809
- # col.latest # true
810
- # end
811
- # end
812
- # end
813
- #
814
- def latest
815
- @gapi.only_read_latest
816
- end
817
-
818
- ##
819
- # Set whether only the latest version of value in this column are
820
- # exposed. Can also be set at the column family level. However, this
821
- # value takes precedence when set at both levels.
822
- #
823
- # @param [Boolean] new_latest New latest value
824
- #
825
- # @example
826
- # require "google/cloud/bigquery"
827
- #
828
- # bigquery = Google::Cloud::Bigquery.new
829
- #
830
- # bigtable_url = "https://googleapis.com/bigtable/projects/..."
831
- # bigtable_table = bigquery.external bigtable_url do |bt|
832
- # bt.add_family "user" do |u|
833
- # u.add_string "name" do |col|
834
- # col.latest = true
835
- # col.latest # true
836
- # end
837
- # end
838
- # end
839
- #
840
- def latest= new_latest
841
- frozen_check!
842
- @gapi.only_read_latest = new_latest
843
- end
844
-
845
- ##
846
- # The type to convert the value in cells of this column. The values
847
- # are expected to be encoded using HBase `Bytes.toBytes` function
848
- # when using the `BINARY` encoding value. The following BigQuery
849
- # types are allowed:
850
- #
851
- # * `BYTES`
852
- # * `STRING`
853
- # * `INTEGER`
854
- # * `FLOAT`
855
- # * `BOOLEAN`
856
- #
857
- # Default type is `BYTES`. Can also be set at the column family
858
- # level. However, this value takes precedence when set at both
859
- # levels.
860
- #
861
- # @return [String]
862
- #
863
- # @example
864
- # require "google/cloud/bigquery"
865
- #
866
- # bigquery = Google::Cloud::Bigquery.new
867
- #
868
- # bigtable_url = "https://googleapis.com/bigtable/projects/..."
869
- # bigtable_table = bigquery.external bigtable_url do |bt|
870
- # bt.add_family "user" do |u|
871
- # u.add_string "name" do |col|
872
- # col.type # "STRING"
873
- # end
874
- # end
875
- # end
876
- #
877
- def type
878
- @gapi.type
879
- end
880
-
881
- ##
882
- # Set the type to convert the value in cells of this column. The
883
- # values are expected to be encoded using HBase `Bytes.toBytes`
884
- # function when using the `BINARY` encoding value. The following
885
- # BigQuery types are allowed:
886
- #
887
- # * `BYTES`
888
- # * `STRING`
889
- # * `INTEGER`
890
- # * `FLOAT`
891
- # * `BOOLEAN`
892
- #
893
- # Default type is `BYTES`. Can also be set at the column family
894
- # level. However, this value takes precedence when set at both
895
- # levels.
896
- #
897
- # @param [String] new_type New type value
898
- #
899
- # @example
900
- # require "google/cloud/bigquery"
901
- #
902
- # bigquery = Google::Cloud::Bigquery.new
903
- #
904
- # bigtable_url = "https://googleapis.com/bigtable/projects/..."
905
- # bigtable_table = bigquery.external bigtable_url do |bt|
906
- # bt.add_family "user" do |u|
907
- # u.add_string "name" do |col|
908
- # col.type # "STRING"
909
- # col.type = "BYTES"
910
- # col.type # "BYTES"
911
- # end
912
- # end
913
- # end
914
- #
915
- def type= new_type
916
- frozen_check!
917
- @gapi.type = new_type
918
- end
919
-
920
- ##
921
- # @private Google API Client object.
922
- def to_gapi
923
- @gapi
924
- end
925
-
926
- ##
927
- # @private Google API Client object.
928
- def self.from_gapi gapi
929
- new_col = new
930
- new_col.instance_variable_set :@gapi, gapi
931
- new_col
932
- end
933
-
934
- protected
935
-
936
- def frozen_check!
937
- return unless frozen?
938
- raise ArgumentError, "Cannot modify external data source when frozen"
939
- end
940
- end
941
564
  end
942
565
  end
943
566
  end
@@ -16,7 +16,7 @@
16
16
  module Google
17
17
  module Cloud
18
18
  module Bigquery
19
- VERSION = "1.64.0".freeze
19
+ VERSION = "1.64.1".freeze
20
20
  end
21
21
  end
22
22
  end
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.64.0
4
+ version: 1.64.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mike Moore