CSV
To declare that a type should be read/written as CSV, add the com.flow.formats.Csv
annotation to a model:
import flow.formats.Csv
@Csv
model Person {
firstName : FirstName inherits String
}
CSV options
The following options are available:
Parameter name | Description | Default value |
---|---|---|
delimiter |
The delimiter between records |
|
firstRecordAsHeader |
Indicates if the first record should be read as a header |
|
nullValue |
Specify a custom string to be read as |
|
containsTrailingDelimiters |
Indicates if each row contains a delimiter which should be ignored |
|
quoteChar |
Specifies which character should be read as a quoting character |
|
For example:
import flow.formats.Csv
@Csv(
delimiter = "|",
nullValue = "NULL"
)
model Person {
firstName : String
lastName : String
age : Int
}