Class: Google::Cloud::Bigquery::External::BigtableSource::ColumnFamily
- Inherits:
-
Object
- Object
- Google::Cloud::Bigquery::External::BigtableSource::ColumnFamily
- Defined in:
- lib/google/cloud/bigquery/external/bigtable_source/column_family.rb
Overview
BigtableSource::ColumnFamily
A Bigtable column family used to expose in the table schema along with its types and columns.
Instance Method Summary collapse
-
#add_boolean(qualifier, as: nil) {|column| ... } ⇒ Array<BigtableSource::Column>
Add a column to the column family to expose in the table schema that is specified as the
BOOLEAN
type. -
#add_bytes(qualifier, as: nil) {|column| ... } ⇒ Array<BigtableSource::Column>
Add a column to the column family to expose in the table schema that is specified as the
BYTES
type. -
#add_column(qualifier, as: nil, type: nil) {|column| ... } ⇒ Array<BigtableSource::Column>
Add a column to the column family to expose in the table schema along with its types.
-
#add_float(qualifier, as: nil) {|column| ... } ⇒ Array<BigtableSource::Column>
Add a column to the column family to expose in the table schema that is specified as the
FLOAT
type. -
#add_integer(qualifier, as: nil) {|column| ... } ⇒ Array<BigtableSource::Column>
Add a column to the column family to expose in the table schema that is specified as the
INTEGER
type. -
#add_string(qualifier, as: nil) {|column| ... } ⇒ Array<BigtableSource::Column>
Add a column to the column family to expose in the table schema that is specified as the
STRING
type. -
#columns ⇒ Array<BigtableSource::Column>
Lists of columns that should be exposed as individual fields.
-
#encoding ⇒ String
The encoding of the values when the type is not
STRING
. -
#encoding=(new_encoding) ⇒ Object
Set the encoding of the values when the type is not
STRING
. -
#family_id ⇒ String
Identifier of the column family.
-
#family_id=(new_family_id) ⇒ Object
Set the identifier of the column family.
-
#latest ⇒ Boolean
Whether only the latest version of value are exposed for all columns in this column family.
-
#latest=(new_latest) ⇒ Object
Set whether only the latest version of value are exposed for all columns in this column family.
-
#type ⇒ String
The type to convert the value in cells of this column family.
-
#type=(new_type) ⇒ Object
Set the type to convert the value in cells of this column family.
Instance Method Details
#add_boolean(qualifier, as: nil) {|column| ... } ⇒ Array<BigtableSource::Column>
Add a column to the column family to expose in the table schema
that is specified as the BOOLEAN
type.
526 527 528 529 530 |
# File 'lib/google/cloud/bigquery/external/bigtable_source/column_family.rb', line 526 def add_boolean qualifier, as: nil col = add_column qualifier, as: as, type: "BOOLEAN" yield col if block_given? col end |
#add_bytes(qualifier, as: nil) {|column| ... } ⇒ Array<BigtableSource::Column>
Add a column to the column family to expose in the table schema
that is specified as the BYTES
type.
386 387 388 389 390 |
# File 'lib/google/cloud/bigquery/external/bigtable_source/column_family.rb', line 386 def add_bytes qualifier, as: nil col = add_column qualifier, as: as, type: "BYTES" yield col if block_given? col end |
#add_column(qualifier, as: nil, type: nil) {|column| ... } ⇒ Array<BigtableSource::Column>
Add a column to the column family to expose in the table schema along with its types.
BYTES
STRING
INTEGER
FLOAT
BOOLEAN
346 347 348 349 350 351 352 353 354 355 |
# File 'lib/google/cloud/bigquery/external/bigtable_source/column_family.rb', line 346 def add_column qualifier, as: nil, type: nil frozen_check! col = BigtableSource::Column.new col.qualifier = qualifier col.field_name = as if as col.type = type if type yield col if block_given? @columns << col col end |
#add_float(qualifier, as: nil) {|column| ... } ⇒ Array<BigtableSource::Column>
Add a column to the column family to expose in the table schema
that is specified as the FLOAT
type.
491 492 493 494 495 |
# File 'lib/google/cloud/bigquery/external/bigtable_source/column_family.rb', line 491 def add_float qualifier, as: nil col = add_column qualifier, as: as, type: "FLOAT" yield col if block_given? col end |
#add_integer(qualifier, as: nil) {|column| ... } ⇒ Array<BigtableSource::Column>
Add a column to the column family to expose in the table schema
that is specified as the INTEGER
type.
456 457 458 459 460 |
# File 'lib/google/cloud/bigquery/external/bigtable_source/column_family.rb', line 456 def add_integer qualifier, as: nil col = add_column qualifier, as: as, type: "INTEGER" yield col if block_given? col end |
#add_string(qualifier, as: nil) {|column| ... } ⇒ Array<BigtableSource::Column>
Add a column to the column family to expose in the table schema
that is specified as the STRING
type.
421 422 423 424 425 |
# File 'lib/google/cloud/bigquery/external/bigtable_source/column_family.rb', line 421 def add_string qualifier, as: nil col = add_column qualifier, as: as, type: "STRING" yield col if block_given? col end |
#columns ⇒ Array<BigtableSource::Column>
Lists of columns that should be exposed as individual fields.
304 305 306 |
# File 'lib/google/cloud/bigquery/external/bigtable_source/column_family.rb', line 304 def columns @columns end |
#encoding ⇒ String
The encoding of the values when the type is not STRING
.
84 85 86 |
# File 'lib/google/cloud/bigquery/external/bigtable_source/column_family.rb', line 84 def encoding @gapi.encoding end |
#encoding=(new_encoding) ⇒ Object
Set the encoding of the values when the type is not STRING
.
Acceptable encoding values are:
TEXT
- indicates values are alphanumeric text strings.BINARY
- indicates values are encoded using HBaseBytes.toBytes
family of functions. This can be overridden on a column.
113 114 115 116 |
# File 'lib/google/cloud/bigquery/external/bigtable_source/column_family.rb', line 113 def encoding= new_encoding frozen_check! @gapi.encoding = new_encoding end |
#family_id ⇒ String
Identifier of the column family.
135 136 137 |
# File 'lib/google/cloud/bigquery/external/bigtable_source/column_family.rb', line 135 def family_id @gapi.family_id end |
#family_id=(new_family_id) ⇒ Object
Set the identifier of the column family.
158 159 160 161 |
# File 'lib/google/cloud/bigquery/external/bigtable_source/column_family.rb', line 158 def family_id= new_family_id frozen_check! @gapi.family_id = new_family_id end |
#latest ⇒ Boolean
Whether only the latest version of value are exposed for all columns in this column family.
183 184 185 |
# File 'lib/google/cloud/bigquery/external/bigtable_source/column_family.rb', line 183 def latest @gapi.only_read_latest end |
#latest=(new_latest) ⇒ Object
Set whether only the latest version of value are exposed for all columns in this column family.
207 208 209 210 |
# File 'lib/google/cloud/bigquery/external/bigtable_source/column_family.rb', line 207 def latest= new_latest frozen_check! @gapi.only_read_latest = new_latest end |
#type ⇒ String
The type to convert the value in cells of this column family. The
values are expected to be encoded using HBase Bytes.toBytes
function when using the BINARY
encoding value. The following
BigQuery types are allowed:
BYTES
STRING
INTEGER
FLOAT
BOOLEAN
Default type is BYTES
. This can be overridden on a column.
242 243 244 |
# File 'lib/google/cloud/bigquery/external/bigtable_source/column_family.rb', line 242 def type @gapi.type end |
#type=(new_type) ⇒ Object
Set the type to convert the value in cells of this column family.
The values are expected to be encoded using HBase Bytes.toBytes
function when using the BINARY
encoding value. The following
BigQuery types are allowed:
BYTES
STRING
INTEGER
FLOAT
BOOLEAN
Default type is BYTES
. This can be overridden on a column.
276 277 278 279 |
# File 'lib/google/cloud/bigquery/external/bigtable_source/column_family.rb', line 276 def type= new_type frozen_check! @gapi.type = new_type end |