Class: Google::Apis::BigqueryV2::JobConfiguration

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/bigquery_v2/classes.rb,
lib/google/apis/bigquery_v2/representations.rb,
lib/google/apis/bigquery_v2/representations.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ JobConfiguration

Returns a new instance of JobConfiguration.



5134
5135
5136
# File 'lib/google/apis/bigquery_v2/classes.rb', line 5134

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#copyGoogle::Apis::BigqueryV2::JobConfigurationTableCopy

JobConfigurationTableCopy configures a job that copies data from one table to another. For more information on copying tables, see Copy a table. Corresponds to the JSON property copy



5062
5063
5064
# File 'lib/google/apis/bigquery_v2/classes.rb', line 5062

def copy
  @copy
end

#dry_runBoolean Also known as: dry_run?

Optional. If set, don't actually run this job. A valid query will return a mostly empty response with some processing statistics, while an invalid query will return the same error it would if it wasn't a dry run. Behavior of non- query jobs is undefined. Corresponds to the JSON property dryRun

Returns:

  • (Boolean)


5070
5071
5072
# File 'lib/google/apis/bigquery_v2/classes.rb', line 5070

def dry_run
  @dry_run
end

#extractGoogle::Apis::BigqueryV2::JobConfigurationExtract

JobConfigurationExtract configures a job that exports data from a BigQuery table into Google Cloud Storage. Corresponds to the JSON property extract



5077
5078
5079
# File 'lib/google/apis/bigquery_v2/classes.rb', line 5077

def extract
  @extract
end

#job_timeout_msFixnum

Optional. Job timeout in milliseconds relative to the job creation time. If this time limit is exceeded, BigQuery attempts to stop the job, but might not always succeed in canceling it before the job completes. For example, a job that takes more than 60 seconds to complete has a better chance of being stopped than a job that takes 10 seconds to complete. Corresponds to the JSON property jobTimeoutMs

Returns:

  • (Fixnum)


5086
5087
5088
# File 'lib/google/apis/bigquery_v2/classes.rb', line 5086

def job_timeout_ms
  @job_timeout_ms
end

#job_typeString

Output only. The type of the job. Can be QUERY, LOAD, EXTRACT, COPY or UNKNOWN. Corresponds to the JSON property jobType

Returns:

  • (String)


5091
5092
5093
# File 'lib/google/apis/bigquery_v2/classes.rb', line 5091

def job_type
  @job_type
end

#labelsHash<String,String>

The labels associated with this job. You can use these to organize and group your jobs. Label keys and values can be no longer than 63 characters, can only contain lowercase letters, numeric characters, underscores and dashes. International characters are allowed. Label values are optional. Label keys must start with a letter and each label in the list must have a different key. Corresponds to the JSON property labels

Returns:

  • (Hash<String,String>)


5100
5101
5102
# File 'lib/google/apis/bigquery_v2/classes.rb', line 5100

def labels
  @labels
end

#loadGoogle::Apis::BigqueryV2::JobConfigurationLoad

JobConfigurationLoad contains the configuration properties for loading data into a destination table. Corresponds to the JSON property load



5106
5107
5108
# File 'lib/google/apis/bigquery_v2/classes.rb', line 5106

def load
  @load
end

#max_slotsFixnum

Optional. A target limit on the rate of slot consumption by this job. If set to a value > 0, BigQuery will attempt to limit the rate of slot consumption by this job to keep it below the configured limit, even if the job is eligible for more slots based on fair scheduling. The unused slots will be available for other jobs and queries to use. Note: This feature is not yet generally available. Corresponds to the JSON property maxSlots

Returns:

  • (Fixnum)


5116
5117
5118
# File 'lib/google/apis/bigquery_v2/classes.rb', line 5116

def max_slots
  @max_slots
end

#queryGoogle::Apis::BigqueryV2::JobConfigurationQuery

JobConfigurationQuery configures a BigQuery query job. Corresponds to the JSON property query



5121
5122
5123
# File 'lib/google/apis/bigquery_v2/classes.rb', line 5121

def query
  @query
end

#reservationString

Optional. The reservation that job would use. User can specify a reservation to execute the job. If reservation is not set, reservation is determined based on the rules defined by the reservation assignments. The expected format is projects/project/locations/location/reservations/reservation`. Forces the query to use on-demand billing when set tonone, which requires the project or organization to havereservation_override_modeset to ALLOW_ANY_OVERRIDE. Corresponds to the JSON propertyreservation`

Returns:

  • (String)


5132
5133
5134
# File 'lib/google/apis/bigquery_v2/classes.rb', line 5132

def reservation
  @reservation
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



5139
5140
5141
5142
5143
5144
5145
5146
5147
5148
5149
5150
# File 'lib/google/apis/bigquery_v2/classes.rb', line 5139

def update!(**args)
  @copy = args[:copy] if args.key?(:copy)
  @dry_run = args[:dry_run] if args.key?(:dry_run)
  @extract = args[:extract] if args.key?(:extract)
  @job_timeout_ms = args[:job_timeout_ms] if args.key?(:job_timeout_ms)
  @job_type = args[:job_type] if args.key?(:job_type)
  @labels = args[:labels] if args.key?(:labels)
  @load = args[:load] if args.key?(:load)
  @max_slots = args[:max_slots] if args.key?(:max_slots)
  @query = args[:query] if args.key?(:query)
  @reservation = args[:reservation] if args.key?(:reservation)
end