BigQuery API - Class Google::Cloud::Bigquery::ExtractJob::Updater (v1.41.0)

Reference documentation and code samples for the BigQuery API class Google::Cloud::Bigquery::ExtractJob::Updater.

Yielded to a block to accumulate changes for an API request.

Methods

#cancel

def cancel()

#compression=

def compression=(value)

Sets the compression type. Not applicable when extracting models.

Parameter
  • value (String) — The compression type to use for exported files. Possible values include GZIP and NONE. The default value is NONE.

#delimiter=

def delimiter=(value)

Sets the field delimiter. Not applicable when extracting models.

Parameter
  • value (String) — Delimiter to use between fields in the exported data. Default is ,.

#format=

def format=(new_format)

Sets the destination file format. The default value for tables is csv. Tables with nested or repeated fields cannot be exported as CSV. The default value for models is ml_tf_saved_model.

Supported values for tables:

Supported values for models:

  • ml_tf_saved_model - TensorFlow SavedModel
  • ml_xgboost_booster - XGBoost Booster
Parameter
  • new_format (String) — The new source format.

#header=

def header=(value)

Print a header row in the exported file. Not applicable when extracting models.

Parameter
  • value (Boolean) — Whether to print out a header row in the results. Default is true.

#labels=

def labels=(value)

Sets the labels to use for the job.

Parameter
  • value (Hash) —

    A hash of user-provided labels associated with the job. You can use these to organize and group your jobs.

    The labels applied to a resource must meet the following requirements:

    • Each resource can have multiple labels, up to a maximum of 64.
    • Each label must be a key-value pair.
    • Keys have a minimum length of 1 character and a maximum length of 63 characters, and cannot be empty. Values can be empty, and have a maximum length of 63 characters.
    • Keys and values can contain only lowercase letters, numeric characters, underscores, and dashes. All characters must use UTF-8 encoding, and international characters are allowed.
    • The key portion of a label must be unique. However, you can use the same key with multiple resources.
    • Keys must start with a lowercase letter or international character.

#location=

def location=(value)

Sets the geographic location where the job should run. Required except for US and EU.

Parameter
  • value (String) — A geographic location, such as "US", "EU" or "asia-northeast1". Required except for US and EU.
Example
require "google/cloud/bigquery"

bigquery = Google::Cloud::Bigquery.new
dataset = bigquery.dataset "my_dataset"
table = dataset.table "my_table"

destination = "gs://my-bucket/file-name.csv"
extract_job = table.extract_job destination do |j|
  j.location = "EU"
end

extract_job.wait_until_done!
extract_job.done? #=> true

#refresh!

def refresh!()
Alias Of: #reload!

#reload!

def reload!()
Aliases

#rerun!

def rerun!()

#use_avro_logical_types=

def use_avro_logical_types=(value)

Indicate whether to enable extracting applicable column types (such as TIMESTAMP) to their corresponding AVRO logical types (timestamp-micros), instead of only using their raw types (avro-long).

Only used when #format is set to "AVRO" (#avro?).

Parameter
  • value (Boolean) — Whether applicable column types will use their corresponding AVRO logical types.

#wait_until_done!

def wait_until_done!()