CSV Parser
Introduction
CSV Parse task is used to iterate the CSV file from the source. It helps to read the content of input CSV data and provides a list of all the records for further use.
Description
After you complete the configuration for the CSV parser task a set of data slots gets generated for further use in automation:
Records: It is the data fed by the you from FTP/SFTP writer.
Steps to configure
Drag and drop the CSV Parser task from the helper section and click on it to start configuring it. The following form will appear on the right side of the screen.
Add name and an appropriate description for reference.
In the CSV parser input type section, you can choose the format of the input file, here select using the file option. Using file field is a file-upload field.
Click on the data slot, In it, you will get all the output data of previous tasks. You can drag and drop the file and add it to the CSV content input field.
After adding data from the data slot click on save to successfully save the configuration done so far.
Now click on output meta, to provide a sample file to the task. It will generate a data slot for the next step. Output meta is the type resolution for the result of a component. Each component can provide either static or dynamic metadata for the payload and attributes, isolated from each other.
Now add the sample file, or simply drag and drop the file. Add the file name and file type. A filename or is a name used to uniquely identify a computer file in a directory structure. A file type is a name given to a specific kind of file.
Click on upload and then you will get all the fields that the particular file has.
Click on save to complete the CSV parser configuration.
Now start from the step 1 and select using content from the CSV input type. Content Fields are a way to set up different kind of fields to the admin's forms.
Add a CSV content and save to complete the CSV parser configuration.
Additional Properties
CSV parser
The additional properties for CSV parser are as follow:
You can select the following as per the requirement. Furthermore, you can enable or disable/ select singly or double in case of the quote and choose a particular delimiter. Property filed contains various elements that can be used to perform the CSV file process. Value field is used as a common format to exchange tabular data between spreadsheets and relational database. In a JavaScript action, you can parse CSV data using the csv library.
Name | Description |
---|---|
Delimiter | The delimiter property specifies the character to be used while parsing the CSV file. There are currently three delimiters - COMMA, SEMICOLON, PIPE. Default value: Comma |
escapeDisabled | escapeDisabled and escape char work hand-in-hand. You need to disable it to use escapeChar. Default value: Disabled |
escapeChar | The escape character is used while parsing CSV files. The only double backslash is supported. Leave this property empty if no escape character is used in the input CSV data. Default value: Double Backslash |
IgnoreEmptylines | Neglect empty lines Default value : Disabled |
QuoteDisabled | QuoteDisabled and quote work together while adding quotes to the provided file. Otherwise, you can keep it disabled. Default value: Disabled |
Quote | The quote character property specifies the character to be used for a quote. Add quotes [you needs to select either single or double quotes] Default value: Double Quote |
Related articles