Exporting to a Text File

The Export to Text File task exports datasets or other Rulex structures to a text file.

Prerequisites

Procedure

  1. Drag the Export to Text File task onto the stage.

  2. Connect the task containing the data to export to it.

  3. Double click the Export to Text File task.

  4. Configure the task options as described in the table below in the Options and Export Options tabs.

  5. Save and compute the task.

Export to Text File options

Parameter Name

Description

Data to be exported

Select what type data you want to export from the list of options.

Possible options are:

  • Association rules (produced by Hierarchical Basket Analysis and Similar Items Detector tasks)

  • Auto regressive models (produced by Auto Regressive task)

  • Clusters (produced by Label Clustering, Projection Clustering and Standard Clustering tasks)

  • Cluster Labels (produced by Label Clustering and Projection Clustering tasks)

  • Datasets (all import, data preparation and data pre-processing tasks)

  • Discretization cutoffs (produced by Discretize task)

  • Frequent itemsets (produced by Frequent Itemsets Mining task)

  • Frequent sequences (produced by Sequence Analysis task)

  • Results (produced by all data analysis tasks)

  • Rules (produced by LLM tasks (Classification, Regression & One-Class), along with Decision Tree and Regression Tree tasks)

  • Models (produced by Logistic, Linear, Neural Networks (Classification and Regression) and SVM (Classification and Regression).

  • PCA eigenvectors (produced by the Principal Component Analysis task)

  • Relevances (produced by classification and regression tasks).

Export mode

Select how you want to save the file, either by storing it in a location you will then specify (store file), by sending the file as an e-mail (send via email) or both (both).

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.

Destination

You can choose between the Saved destinations (which can be set previously at environment level) and the Custom destinations, which have to be set by choosing the type from the drop down menu and clicking the pencil button to insert the details.

Select whether the file will be saved locally (Local File System) or remotely (Http Remote APISharepoint, HDFS, AWS S3, FTP, Sftp Server, Azure BLOB Storage). If you chose to save the file remotely on a custom source, you must also configure the Remote Connection parameters in the Remote Connections tab by clicking on the pencil button.

Files

Enter or browse to the directory where the file will be saved.

File 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 flow.

Character coding for output files

Select the character encoding system you want to use:

  • UTF-8 (default) writes the text file in UTF-8 coding 

  • ASCII exports a file with plain text (without BOM at the start of the file). This may be the preferred option when the files includes a procedure to execute, as it does not contain the three unprintable characters (BOM) at the start of the file.

Add current date and time as prefix

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

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

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)

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 options

File extension

Select the extension type you require for the exported file.

Possible values are tab, csv, txt or data.

Data separator

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

Enter the character (or string of characters) which should be used when there are empty values, for example Null or N/A.

Text delimiter

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

Specify the line where the attribute names will be saved. Specifying 0 means that the attribute names won’t be exported.

Put types in line

Specify the line where the attribute types will be saved. Specifying 0 means that the attribute type won’t be exported.

Write covering statistics (only for Rules)

If selected covering statistics for rules will be added to the exported text file.

Write error statistics (only for Rules)

If selected error statistics for rules will be added to the exported text file.

Write condition covering statistics (only for Rules)

If selected covering statistics for conditions will be added to the exported text file.

Write condition error statistics (only for Rules)

If selected error statistics for conditions will be added to the exported text file.

Rule format (only for Rules)

Select whether you want the rule data to be expressed as If-then, Matrix, or Multisheet.

If you want to export to a local filesystem, check the dedicated Local Filesystem page.