For the import routine selected in the Imports tab, the Import Detail tab provides the mapping from the columns of the data source to the columns of the target table. This tab contains the Import Columns pane and three tabs: Column Mapping, PreProcess, and PostProcess. These are described in the sections below.
This tab also provides an Edit Files command button. To modify the list of files that are available as source files, use the following steps:
- Select Edit Files. The system displays the File Browser window.
- Right-click this window to display a shortcut menu with commands for modifying the list of displayed files.
- Use these commands to modify the list of files as desired and then click the Close button to close the File Browser window.
Import Columns Pane
The left pane shows the columns in the data source. The application will automatically populate this pane with the column names from the data source except for the Fixed length source type. It is required that the Has Header check box is selected for the Comma separated and Excel file source types. (If the check box is not selected, the application still creates records for each column, but these are not labeled. You may subsequently edit the records to include the appropriate column name.) For the Fixed length source type, use the Insert command to add records to the pane. Then enter the name of the column and its size in each record.
When you right-click this pane, the system displays a shortcut menu. This menu contains the common commands along with the following special commands:
- Add Column to Target Data: This command initiates the process of adding a new column to the target table. See Add a New Column to a Table for more information.
- Refresh Source Columns: This command updates the list of columns shown in the pane.
- Show Sample Data: This command displays a new window with data from the selected column.
Column Mapping Tab
The Column Mapping tab shows the mapping from one or more columns in the data source to a column in the target table. Each record in this pane is for one column in the target table as indicated by the Target Column column. (You can update the list of target table columns by right-clicking the pane and then selecting the Refresh Target Columns command.)
- The Import Mapping Arg List column contains the input parameters for the ImportMapping Groovy script selected in the Import Mapping Script column that transfers and, if desired, adjusts the data from the source to a target column.
- To enter (or modify) input parameters, right-click the selected record and then click Edit Arguments. The application responds by displaying a dialog box. The left side of this dialog box contains the list of columns shown in the Import Columns pane of the underlying window. The right side of the dialog box shows the input parameters. Two arrows are provided between the pane to move a column from one pane to the other. Additionally, an Add Argument button is provided so you may insert a blank record in the argument list on the right. The arguments in the right pane are executed from the top to the bottom (first to last record) as indicated by the value in the Order column. If desired, you may change the values in this column to change the order of argument execution.
When the dialog box shows the desired argument, click the OK button to close the dialog box. (The Cancel button discards any changes you made and closes the dialog box.)
Note: Rather than selecting an ImportMapping Groovy script, you may create a new script by utilizing the Create/Edit Groovy Script command. This command is found by right-clicking the selected record in the right pane. After selecting the command, the application displays a dialog box for creating or modifying the Groovy script. See Groovy Script Dialog Box for more information.
PreProcess Tab
The PreProcess tab allows you to configure a Groovy script to perform actions before the column's data is imported. This is the Import PreProcess type of Groovy script.
When you right-click a record, the system displays a shortcut menu with the following special commands:
- Create/Edit Script: This command displays the Edit Groovy Script dialog box. (You may also display this dialog box by clicking the name of the Groovy script if one is shown in the record.) You use this dialog box to create or modify the Groovy script. For information on the command buttons found in this dialog box, see Groovy Script Dialog Box. After you create and test the Groovy script, you click the OK button to close the dialog box.
- Edit Arguments: This command displays the Arguments dialog box. The left side of this dialog box contains the list of columns shown in the Import Columns pane of the underlying window. The right side of the dialog box shows the input parameters. Two arrows are provided between the pane to move a column from one pane to the other. Additionally, an Add Argument button is provided so you may insert a blank record in the argument list on the right. The arguments in the right pane are executed from the top to the bottom (first to last record) as indicated by the value in the Order column. If desired, you may change the values in this column to change the order of argument execution. You may also use the arrows on the right side of the dialog box to also change the order of the records in the right pane.
PostProcess Tab
For the column selected in the Column Mapping tab, the PostProcess tab allows you to configure a Groovy script to perform actions after the column's data is imported but before it is saved. The type of Groovy script is the Import PostProcess type.
When you right-click a record, the system displays a shortcut menu with the following special commands:
- Create/Edit Script: This command displays the Edit Groovy Script dialog box. (You may also display this dialog box by clicking the name of the Groovy script if one is shown in the record.) You use this dialog box to create or modify the Groovy script. For information on the command buttons found in this dialog box, see Groovy Script Dialog Box. After you create and test the Groovy script, you click the OK button to close the dialog box.
- Edit Arguments: This command displays the Arguments dialog box. The left side of this dialog box contains the list of columns shown in the Import Columns pane of the underlying window. The right side of the dialog box shows the input parameters. Two arrows are provided between the pane to move a column from one pane to the other. Additionally, an Add Argument button is provided so you may insert a blank record in the argument list on the right. The arguments in the right pane are executed from the top to the bottom (first to last record) as indicated by the value in the Order column. If desired, you may change the values in this column to change the order of argument execution. You may also use the arrows on the right side of the dialog box to also change the order of the records in the right pane.