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


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
data source.
loading or streaming the data, this object references the external
directly, even though the data is not stored in BigQuery. Instead of
represents a Bigtable external data source that can be queried from
{External::BigtableSource} is a subclass of {External::DataSource} and
# BigtableSource
#

def self.from_gapi gapi

Other tags:
    Private: - Google API Client object.
def self.from_gapi gapi
  new_table = super
  families = Array gapi.bigtable_options.column_families
  families = families.map { |fam_gapi| BigtableSource::ColumnFamily.from_gapi fam_gapi }
  new_table.instance_variable_set :@families, families
  new_table
end

def add_family family_id, encoding: nil, latest: nil, type: nil

Returns:
  • (BigtableSource::ColumnFamily) -

Other tags:
    Yieldparam: family - the family object

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

Parameters:
  • type (String) -- The type to convert the value in cells of this
  • latest (Boolean) -- Whether only the latest version of value are
  • encoding (String) -- The encoding of the values when the type is
  • family_id (String) -- Identifier of the column family. See
def add_family family_id, encoding: nil, latest: nil, type: nil
  frozen_check!
  fam = BigtableSource::ColumnFamily.new
  fam.family_id = family_id
  fam.encoding = encoding if encoding
  fam.latest = latest if latest
  fam.type = type if type
  yield fam if block_given?
  @families << fam
  fam
end

def families

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

def freeze

Other tags:
    Private: -
def freeze
  @families.map(&:freeze!)
  @families.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 object.
def initialize
  super
  @gapi.bigtable_options = Google::Apis::BigqueryV2::BigtableOptions.new
  @families = []
end

def rowkey_as_string

Returns:
  • (Boolean) -
def rowkey_as_string
  @gapi.bigtable_options.read_rowkey_as_string
end

def rowkey_as_string= row_rowkey

Parameters:
  • row_rowkey (Boolean) -- New rowkey_as_string value
def rowkey_as_string= row_rowkey
  frozen_check!
  @gapi.bigtable_options.read_rowkey_as_string = row_rowkey
end

def to_gapi

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