Class: Google::Apis::AlloydbV1alpha::CsvImportOptions
- Inherits:
-
Object
- Object
- Google::Apis::AlloydbV1alpha::CsvImportOptions
- 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
-
#columns ⇒ Array<String>
Optional.
-
#escape_character ⇒ String
Optional.
-
#field_delimiter ⇒ String
Optional.
-
#quote_character ⇒ String
Optional.
-
#table ⇒ String
Required.
Instance Method Summary collapse
-
#initialize(**args) ⇒ CsvImportOptions
constructor
A new instance of CsvImportOptions.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ CsvImportOptions
Returns a new instance of CsvImportOptions.
1300 1301 1302 |
# File 'lib/google/apis/alloydb_v1alpha/classes.rb', line 1300 def initialize(**args) update!(**args) end |
Instance Attribute Details
#columns ⇒ Array<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
1272 1273 1274 |
# File 'lib/google/apis/alloydb_v1alpha/classes.rb', line 1272 def columns @columns end |
#escape_character ⇒ String
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
1279 1280 1281 |
# File 'lib/google/apis/alloydb_v1alpha/classes.rb', line 1279 def escape_character @escape_character end |
#field_delimiter ⇒ String
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
1286 1287 1288 |
# File 'lib/google/apis/alloydb_v1alpha/classes.rb', line 1286 def field_delimiter @field_delimiter end |
#quote_character ⇒ String
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
1293 1294 1295 |
# File 'lib/google/apis/alloydb_v1alpha/classes.rb', line 1293 def quote_character @quote_character end |
#table ⇒ String
Required. The database table to import CSV file into.
Corresponds to the JSON property table
1298 1299 1300 |
# File 'lib/google/apis/alloydb_v1alpha/classes.rb', line 1298 def table @table end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
1305 1306 1307 1308 1309 1310 1311 |
# File 'lib/google/apis/alloydb_v1alpha/classes.rb', line 1305 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 |