This chapter describes how to import data into the Demantra database by using Tools > Import File. You use this tool to import supplementary data such as lookup tables.
This chapter covers the following topics:
An import interfaces consists of one or more profiles. Each profile corresponds to one table; note that multiple files can be loaded into a single table.
To create or modify a file load interface
Click Tools > Import File.
The Configure Loading Text Files screen appears.
Next:
To create a new interface, click File > New. Or click the New button in the toolbar.
A new file load interface is displayed in the left side of the dialog box.
To edit an existing interface, click the interface.
Specify a name and description.
Make sure the interface includes at least one import profile. See “Creating an Import Profile”.
To delete a file load interface
In the tree pane, right-click the interface and then select Delete Import Interface.
Each file load interface must include at least one import profile, which describes how to import data into a single table.
To create an import profile
In the tree pane, right-click the interface and then select Create Import Profile.
A new import profile is added to the tree. The right side of the dialog box prompts you for details on this profile.
Complete the fields as follows:
Profile Name | Specify a unique name for this import profile. |
File Directory | The location of the files. |
Log Path | Path and filename of the log file that will store any load errors. |
Load Option | Select Insert to add the imported data after the last row in the table. Or select Replace to replace all the data in the table. |
Table | The name of the existing table into which you want to load the text file data. |
File Format | The file name, which can include wild cards. |
Delimiter Type | Select either fixed length or delimiter. |
Column Delimiter | Select the character used in this source file to delimit fields. |
Date Format | Select the date format from the drop-down box. If this source file does not contain dates, this is optional. |
File Name Format | Select more than one file through the use of a wildcard (*). For example, dcl_his*.* selects every file with the prefix dcl_his. |
Number of lines to skip from begin | If there is a header, this gives the number of lines to miss at the top of the table. |
If fixed length was selected as the delimiter type, the table column pane is activated.
To specify table columns (where fixed length columns have been selected), complete the fields as follows:
From Pos | Position in the source text file where the field starts. |
To Pos | Position in the source text file where the field ends. |
Const | Constant column width. If selected, the From Pos and To Pos fields are disabled for editing. |
Click File > Save. Or click the Save button.
To use a file load interface, you create and run a batch file that imports the data as described in the interface.
To create an import batch file
Select a file load interface in the tree pane.
Click Create Load Batch.
The system displays a message is displayed when it creates the batch file.
The batch file is named load_text_file_model_name.bat
Note: You can also view the CTL syntax, which is the control file that SQL*Loader uses to map data into the database. Only experienced consultants should use this feature. To view the CTL syntax, click Show CTL Syntax.