Illustrated in the below image is a flow where the Record Generator is used to generate records. The Combine step is used to combine records into a single output. A Run File destination step to deliver an output file that can be downloaded.
The Record Generator source step is shown in the image below.
Adding a CSV Writer Step
To add a CSV Writer step in a flow, follow the below instructions:
1. Click on the highlighted icon as shown in the below image.
2. The below page will appear. Select or search for a Writer step to pull out the source data. Click on the Writer tab and select CSV as shown in the image below.
Configuring a CSV Writer Step
Illustrated in the below image is the configuration that is available in the CSV Writer step. To edit the first three fields, click on the edit icon below the field as highlighted.
A Character Map with a range of characters will pop up as shown in the image below. A comma is automatically selected when the CSV step is added. All selected characters appear in the ‘SELECTED’ section on the Character map as shown.
Field Delimiter – The characters separating fields. A comma (,) character is automatically selected when the CSV Writer step is added.
Row Delimiter – The characters indicating the end of a row. CR LF is automatically selected when the CSV Writer step is added.
Text Qualifier Character – The values that should be treated as text. The Quotation marks (“) character is automatically selected when the CVS Writer step is added.
AutoMap section:
The fields that are set to automatically map to the created CSV sheet. Below are the available options:
Enabled checkbox – Enables automapping. The checkbox is checked by default when the CSV Writer step is added.
Nested Objects – How fields in nested objects are handled. There are three options available:
Ignore – Does not map the field.
Expand – Create a column for each sub-field.
JSON – Creates a JSON string as the value for the field.
Nested Arrays – How the nested arrays are handled. There are three options available:
Ignore – Does not map the field.
Comma – Creates a column with the values as strings separated by a comma.
Use Name checkbox – Use the field name as a path.
When checked – Displays the header as per the field name.
Not selected – Forces the header to be will always be "humanized", i.e. converts an underscored, camelized, or dasherized string into a humannized one. It also removes beginning and ending whitespace, and removes the postfix '_id'.
Strict checkbox – The source field must exist or else it will force an error when the checkbox is selected. The checkbox is not checked by default when the CSV Writer step is added.
Field Mappings section:
Custom field mapping section that allows manually mapping fields to the Excel column. This section is only available if automapping is NOT enabled.
Click on the plus button as highlighted in the image below to map fields.
Name – Name of the field in Excel.
Path – Source path of the field.
Format – Excel format to use for the field.
Type – Type to convert and write to Excel. It is set to string by default. Click on the dropdown arrow to choose from the list.
Click on the tick or x buttons on the far right to save or remove the field mapping.
String Encoding section
The code that will be used to encode strings. It is set to Utf28 by default when the CSV Writer step is added.
Remove Header checkbox
Remove the header when the checkbox is selected. The checkbox is not checked by default when the CSV Writer step is added.
Using a CSV Writer Step
The Run File step is shown below. The File Type has been selected as Csv.
Viewing the created CSV file
1. Click the Execute Flow button shown in the image below:
2. Click the Create Run button.
3. Once the run has completed successfully, click on the processed run and then click the download button on the Run File step to download the output file as highlighted in the image below.
The image below shows the CSV file that was created.