Conditional Import

Oftentimes, users may find themselves dealing with very large databases and, therefore, having the need to work with smaller ones. Through the Conditional Import task, Rulex Factory allows users to define the specific subset of data needed, without having to import all the data from a table.

Tip

The Conditional Import task is the only import task that accepts input data. The input task contains all the filters users want to apply in the import operation.

The Conditional Import task is divided into two tabs:


The Options tab

A detailed description of the Options tab is provided in the Import Tasks page.


The Advanced tab

The Advanced tab is divided into four panes:

Available Attributes

Within this pane, users will find a list of all the available attributes. These attributes can be dragged onto the Filtering attributes or Imported attributes panes. To search for a specific attribute, use the lens icon at the top right of the panel. Users can also sort the attributes according to their preferences. They can choose from the Order by drop-down list:

  • Attribute

  • Name

  • Type

  • Ignored

  • Role

Customization Pane

Within this pane, users can select one of the following options:

  • Use also missing values in conditions on key variables: if selected, missing values in key attributes in the dataset lead to conditions on NULL. Basically, this means that missing is a condition to be met, and not simply the absence of a value. Likewise, if not selected, any missing values will simply not be considered as conditions for any successive operations performed on the dataset.

  • Use frozen data: if selected, the underlying dataset will not be updated and the data from the last computation will then be retrieved.

  • use WITH clause (when available): if selected, the WITH clause is used during the query execution, if available. This parameter is selected by default.

Filtering attributes

Within this pane, users can drag the attributes they want to use to filter the imported results. This operation can be done via a Manual List (users need to manually drag and drop the selected attributes onto the pane) or via a filtered list.

Imported attributes

Within this pane, users can insert all the attributes they want to import. If no attributes are specified, all attributes will be imported. This operation can be done via a Manual List (users need to manually drag & drop the selected attributes onto the pane) or via a filtered list.


Example

  • Drag and drop an import task onto the stage, and configure it as needed.

  • Save and compute the import task.

  • Drag a Data Manager task, and connect it to the import task.

  • Configure the Data Manager task as needed.

  • Save and compute the Data Manager task.

  • Drag a Conditional Import task onto the stage and connect it to the Data Manager task.

  • Double-click to open the Conditional Import task.

  • Select Saved from the Source slider.

  • Open the Select a source menu by clicking on three-dots.

  • Select the saved source from you want to use and select the required database path.

  • Open the Advanced tab, if needed to change any settings.

  • According to the selected file, your Conditional Import task should look like the example provided below.

https://cdn.rulex.ai/docs/Factory/cond_import_ex2.webp