Skip to main content

Text File Output

Description:

Text file output is a step in the Output Plugin for Process Studio Workflows. The Text file output step outputs data in text file format. This step is commonly used to generate fixed width files by setting lengths on the fields in the fields tab or to write Comma Separated Values (CSV files) that can be read by spreadsheet applications.

Configurations:

No.Field NameDescription
1Step nameName of the step. Note: This name has to be unique in a single workflow.
File Tab:
1FilenameThis field specifies the filename and location of the output text file.

Note: Don't add the extension in this field, when the date and time should optionally be appended and afterwards the extension option (see Extension option field below). When the Extension option is left blank, add it to this field.

2Run this as a command instead?Enable to "pipe" the results into the command or script you specify. It can also be used for some database bulk loaders that can process the input from stdin. In this case set the filename to the script or binary to execute.
3Pass output to servletEnable this option to return the data via a web service instead writing into a file
4Create parent folderEnable to create the parent folder
5Do not create file at startEnable to avoid empty files when no rows are getting processed.
6Accept file name from field?Enable to specify the file name(s) in a field in the input stream
7File name fieldWhen the previous option is enabled, you can specify the field that will contain the filename(s) at runtime.
8ExtensionAdds a point and the extension to the end of the filename. (.txt)
9Include stepnr in filenameIf you run the step in multiple copies (Launching several copies of a step), the copy number is included in the filename, before the extension. (_0).
10Include partition nr in filename?Includes the data partition number in the filename.
11Include date in filenameIncludes the system date in the filename. (Default _20041231).
12Include time in filenameIncludes the system time in the filename. (Default _235959).
13Specify Date time formatEnable to specify the date time format
14Date time formatChose the date time format to append to the filename
15Add file name to restThis adds all processed filenames to the internal result filename set to allow for further processing.
16Show filename(s)This option shows a list of the files that will be generated.

Note: This is a simulation and among others depends on the number of rows that will go into each file.

Content Tab:The content tab contains the following options for describing the content being read:
1AppendCheck this to append lines to the end of the specified file.
2SeparatorSpecify the character that separates the fields in a single line of text. Typically this is ; or a tab.
3EnclosureA pair of strings can enclose some fields. This allows separator or enclosure characters in fields. The enclosure string is optional.
4Force the enclosure around fields?This option forces all fields of an incoming string type (independent of the eventually changed field type within the Text File Output field definition) to be enclosed with the character specified in the Enclosure property above.
5Disable the enclosure fix?This is for backward compatibility reasons related to enclosures and separators. The logic is: When a string field contains an enclosure it gets enclosed and the enclose itself gets escaped. When a string field contains a separator, it gets enclosed.

Check this option, if this logic is not wanted. It has also an extra performance burden since the strings are scanned for enclosures and separators. So when you are sure there is no such logic needed since your strings don't have these characters in there and you want to improve performance, un- check this option.

6HeaderEnable this option if you want the text file to have a header row. (First line in the file).
7FooterEnable this option if you want the text file to have a footer row. (Last line in the file).

Note: Be careful to enable this option when in Append mode since it is not possible to strip footers from the file contents before appending new rows. There are use cases where this option is wanted, e.g. to have a footer after each run of a workflow to separate sections within the file.

8FormatThis can be either DOS or UNIX. UNIX files have lines are separated by linefeeds. DOS files have lines separated by carriage returns and line feeds.

The options are: CR+LF terminated (Windows, DOS) / LF terminated (Unix) / CR terminated / No new-line terminator

9EncodingSpecify the text file encoding to use. Leave blank to use the default encoding on your system. To use Unicode specify UTF-8 or UTF-16. On first use, Process Studio will search your system for available encodings.
10CompressionAllows you to specify the type of compression, .zip or .gzip to use when compressing the output. Note: Only one file is placed in a single archive.
11Right pad fieldsAdd spaces to the end of the fields (or remove characters at the end) until they have the specified length.
12Fast data dump (no formatting)Improves the performance when dumping large amounts of data to a text file by not including any formatting information.
13Split every ... rowsIf this number N is larger than zero, split the resulting text-file
into multiple parts of N rows.
14Add Ending line of fileAllows you to specify an alternate ending row to the output file.
Fields Tab:The fields tab is where you define properties for the fields being exported. The table below describes each of the options for configuring the field properties:
1NameThe name of the field.
2TypeType of the field can be either String, Date or Number.
3FormatThe format mask to convert with. See Number Formats for a complete description of format symbols.
4LengthThe length option depends on the field type follows:

- Number - Total number of significant figures in a number

String - total length of string Date - length of printed output of the string (e.g. 4 only gives back year)

5PrecisionThe precision option depends on the field type as follows: Number - Number of floating point digits String - unused Date - unused
6CurrencySymbol used to represent currencies like $10,000.00 or E5.000,00
7DecimalA decimal point can be a "." (10,000.00) or "," (5.000,00)
8GroupA grouping can be a "," (10,000.00) or "." (5.000,00)
9Trim typeThe trimming method to apply on the string. Note: Trimming only works when there is no field length given.
10NullIf the value of the field is null, insert this string into the textfile
11Get Click to retrieve the list of fields from the input fields stream(s)
12Minimal widthAlter the options in the fields tab in such a way that the resulting width of lines in the text file is minimal. So instead of save 0000001, we write 1, etc. String fields will no longer be padded to their specified length.