Exporting Data to a Text File
The Export to Text file task exports datasets or other Rulex structures to a text file.
Prerequisites
the required datasets have been imported into the process.
Additional tabs
The following additional tabs are provided:
Remote connections tab where you can configure the connection to the remote location where the file will be exported.
Documentation tab where you can document your task.
Parametric options tab where you can configure process variables instead of fixed values. Parametric equivalents are expressed in italics in this page.
File Format tab where you can configure the exact format of the output file.
Procedure
Drag and drop the Export to Text File task onto the stage.
Connect a task, which contains the data you want to export, to the new task.
Double click the Export to Text File task.
Configure the task options as described in the Export to Text File options table below.
Save and compute the task.
Export to Text File options | ||
Parameter Name | Parametric Options | Description |
---|---|---|
Data to be exported | reflist | Select what type data you want to export from the list of options. Possible options are:
|
Mode | mode | Select how you want to save the file, either by storing it in a location you will then specify (store), by sending the file as an e-mail (email) or both (all). If you select to send the file by e-mail, you must then specify the e-mail address in the Recipients for export via email edit box. |
Export URI | uri | Select whether the file will be saved locally (Local File System) or remotely (Http Remote API, SharePoint, HDFS, AWS S3, FTP, Azure Storage). If you chose to save the file remotely you must also configure the Remote Connection parameters in the Remote Connections tab. |
Directory | dirname | Enter or browse to the directory where the file will be saved. If you are exporting to a Azure Storage repository you can either:
|
File basename | basename | Enter a name for the text file you want to export. If not specified, the name of the file will correspond to the upstream task in the process. |
Character coding for output file | filecoding | Select the character encoding system you want to use:
|
Add current date and time as prefix | timestampprefix | If selected, the date and timestamp will be added to the start of the file basename as a prefix. |
Add current date and time as suffix | timestampsuffix | If selected, the date and timestamp will be added to the end of the file basename as a suffix. |
Append data if the file already exists | appendfile | If selected, the exported data will be appended to the file specified in the File basename option, if it already exists; otherwise the original data will be overwritten. |
Recipients for export via email (use comma as separator) | recipients | Specify the email addresses where the exported file will be sent, separated by commas. This option will only be valid if you have selected Send via email or Both in the Mode option. |
Export to Text File - File Format options | ||
File extension | filetype | Select the extension type you require for the exported file. Possible values are tab, csv, txt, data, and tsv (NEW FOR RULEX 4.7. |
Data separator | datadelim | Select the data separator which delimits the values of the data to be exported in the output text file, by selecting comma, tabbing, semicolon, space or by specifying another separator. |
String for missing values | missingstr | Enter the character (or string of characters) which should be used when there are empty values, for example Null or N/A. |
Text delimiter | quotech | Select the symbol used to identify strings. For example, if you select the symbol ” as the text delimiter, age will be exported as “age”. |
Put names in line | nameline | Specify the line where the attribute names will be saved. |
Put types in line | typeline | Specify the line where the attribute types will be saved. |
Write covering statistics (only for Rules) | writecov | If selected covering statistics for rules will be added to the exported text file. |
Write error statistics (only for Rules) | writeerr | If selected error statistics for rules will be added to the exported text file. |
Write condition covering statistics (only for Rules) | writeccov | If selected covering statistics for conditions will be added to the exported text file. |
Write condition error statistics (only for Rules) | writecerr | If selected error statistics for conditions will be added to the exported text file. |
Rule format (only for Rules) | ruleformat | Select whether you want the rule data to be expressed as If-then rules (ifthen) or as a matrix (c). |