Parse a CSV file.
Example

I Ain't Afraid of No Code!
[
[
"csv",
{
"quotechar": "\"",
"delimiter": ",",
"subtable": null,
"quoting": "minimal",
"encoding": "utf-8",
"_comment": null
}
]
]
param str quotechar: specifies the character used to surround fields that contain the delimiter character. The default is a double quote (' " ').
param str delimiter: specifies the character used to separate each field. The default is the comma (',').
param str subtable: Name a subtable in which output will be stored (will create subtable where necessary).
param str quoting: Determines whether quoting will be used, and if so how the fields will be treated:
- Minimal =
.writerow()
will quote fields only if they contain thedelimiter
or thequotechar
. This is the default case. - All =
.writerow()
will quote all fields. - Nonnumeric =
.writerow()
will quote all fields containing text data and convert all numeric fields to thefloat
data type. - None =
.writerow()
will escape delimiters instead of quoting them. In this case, you also must provide a value for theescapechar
optional parameter.
param str escapechar: A one-character string used to escape the delimiter if quoting is set to QUOTE_NONE; quotechar if doublequote is False. On reading, escapechar removes any special meaning from next character.
param str encoding: Encoding of source file, by default utf8.
param boolean sniff: Set to true to enable CSV dialect detection, instead of predefining the delimiter.
param str comment: A comment that will appear in the Transformation UI.
Comments
0 comments
Article is closed for comments.