class Google::Cloud::Bigquery::External::BigtableSource::ColumnFamily


data = data.next if data.next?
# Retrieve the next page of results
end
puts row[:name]
data.each do |row|
# Iterate over the first page of results
external: { my_ext_table: bigtable_table }
data = bigquery.query “SELECT * FROM my_ext_table”,
end
end
u.add_boolean “active”
u.add_integer “age”
u.add_string “email”
u.add_string “name”
bt.add_family “user” do |u|
bt.rowkey_as_string = true
bigtable_table = bigquery.external bigtable_url do |bt|
bigtable_url = “googleapis.com/bigtable/projects/…”
bigquery = Google::Cloud::Bigquery.new
require “google/cloud/bigquery”
@example
with its types and columns.
A Bigtable column family used to expose in the table schema along
# BigtableSource::ColumnFamily
#

def self.from_gapi gapi

Other tags:
    Private: - Google API Client object.
def self.from_gapi gapi
  new_fam = new
  new_fam.instance_variable_set :@gapi, gapi
  columns = Array(gapi.columns).map { |col_gapi| BigtableSource::Column.from_gapi col_gapi }
  new_fam.instance_variable_set :@columns, columns
  new_fam
end

def add_boolean qualifier, as: nil

Returns:
  • (Array) -

Other tags:
    Yieldparam: column - the column object

Other tags:
    Yield: - a block for setting the column

Parameters:
  • as (String) -- A valid identifier to be used as the column
  • qualifier (String) -- Qualifier of the column. See
def add_boolean qualifier, as: nil
  col = add_column qualifier, as: as, type: "BOOLEAN"
  yield col if block_given?
  col
end

def add_bytes qualifier, as: nil

Returns:
  • (Array) -

Other tags:
    Yieldparam: column - the column object

Other tags:
    Yield: - a block for setting the column

Parameters:
  • as (String) -- A valid identifier to be used as the column
  • qualifier (String) -- Qualifier of the column. See
def add_bytes qualifier, as: nil
  col = add_column qualifier, as: as, type: "BYTES"
  yield col if block_given?
  col
end

def add_column qualifier, as: nil, type: nil

Returns:
  • (Array) -

Other tags:
    Yieldparam: column - the column object

Other tags:
    Yield: - a block for setting the column

Parameters:
  • type (String) -- The type to convert the value in cells of
  • as (String) -- A valid identifier to be used as the column
  • qualifier (String) -- Qualifier of the column. See
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

def add_float qualifier, as: nil

Returns:
  • (Array) -

Other tags:
    Yieldparam: column - the column object

Other tags:
    Yield: - a block for setting the column

Parameters:
  • as (String) -- A valid identifier to be used as the column
  • qualifier (String) -- Qualifier of the column. See
def add_float qualifier, as: nil
  col = add_column qualifier, as: as, type: "FLOAT"
  yield col if block_given?
  col
end

def add_integer qualifier, as: nil

Returns:
  • (Array) -

Other tags:
    Yieldparam: column - the column object

Other tags:
    Yield: - a block for setting the column

Parameters:
  • as (String) -- A valid identifier to be used as the column
  • qualifier (String) -- Qualifier of the column. See
def add_integer qualifier, as: nil
  col = add_column qualifier, as: as, type: "INTEGER"
  yield col if block_given?
  col
end

def add_string qualifier, as: nil

Returns:
  • (Array) -

Other tags:
    Yieldparam: column - the column object

Other tags:
    Yield: - a block for setting the column

Parameters:
  • as (String) -- A valid identifier to be used as the column
  • qualifier (String) -- Qualifier of the column. See
def add_string qualifier, as: nil
  col = add_column qualifier, as: as, type: "STRING"
  yield col if block_given?
  col
end

def columns

Returns:
  • (Array) -
def columns
  @columns
end

def encoding

Returns:
  • (String) -
def encoding
  @gapi.encoding
end

def encoding= new_encoding

Parameters:
  • new_encoding (String) -- New encoding value
def encoding= new_encoding
  frozen_check!
  @gapi.encoding = new_encoding
end

def family_id

Returns:
  • (String) -
def family_id
  @gapi.family_id
end

def family_id= new_family_id

Parameters:
  • new_family_id (String) -- New family_id value
def family_id= new_family_id
  frozen_check!
  @gapi.family_id = new_family_id
end

def freeze

Other tags:
    Private: -
def freeze
  @columns.map(&:freeze!)
  @columns.freeze!
  super
end

def frozen_check!

def frozen_check!
  return unless frozen?
  raise ArgumentError, "Cannot modify external data source when frozen"
end

def initialize

Other tags:
    Private: - Create an empty BigtableSource::ColumnFamily object.
def initialize
  @gapi = Google::Apis::BigqueryV2::BigtableColumnFamily.new
  @columns = []
end

def latest

Returns:
  • (Boolean) -
def latest
  @gapi.only_read_latest
end

def latest= new_latest

Parameters:
  • new_latest (Boolean) -- New latest value
def latest= new_latest
  frozen_check!
  @gapi.only_read_latest = new_latest
end

def to_gapi

Other tags:
    Private: - Google API Client object.
def to_gapi
  @gapi.columns = @columns.map(&:to_gapi)
  @gapi
end

def type

Returns:
  • (String) -
def type
  @gapi.type
end

def type= new_type

Parameters:
  • new_type (String) -- New type value
def type= new_type
  frozen_check!
  @gapi.type = new_type
end