CSV source¶
The CSV data source translates the rows of files in CSV format to entities.
The configuration options are:
Prototype¶
{
"type": "csv",
"system": "a-valid-url-or-microservice-system-id",
"url": "url-to-csv-file",
"has_header": true,
"field_names": ["mappings","from","columns","to","properties"],
"auto_dialect": true,
"dialect": "excel",
"encoding": "utf-8",
"decode_error_strategy": "strict-or-replace",
"primary_key": ["list","of","column","names"],
"whitelist": ["list","of","column","names","to","include"],
"blacklist": ["list","of","column","names","to","exclude"],
"preserve_empty_strings": false,
"delimiter": ",",
"escape_null_bytes": false
}
Properties¶
Property |
Type |
Description |
Default |
Req |
---|---|---|---|---|
|
String |
The URL of the |
Yes |
|
|
String |
The ID of the URL system or microservice system component to use. |
Yes |
|
|
Boolean |
Flag that indicates to the source that the first row in the |
true |
|
|
List |
If set, specifies the names of the columns. It takes precedence over the header in the CSV file if present. |
||
|
Boolean |
Flag that hints to the source that it should try to guess the dialect of the |
true |
|
|
String |
Encodes what type of CSV file the file is. This is basically presets of the other properties.
The recognised values are |
||
|
String |
The character set to used to encode the text in the CSV file |
“UTF-8” |
|
|
String |
A enumeration of “strict” and “replace” that tells the character decoder how to deal with illegal characters in the input data. The default is “strict” which raises an error and stops processing. The “replace” option will log a warning and attempt to replace the offending character(s) with the unicode special character for “replacement character”, see https://en.wikipedia.org/wiki/Specials_%28Unicode_block%29 for more details. Use the “replace” option with extreme care as it can lead to data loss if you’re not absolutely sure of what you are doing. The preferred option should always be to try the fix the data at the source. |
“strict” |
|
|
List<String> or String |
The name of the column(s) to use as |
Yes |
|
|
List<String> |
The names of the columns to include in the generated entities. If there is a |
||
|
List<String> |
The names of the columns to exclude from the generated entities. If there is a |
||
|
Boolean |
If set to |
False |
|
|
String |
The character or string to use as the |
“,” |
|
|
Boolean |
If set to |
|
|
|
Enum<String> |
Determines the behaviour of the pipe when the CSV source returns no entities. Normally, any previously synced
entities will be deleted even if the pipe does not receive any entities from its source.
If set to The global default |
|
Continuation support¶
See the section on continuation support for more information.
Property |
Value |
---|---|
|
|
|
|
|
|