Create a File System Output
To create a file system Output, you must first create a file system Connection.
File system Connection types:
- Azure Blob Storage
- DropBox
- FTP
- Local File System
- Microsoft OneDrive
- S3
- SSH
Create a Output to a File System in Hero Platform_
- Open Hero Platform_.
- Open Integration from the navigation menu and select Outputs.
- Click Create New Output.
- Give the Output a name and select a file system Connection.
- Configure the file system Output data.
CSV Output
- Enter the file path where the outgoing data is stored.
Variable syntax:
${<field name>}
The new data written from the Output overwrites the current file with the same file name. Create a new file with an added time stamp suffix with the syntax:
#{TIMESTAMP}
- Select the CSV output format.
- Enter the delimiter that separates values in the file.
- Check the radio button to indicate if headers are present.
- Select the character set for the CSV.
- File create mode:
- Select Single file to have the Output write all tuples one CSV file.
Select Multiple files to have the Output create multiple CSV files based on the number entered for Tuples per file.
- Enter the number of tuples per file.
- The Output will write the value of tuples entered per file.
- Mark the box if suffixes should be automatically appended to file names.
- If marked, numbers are appended to the file name created in a file system Output. (E.g., product_users_0001.csv, product_users_0002.csv, product_users_0003.csv, ...)
If unmarked, numbers are not appended to the file name created in a file system Output. The system matches the Input file name to the Output name with no additional characters, spaces, or numbers.
- Hero Platform_ writes to the CSV whole partition. If the Input data produces multiple partitions, the Output writes multiple CSV files.
- When the checkbox is marked, Hero Platform_ merges multiple partitions in one partition.
- When the checkbox is unmarked, Hero Platform_ continues with the standard behavior.
- If the Input data has a single partition, the Output is a single file.
- If the Input data has multiple partitions, the Output is multiple files.
- This feature is supported for Connections to Dropbox and S3.
- Use of the aggregation function in a Flow may cause additional partitions.
- Hero Platform_ writes to the CSV whole partition. If the Input data produces multiple partitions, the Output writes multiple CSV files.
- Enter the number of tuples per file.
- Select Files with Dynamic Names to create CSV files based on an input field name.
- Use the variable syntax ${<field name>} in the file path to indicate which field to use for file names.
- Each unique value in the selected field creates a CSV output file using that value as specified in the file path.
- When duplicate values exist in the input field used for generating field names:
- If all the name values are directly next to each other, a tuple for the data in each row of all the values with the same name are stored in a CSV output file.
- If the name values are not next to each other, only the last name value in the file has it’s data stored in the CSV output file.
- Use the variable syntax ${<field name>} in the file path to indicate which field to use for file names.
- Click the Refresh icon to display field mapping for the Input.
- From the field mapping table:
- Confirm or change field names.
- Confirm or change field data types.
- Remove or confirm the arrangement of fields.
- From the field mapping table:
- Click OK to save the Output.
PDF Output
- Enter the file path where the outgoing data is stored.
Variable syntax:
${<field name>}
- Select the PDF output format.
- Mark box if suffixes should be automatically appended to file names.
- If marked, numbers are appended to the file name created in a file system Output. (E.g., DoctorNote_0001.pdf, DoctorNote_0002.pdf, DoctorNote_0003.pdf, ...)
- If unmarked, numbers are not appended to the file name created in a file system Output. The system matches the Input file name to the Output name with no additional characters, spaces, or numbers.
- Click Choose file... to select a file template.
- Select a template file that can be stored in ~/sflow/templates/pdf/{UUID}/{pdfFileName}
- Click the Refresh Icon to display the mapping table.
- Click OK to save the Output.
RAW Output
- Enter the file path where the outgoing data is stored.
- File naming scheme: <file name>_suffix number.extension.
- Example: testImage_0001.jpg
Variable syntax:
${<field name>}
- File naming scheme: <file name>_suffix number.extension.
- Select the RAW output format to write binary data.
- Mark box if suffixes should be automatically appended to file names.
- If marked, numbers are appended to the file name created in a file system Output. (E.g., test_0001.bin, test_0002.bin, test_0003.bin, ...)
- If unmarked, numbers are not appended to the file name created in a file system Output. The system matches the Input file name to the Output name with no additional characters, spaces, or numbers.
- Review the field mapping and select the data type BINARY_DATA.
- Click OK to save the Output.
TEXT Output
The TEXT Output format allows for Flow users to write out any type of text file. (E.g., JSON or XML)
- Enter the file path where the outgoing data is stored.
Variable syntax:
${<field name>}
- Select the TEXT output format to write text data.
- Mark the box if suffixes should be automatically appended to file names.
- If marked, numbers are appended to the file name created in a file system Output. (E.g., ${<field name>}_output_0001.json, ${<field name>}_output_0002.json, ${<field name>}_output_0003.json, ...)
- If unmarked, numbers are not appended to the file name created in a file system Output. The system matches the Input file name to the Output name with no additional characters, spaces, or numbers.
- Review the field mapping and select the data type STRING.
Click OK to save the Output.