Class: Google::Apis::BigqueryV2::JobConfigurationExtract

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Core::JsonObjectSupport

#to_json

Methods included from Core::Hashable

process_value, #to_h

Constructor Details

#initialize(**args) ⇒ JobConfigurationExtract

Returns a new instance of JobConfigurationExtract.


2795
2796
2797
# File 'generated/google/apis/bigquery_v2/classes.rb', line 2795

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

Instance Attribute Details

#compressionString

[Optional] The compression type to use for exported files. Possible values include GZIP, DEFLATE, SNAPPY, and NONE. The default value is NONE. DEFLATE and SNAPPY are only supported for Avro. Not applicable when extracting models. Corresponds to the JSON property compression

Returns:

  • (String)

2739
2740
2741
# File 'generated/google/apis/bigquery_v2/classes.rb', line 2739

def compression
  @compression
end

#destination_formatString

[Optional] The exported file format. Possible values include CSV, NEWLINE_DELIMITED_JSON or AVRO for tables and ML_TF_SAVED_MODEL or ML_XGBOOST_BOOSTER for models. 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. Corresponds to the JSON property destinationFormat

Returns:

  • (String)

2748
2749
2750
# File 'generated/google/apis/bigquery_v2/classes.rb', line 2748

def destination_format
  @destination_format
end

#destination_uriString

[Pick one] DEPRECATED: Use destinationUris instead, passing only one URI as necessary. The fully-qualified Google Cloud Storage URI where the extracted table should be written. Corresponds to the JSON property destinationUri

Returns:

  • (String)

2755
2756
2757
# File 'generated/google/apis/bigquery_v2/classes.rb', line 2755

def destination_uri
  @destination_uri
end

#destination_urisArray<String>

[Pick one] A list of fully-qualified Google Cloud Storage URIs where the extracted table should be written. Corresponds to the JSON property destinationUris

Returns:

  • (Array<String>)

2761
2762
2763
# File 'generated/google/apis/bigquery_v2/classes.rb', line 2761

def destination_uris
  @destination_uris
end

#field_delimiterString

[Optional] Delimiter to use between fields in the exported data. Default is ',' . Not applicable when extracting models. Corresponds to the JSON property fieldDelimiter

Returns:

  • (String)

2767
2768
2769
# File 'generated/google/apis/bigquery_v2/classes.rb', line 2767

def field_delimiter
  @field_delimiter
end

[Optional] Whether to print out a header row in the results. Default is true. Not applicable when extracting models. Corresponds to the JSON property printHeader

Returns:

  • (Boolean)

2773
2774
2775
# File 'generated/google/apis/bigquery_v2/classes.rb', line 2773

def print_header
  @print_header
end

#source_modelGoogle::Apis::BigqueryV2::ModelReference

A reference to the model being exported. Corresponds to the JSON property sourceModel


2779
2780
2781
# File 'generated/google/apis/bigquery_v2/classes.rb', line 2779

def source_model
  @source_model
end

#source_tableGoogle::Apis::BigqueryV2::TableReference

A reference to the table being exported. Corresponds to the JSON property sourceTable


2784
2785
2786
# File 'generated/google/apis/bigquery_v2/classes.rb', line 2784

def source_table
  @source_table
end

#use_avro_logical_typesBoolean Also known as: use_avro_logical_types?

[Optional] If destinationFormat is set to "AVRO", this flag indicates 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). Not applicable when extracting models. Corresponds to the JSON property useAvroLogicalTypes

Returns:

  • (Boolean)

2792
2793
2794
# File 'generated/google/apis/bigquery_v2/classes.rb', line 2792

def use_avro_logical_types
  @use_avro_logical_types
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object


2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
# File 'generated/google/apis/bigquery_v2/classes.rb', line 2800

def update!(**args)
  @compression = args[:compression] if args.key?(:compression)
  @destination_format = args[:destination_format] if args.key?(:destination_format)
  @destination_uri = args[:destination_uri] if args.key?(:destination_uri)
  @destination_uris = args[:destination_uris] if args.key?(:destination_uris)
  @field_delimiter = args[:field_delimiter] if args.key?(:field_delimiter)
  @print_header = args[:print_header] if args.key?(:print_header)
  @source_model = args[:source_model] if args.key?(:source_model)
  @source_table = args[:source_table] if args.key?(:source_table)
  @use_avro_logical_types = args[:use_avro_logical_types] if args.key?(:use_avro_logical_types)
end