Class: Google::Cloud::Bigquery::ExtractJob::Updater
- Inherits:
-
Google::Cloud::Bigquery::ExtractJob
- Object
- Job
- Google::Cloud::Bigquery::ExtractJob
- Google::Cloud::Bigquery::ExtractJob::Updater
- Defined in:
- lib/google/cloud/bigquery/extract_job.rb
Overview
Yielded to a block to accumulate changes for an API request.
Attributes collapse
- #cancel ⇒ Object
-
#compression=(value) ⇒ Object
Sets the compression type.
-
#delimiter=(value) ⇒ Object
Sets the field delimiter.
-
#format=(new_format) ⇒ Object
Sets the destination file format.
-
#header=(value) ⇒ Object
Print a header row in the exported file.
-
#labels=(value) ⇒ Object
Sets the labels to use for the job.
-
#location=(value) ⇒ Object
Sets the geographic location where the job should run.
- #reload! ⇒ Object (also: #refresh!)
- #rerun! ⇒ Object
-
#reservation=(value) ⇒ Object
Sets the reservation that job would use.
-
#use_avro_logical_types=(value) ⇒ Object
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). - #wait_until_done! ⇒ Object
Methods inherited from Google::Cloud::Bigquery::ExtractJob
#avro?, #compression?, #csv?, #delimiter, #destinations, #destinations_counts, #destinations_file_counts, #json?, #ml_tf_saved_model?, #ml_xgboost_booster?, #model?, #print_header?, #source, #table?, #use_avro_logical_types?
Methods inherited from Job
#configuration, #created_at, #delete, #done?, #ended_at, #error, #errors, #failed?, #job_id, #labels, #location, #num_child_jobs, #parent_job_id, #pending?, #project_id, #reservation_usage, #running?, #script_statistics, #session_id, #started_at, #state, #statistics, #status, #transaction_id, #user_email
Instance Method Details
#cancel ⇒ Object
454 455 456 |
# File 'lib/google/cloud/bigquery/extract_job.rb', line 454 def cancel raise "not implemented in #{self.class}" end |
#compression=(value) ⇒ Object
Sets the compression type. Not applicable when extracting models.
349 350 351 |
# File 'lib/google/cloud/bigquery/extract_job.rb', line 349 def compression= value @gapi.configuration.extract.compression = value end |
#delimiter=(value) ⇒ Object
Sets the field delimiter. Not applicable when extracting models.
360 361 362 |
# File 'lib/google/cloud/bigquery/extract_job.rb', line 360 def delimiter= value @gapi.configuration.extract.field_delimiter = value end |
#format=(new_format) ⇒ Object
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:
csv- CSVjson- Newline-delimited JSONavro- Avro
Supported values for models:
ml_tf_saved_model- TensorFlow SavedModelml_xgboost_booster- XGBoost Booster
384 385 386 |
# File 'lib/google/cloud/bigquery/extract_job.rb', line 384 def format= new_format @gapi.configuration.extract.update! destination_format: Convert.source_format(new_format) end |
#header=(value) ⇒ Object
Print a header row in the exported file. Not applicable when extracting models.
396 397 398 |
# File 'lib/google/cloud/bigquery/extract_job.rb', line 396 def header= value @gapi.configuration.extract.print_header = value end |
#labels=(value) ⇒ Object
Sets the labels to use for the job.
422 423 424 |
# File 'lib/google/cloud/bigquery/extract_job.rb', line 422 def labels= value @gapi.configuration.update! labels: value end |
#location=(value) ⇒ Object
Sets the geographic location where the job should run. Required except for US and EU.
332 333 334 335 336 337 338 339 |
# File 'lib/google/cloud/bigquery/extract_job.rb', line 332 def location= value @gapi.job_reference.location = value return unless value.nil? # Treat assigning value of nil the same as unsetting the value. unset = @gapi.job_reference.instance_variables.include? :@location @gapi.job_reference.remove_instance_variable :@location if unset end |
#reload! ⇒ Object Also known as: refresh!
462 463 464 |
# File 'lib/google/cloud/bigquery/extract_job.rb', line 462 def reload! raise "not implemented in #{self.class}" end |
#rerun! ⇒ Object
458 459 460 |
# File 'lib/google/cloud/bigquery/extract_job.rb', line 458 def rerun! raise "not implemented in #{self.class}" end |
#reservation=(value) ⇒ Object
Sets 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``.
450 451 452 |
# File 'lib/google/cloud/bigquery/extract_job.rb', line 450 def reservation= value @gapi.configuration.update! reservation: value end |
#use_avro_logical_types=(value) ⇒ Object
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?).
438 439 440 |
# File 'lib/google/cloud/bigquery/extract_job.rb', line 438 def use_avro_logical_types= value @gapi.configuration.extract.use_avro_logical_types = value end |
#wait_until_done! ⇒ Object
467 468 469 |
# File 'lib/google/cloud/bigquery/extract_job.rb', line 467 def wait_until_done! raise "not implemented in #{self.class}" end |