Class: Google::Apis::BigqueryV2::ExternalDataConfiguration

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) ⇒ ExternalDataConfiguration

Returns a new instance of ExternalDataConfiguration



949
950
951
# File 'generated/google/apis/bigquery_v2/classes.rb', line 949

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

Instance Attribute Details

#autodetectBoolean Also known as: autodetect?

Try to detect schema and format options automatically. Any option specified explicitly will be honored. Corresponds to the JSON property autodetect

Returns:

  • (Boolean)


874
875
876
# File 'generated/google/apis/bigquery_v2/classes.rb', line 874

def autodetect
  @autodetect
end

#bigtable_optionsGoogle::Apis::BigqueryV2::BigtableOptions

[Optional] Additional options if sourceFormat is set to BIGTABLE. Corresponds to the JSON property bigtableOptions



880
881
882
# File 'generated/google/apis/bigquery_v2/classes.rb', line 880

def bigtable_options
  @bigtable_options
end

#compressionString

[Optional] The compression type of the data source. Possible values include GZIP and NONE. The default value is NONE. This setting is ignored for Google Cloud Bigtable, Google Cloud Datastore backups and Avro formats. Corresponds to the JSON property compression

Returns:

  • (String)


887
888
889
# File 'generated/google/apis/bigquery_v2/classes.rb', line 887

def compression
  @compression
end

#csv_optionsGoogle::Apis::BigqueryV2::CsvOptions

Additional properties to set if sourceFormat is set to CSV. Corresponds to the JSON property csvOptions



892
893
894
# File 'generated/google/apis/bigquery_v2/classes.rb', line 892

def csv_options
  @csv_options
end

#google_sheets_optionsGoogle::Apis::BigqueryV2::GoogleSheetsOptions

[Optional] Additional options if sourceFormat is set to GOOGLE_SHEETS. Corresponds to the JSON property googleSheetsOptions



897
898
899
# File 'generated/google/apis/bigquery_v2/classes.rb', line 897

def google_sheets_options
  @google_sheets_options
end

#ignore_unknown_valuesBoolean Also known as: ignore_unknown_values?

[Optional] Indicates if BigQuery should allow extra values that are not represented in the table schema. If true, the extra values are ignored. If false, records with extra columns are treated as bad records, and if there are too many bad records, an invalid error is returned in the job result. The default value is false. The sourceFormat property determines what BigQuery treats as an extra value: CSV: Trailing columns JSON: Named values that don't match any column names Google Cloud Bigtable: This setting is ignored. Google Cloud Datastore backups: This setting is ignored. Avro: This setting is ignored. Corresponds to the JSON property ignoreUnknownValues

Returns:

  • (Boolean)


910
911
912
# File 'generated/google/apis/bigquery_v2/classes.rb', line 910

def ignore_unknown_values
  @ignore_unknown_values
end

#max_bad_recordsFixnum

[Optional] The maximum number of bad records that BigQuery can ignore when reading data. If the number of bad records exceeds this value, an invalid error is returned in the job result. The default value is 0, which requires that all records are valid. This setting is ignored for Google Cloud Bigtable, Google Cloud Datastore backups and Avro formats. Corresponds to the JSON property maxBadRecords

Returns:

  • (Fixnum)


920
921
922
# File 'generated/google/apis/bigquery_v2/classes.rb', line 920

def max_bad_records
  @max_bad_records
end

#schemaGoogle::Apis::BigqueryV2::TableSchema

[Optional] The schema for the data. Schema is required for CSV and JSON formats. Schema is disallowed for Google Cloud Bigtable, Cloud Datastore backups, and Avro formats. Corresponds to the JSON property schema



927
928
929
# File 'generated/google/apis/bigquery_v2/classes.rb', line 927

def schema
  @schema
end

#source_formatString

[Required] The data format. For CSV files, specify "CSV". For Google sheets, specify "GOOGLE_SHEETS". For newline-delimited JSON, specify " NEWLINE_DELIMITED_JSON". For Avro files, specify "AVRO". For Google Cloud Datastore backups, specify "DATASTORE_BACKUP". [Beta] For Google Cloud Bigtable, specify "BIGTABLE". Corresponds to the JSON property sourceFormat

Returns:

  • (String)


936
937
938
# File 'generated/google/apis/bigquery_v2/classes.rb', line 936

def source_format
  @source_format
end

#source_urisArray<String>

[Required] The fully-qualified URIs that point to your data in Google Cloud. For Google Cloud Storage URIs: Each URI can contain one '' wildcard character and it must come after the 'bucket' name. Size limits related to load jobs apply to external data sources. For Google Cloud Bigtable URIs: Exactly one URI can be specified and it has be a fully specified and valid HTTPS URL for a Google Cloud Bigtable table. For Google Cloud Datastore backups, exactly one URI can be specified. Also, the '' wildcard character is not allowed. Corresponds to the JSON property sourceUris

Returns:

  • (Array<String>)


947
948
949
# File 'generated/google/apis/bigquery_v2/classes.rb', line 947

def source_uris
  @source_uris
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



954
955
956
957
958
959
960
961
962
963
964
965
# File 'generated/google/apis/bigquery_v2/classes.rb', line 954

def update!(**args)
  @autodetect = args[:autodetect] if args.key?(:autodetect)
  @bigtable_options = args[:bigtable_options] if args.key?(:bigtable_options)
  @compression = args[:compression] if args.key?(:compression)
  @csv_options = args[:csv_options] if args.key?(:csv_options)
  @google_sheets_options = args[:google_sheets_options] if args.key?(:google_sheets_options)
  @ignore_unknown_values = args[:ignore_unknown_values] if args.key?(:ignore_unknown_values)
  @max_bad_records = args[:max_bad_records] if args.key?(:max_bad_records)
  @schema = args[:schema] if args.key?(:schema)
  @source_format = args[:source_format] if args.key?(:source_format)
  @source_uris = args[:source_uris] if args.key?(:source_uris)
end