Exporting Data to a Database
The Export to Database task exports datasets or other Rulex structures to the specified database.
All export operations are performed in bulk mode, and are consequently extremely fast.
the required datasets have been imported into the process.
the OBDC drivers (64-bit) corresponding to the database you want to export to, have been installed. Rulex supplies the required drivers for SQLite, SQL Server and oracle.
Drag and drop the Export to Database task onto the stage.
Connect a task, which contains the data you want to export, to the new task.
Double click the Export to Database task.
Configure the Database parameters as described in the table below.
Configure the Advanced options, as described in the table below, to specify any filters, or define which attributes will be exported.
Save and compute the task.
Export to Database options
The database platform type. The following platforms are currently supported:
Unicode is also supported, if its corresponding driver is installed.
The target database server IP address.
The number of the specific process to connect to.
The name of the database you want to use (or the database file name if using SQLite).
The method of authentication used to access the database.
Possible values are:
The login user name.
This parameter is mandatory only when User Name/Password has been selected as the authentication mode
The login password.
This parameter is mandatory only when User Name/Password has been selected as the authentication mode.
The database schema.
Database service name of the Oracle database.
Bulk size for storing
Retrieves blocks of data of the size specified.
Additional parameters which may be required by ODBC drivers (according to database used) can be expressed through this edit box with the following format: option1=value1;option2=value2.
The DSN value can also be inserted here, if present, with the following format: DSN=value.
Data to be exported
Select what type data you want to export from the list of options.
Possible options are:
Enter a name for the database table that you want to create.
If no name is specified, the name of the table will correspond to the upstream task in your process.
Specify how to manage data export operations when there is a data table with the same name already present. If there is a table with the same name, possible behavior can be:
Add increment primary key
If selected, this option adds a column which contains an incremental number, which can be used as a key attribute, when a table is created. If required you can define a name (autoincname) for the column in the corresponding edit box, otherwise a default name will be provided.
This option is only available with Insert (drop).
If the Add increment primary key option has been selected, the Key attributes edit box is disabled.
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 input rules to determine conditions
If selected, input rules are used to determine query conditions instead of key attribute values. These rules can be manually inserted in a Rule Manager task, which is then connected to the Export to Database task.
This is particularly useful, for example, to define a range of values for a date or a range of continuous values.
This option can be used with all Insert Modes which require conditions (Update, Delete, Insert/Update).
Drag and drop the attributes you want to use as key attributes. This means that conditions for operations such as update or delete, will be applied to these attributes.
If the Add increment primary key option has been selected, this edit box is disabled.
Drag and drop the attributes to be exported from the Available Attributes list on the left. If left empty, all attributes are exported.