Import from Raw File

The Import raw task imports any file type in Rulex Factory in a single-column file format, without pre-processing it.

The task layout is made of two tabs: * the Options tab, * the Text Configuration tab.


The Options tab

The Options tab follows the structure shown in the Import Overview page.


The Text Configuration tab

The Text Configuration tab is divided into three panes:

  • Parsing options: here, users can find the parsing options.

  • Import options: here, users can find the import options.

  • Table preview: here, users can visualize a preview of their imported tables.

Parsing options

Within this pane, only one option is present:

  • Single row: if selected (default), the file will be imported in a single row. If it is not selected, each row’s values will be concatenated in the same column.

Import options

Within this pane, users can set the following options:

  • Start importing from line: the number of the line from which the import operations will start.

  • Stop importing from line (0 means all): the number of the line where the importing operations will end. Leave the value 0 if you want the whole dataset to be imported.

  • Add an attribute containing filename: if selected, an extra column with the name of the file is added to the dataset.

  • Strip spaces: if selected, it removes the empty columns from the imported dataset. For example, the string “ class “ will be imported as “class”.

  • Case sensitive: if selected, upper cases are considered different from lower cases.

  • Compress white spaces: if selected, it compresses contiguous occurrences of white spaces in one single occurrence. For example the string “university program” would be imported as “university program”.

  • Encode file content: select from the drop-down list the encoding which will be applied to the file before the import operation finishes. The possible values are Base64 and Hex.


Example

The following example imports a flow stored locally to Rulex Platform in an encoded dataset format.

  • After having added an Import from Raw File task to the flow, double-click the task and configure it as follows:

    • Select the path of the Local File System where the file is stored.

    • Leave all the other options unchanged, making sure that the Single row option in the Text configuration tab is selected.

    • Save and compute the task.

https://cdn.rulex.ai/docs/Factory/import-raw.webp
  • Add a Data Manager task to the flow or, alternatively, right-click on the task and select Take a look to visualize the results of the import operation.

https://cdn.rulex.ai/docs/Factory/import-raw-2.webp