lib/google/cloud/bigquery/copy_job.rb in google-cloud-bigquery-1.40.0 vs lib/google/cloud/bigquery/copy_job.rb in google-cloud-bigquery-1.41.0
- old
+ new
@@ -62,26 +62,38 @@
class CopyJob < Job
##
# The table from which data is copied. This is the table on
# which {Table#copy_job} was called.
#
+ # @param [String] view Specifies the view that determines which table information is returned.
+ # By default, basic table information and storage statistics (STORAGE_STATS) are returned.
+ # Accepted values include `:unspecified`, `:basic`, `:storage`, and
+ # `:full`. For more information, see [BigQuery Classes](@todo: Update the link).
+ # The default value is the `:unspecified` view type.
+ #
# @return [Table] A table instance.
#
- def source
+ 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
+ retrieve_table table.project_id, table.dataset_id, table.table_id, metadata_view: view
end
##
# The table to which data is copied.
#
+ # @param [String] view Specifies the view that determines which table information is returned.
+ # By default, basic table information and storage statistics (STORAGE_STATS) are returned.
+ # Accepted values include `:unspecified`, `:basic`, `:storage`, and
+ # `:full`. For more information, see [BigQuery Classes](@todo: Update the link).
+ # The default value is the `:unspecified` view type.
+ #
# @return [Table] A table instance.
#
- def destination
+ 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
+ retrieve_table table.project_id, table.dataset_id, table.table_id, metadata_view: view
end
##
# Checks if the create disposition for the job is `CREATE_IF_NEEDED`,
# which provides the following behavior: If the table does not exist,