Class: Google::Apis::AlloydbV1alpha::CsvImportOptions

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

Overview

Options for importing data in CSV format.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ CsvImportOptions

Returns a new instance of CsvImportOptions.



1275
1276
1277
# File 'lib/google/apis/alloydb_v1alpha/classes.rb', line 1275

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

Instance Attribute Details

#columnsArray<String>

Optional. The columns to which CSV data is imported. If not specified, all columns of the database table are loaded with CSV data. Corresponds to the JSON property columns

Returns:

  • (Array<String>)


1247
1248
1249
# File 'lib/google/apis/alloydb_v1alpha/classes.rb', line 1247

def columns
  @columns
end

#escape_characterString

Optional. Specifies the character that should appear before a data character that needs to be escaped. The default is same as quote character. The value of this argument has to be a character in Hex ASCII Code. Corresponds to the JSON property escapeCharacter

Returns:

  • (String)


1254
1255
1256
# File 'lib/google/apis/alloydb_v1alpha/classes.rb', line 1254

def escape_character
  @escape_character
end

#field_delimiterString

Optional. Specifies the character that separates columns within each row (line) of the file. The default is comma. The value of this argument has to be a character in Hex ASCII Code. Corresponds to the JSON property fieldDelimiter

Returns:

  • (String)


1261
1262
1263
# File 'lib/google/apis/alloydb_v1alpha/classes.rb', line 1261

def field_delimiter
  @field_delimiter
end

#quote_characterString

Optional. Specifies the quoting character to be used when a data value is quoted. The default is double-quote. The value of this argument has to be a character in Hex ASCII Code. Corresponds to the JSON property quoteCharacter

Returns:

  • (String)


1268
1269
1270
# File 'lib/google/apis/alloydb_v1alpha/classes.rb', line 1268

def quote_character
  @quote_character
end

#tableString

Required. The database table to import CSV file into. Corresponds to the JSON property table

Returns:

  • (String)


1273
1274
1275
# File 'lib/google/apis/alloydb_v1alpha/classes.rb', line 1273

def table
  @table
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1280
1281
1282
1283
1284
1285
1286
# File 'lib/google/apis/alloydb_v1alpha/classes.rb', line 1280

def update!(**args)
  @columns = args[:columns] if args.key?(:columns)
  @escape_character = args[:escape_character] if args.key?(:escape_character)
  @field_delimiter = args[:field_delimiter] if args.key?(:field_delimiter)
  @quote_character = args[:quote_character] if args.key?(:quote_character)
  @table = args[:table] if args.key?(:table)
end