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 (please refer to the page Import Overview for further and more detailed information) and the Advanced tab, whose characteristics and configuration will be explained in the next section.
The Advanced tab¶
The Advanced tab is divided into four panes:
Available attributes, where users will find the dataset’s attributes.
Customization pane, where users can find more customization options.
Filtering attribtues, where users can filter the attribute they want to use to filter the imported results.
Imported attribtues, where users can insert all the attributes they want to import.
Available Attributes
Within this pane, users will find a list of all the dataset’s attributes. To search for a specific attribute, use the lens icon at the top right of the panel. Users also have the option of sorting the attributes according to their preferences. They can choose from a drop-down list of the Order by option:
Attribute
Name
Type
Ignored
Role
Customization Pane
Within this pane, users can set 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 filter the attribute they want to use to filter the imported results. 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.
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 from Excel File onto the stage, connect it to a Data Manager and configure it as needed.
Drag a Conditional Import task onto the stage and connect it to the Data Manager.
Click on the pencil icon, select the source you want to use and select the Database Path.
Enter the required Driver.
You will be able to visualize the imported file in the Table panel.
According to the selected file, your Conditional Import task should look like the example provided below.