class Google::Cloud::Bigquery::CopyJob


copy_job.done? #=> true
copy_job.wait_until_done!
copy_job = table.copy_job destination_table
destination_table = dataset.table “my_destination_table”
table = dataset.table “my_table”
dataset = bigquery.dataset “my_dataset”
bigquery = Google::Cloud::Bigquery.new
require “google/cloud/bigquery”
@example
reference
@see cloud.google.com/bigquery/docs/reference/v2/jobs Jobs API
an Existing Table
@see cloud.google.com/bigquery/docs/tables#copy-table Copying
a {Table}. A CopyJob instance is created when you call {Table#copy_job}.
A {Job} subclass representing a copy operation that may be performed on
# CopyJob
#

def create_if_needed?

Returns:
  • (Boolean) - `true` when `CREATE_IF_NEEDED`, `false` otherwise.
def create_if_needed?
  disp = @gapi.configuration.copy.create_disposition
  disp == "CREATE_IF_NEEDED"
end

def create_never?

Returns:
  • (Boolean) - `true` when `CREATE_NEVER`, `false` otherwise.
def create_never?
  disp = @gapi.configuration.copy.create_disposition
  disp == "CREATE_NEVER"
end

def destination view: nil

Returns:
  • (Table) - A table instance.

Parameters:
  • view (String) -- Specifies the view that determines which table information is returned.
def destination view: nil
  table = @gapi.configuration.copy.destination_table
  return nil unless table
  retrieve_table table.project_id, table.dataset_id, table.table_id, metadata_view: view
end

def encryption

Returns:
  • (Google::Cloud::BigQuery::EncryptionConfiguration) - Custom
def encryption
  EncryptionConfiguration.from_gapi @gapi.configuration.copy.destination_encryption_configuration
end

def source view: nil

Returns:
  • (Table) - A table instance.

Parameters:
  • view (String) -- Specifies the view that determines which table information is returned.
def source view: nil
  table = @gapi.configuration.copy.source_table
  return nil unless table
  retrieve_table table.project_id, table.dataset_id, table.table_id, metadata_view: view
end

def write_append?

Returns:
  • (Boolean) - `true` when `WRITE_APPEND`, `false` otherwise.
def write_append?
  disp = @gapi.configuration.copy.write_disposition
  disp == "WRITE_APPEND"
end

def write_empty?

Returns:
  • (Boolean) - `true` when `WRITE_EMPTY`, `false` otherwise.
def write_empty?
  disp = @gapi.configuration.copy.write_disposition
  disp == "WRITE_EMPTY"
end

def write_truncate?

Returns:
  • (Boolean) - `true` when `WRITE_TRUNCATE`, `false` otherwise.
def write_truncate?
  disp = @gapi.configuration.copy.write_disposition
  disp == "WRITE_TRUNCATE"
end