Export Data Table

In the ETL export settings, you can select a source table field as a field to be exported, or compute a source table field according to an expression to get new values and export the field, or join the source table and a numberized table and store the joining result table in a specified directly as a composite table file (CTX) or a bin file (BTX).

Here are settings for exporting source table EMPLOYEE. Select source table EMPLOYEE, click Edit button  or double-click the data structure, and click Export panel:

Index Column Name: Add an index column to the source table. Specify the index column name and click Add button to add the index column in the list of fields to be exported. By adding an index column, the Data File Tool system will number records of the source table from 1. As values of the index column, the index numbers will be exported together with the source table data. The index column expression is always represented by #.

Files of Type: Select the file type that the source table is exported as, which can be a composite table file (CTX) or a bin file (BTX).

Export to Directory: Specify the directory to which the source table data will be exported. The directory should be one in the data path list.

Field: Specify the name of field to be exported.

Expression/Numberized Table: Set field values, which can be represented by a SPL expression or can reference a numberized table having the key.

Sort: Specify the sorting field by which the to-be-exported data will be ordered. Since records in a composite table should be ordered by its dimension(s) and dimension field(s) must be orderly put at the beginning, the sorting field(s), as the composite table’s dimension field(s), need to be placed at the beginning.

Segment by the first field: When the export file type is CTX, you can check this option to segment data by the first field.

Perform database sort: When the source table is a database table, you can check this option to retrieve data from the table using the SQL order by sorting fieldmethod. The performance will be higher than that when only the sorting field is specified.

Do not export the key: Check this option only when the source table is a database table and the index column is added to it.

In the Export panel, you can add or delete a field to be exported through Add or Delete button (), or change positions of fields to be exported using Move Up or Move Down buttons (), as shown by settings in the preceding figure:

1.  Add index column id, whose expression is automatically set as #;

2.  Create numberized table {EMPLOYEE_GENDER} for GENDER field;

3.  Create numberized table {department} for DEPT field;

4.  Add new field AGE and set its values as age(BIRTHDAY);

5.  Set id,EID as the sorting fields, check Segment by the first field, and set Files of Type as CTX.

Then let’s move on to export settings of source table department – Files of Type is set as BTX and export data to an ETL data path:

Use the original order: Use order of the source table without manual settings. Automatically checked when the selected sorting field(s) is/are ordered in the source table.

When the editing is finished, click File -> Save to save the current ETL file and then convert the content defined in the ETL file to an executable splx file.