DIRECTLOAD
The DIRECTLOAD profile loads data from any external database table directly into the TESite database table with the use of database links and synonyms. This method eliminates the need for and use of temporary files. The use of a database link allows the TEAIM engine to directly select against an external table as if that table existed in the local schema. The result is a much improved data transfer rate and hence, reduced processing time. The configuration of the DIRECTLOAD profile consists of several activities: Defining the TESite table being loaded using the Import Table Setup module, configuring the TEAIM.ini file, the population of the DIRECTLOAD profile attributes, and setting up the database links for remote access.
The use of the database link varies according to the type of database system in use. For Oracle users, please refer to the Oracle documentation about setting up DBLinks and synonyms. For MS-SQL databases, please refer to Microsoft's documentation about setting up linked servers and database views.
Each of these activities will be outlined below with some of the activity descriptions being referenced to other sections of the guide.
Import Table Setup
The configuration of the TESite table being loaded is defined in the module called Table Import Setup. The purpose of this setup is to give TEAIM the table structure of the table being loaded. This allows TEAIM to perform the necessary data type and data length validations on the data being imported. For more detailed setup information on the Import Table Setup module, please refer to the section called Configuring Import Table Definitions.
TEAIM Setup
The second step in the setup process is the configuration of the directory structure for the TEAIM DIRECTLOAD profile. Only the directory structures for the TEAIM log files need to be configured in the TEAIMSetup utility. For more information on the TEAIMSetup utility, please refer to the section called TEAIM DBMS and File Directory Setup.
Creating Database Links
The creation and maintenance of database links varies with every database platform. Please refer to the 'How to Create Linked Servers' section for more detail.
Profile Creation
The following steps outline the process for creating a DIRECTLOAD type profile. Note: On every entry screen in TEAIM, an entry field with an asterisk "*" indicates a required field.
- Under Profiles in the Main Menu, select the Profile link.
- The Profile screen will be displayed.
- To create a new profile, select the New button.
- Enter in an appropriate name for the new profile in the Name field.
- In the Profile Type field, select the type DIRECTLOAD.
- If the Stop on Error option is set to "Yes," TEAIM will stop importing data when an error occurs. Otherwise, TEAIM will skip the error and continue processing.
- Click the Save button to save the new profile.
- The new profile can be seen by selecting the Profile link.
Profile Attribute Setup
A profile of type DIRECTLOAD requires a certain amount of profile attributes to be populated depending on the database configuration. The table below outlines and defines the different DIRECTLOAD attributes.
Section |
Key |
Description |
Value(s) |
---|---|---|---|
EMAIL_ON |
An Option to send an Email at the end of the process. |
C: Sends an email when the process is completed. |
|
|
EMAIL_TO |
The email address to be sent to. |
Default is empty. |
QRY_SECTION |
GET_LOAD_TABLES |
List the table names that are going to be populated by the data file. Loads only valid files from the load directory configured in the TEAIM.ini file. |
If you want to only load the employee table, then the value would be: |
LINKS |
DBLINKS |
|
Default is empty. |
OPTIONS |
VIEW_NAME |
The View or table name where the data is coming from. This view name will override the view name in DB_INTERFACE_DTL |
|
|
PROFILE_NAME |
Process Name |
Default is empty. |
The profile information is stored in the TESite database in two tables: DB_PROFILE_HDR and DB_PROFILE_DTL. The DB_PROFILE_HDR table stores general information about the profile. The DB_PROFILE_DTL table stores profile attribute information. In each of these two tables, the Profile ID is the unique key identifier.
TEAIM DIRECTLOAD Custom Events
The execution of a profile in TEAIM is a multi-step process. Each step in the process is initiated and monitored by the TEAIM engine. There are basically three steps in the profile execution process. The first and the last steps in the process are TEAIM before and after "events" that are basically areas for client customization that may need to occur either prior or post the execution of the profile. The events are called SP_JAGTEAIM_BEFORE_LOAD and SP_JAGTEAIM_AFTER_LOAD respectively. Figure 3 illustrates the process path for the execution of a profile:
The TEAIM before and after events are stored procedures that are capable of executing client customized SQL statements either before or after each profile execution. If any code is added to either of these events, then the database administrator will have to re-compile each of the affected events. The table that follows outlines the stored procedure definition:
Event Names: SP_JAGTEAIM_BEFORE_LOAD, SP_JAGTEAIM_AFTER_LOAD
PARAMETER |
DATATYPE |
DESCRIPTION |
---|---|---|
ARG_TABLE_NAME |
VARCHAR(50) |
The table name in the TESite database where the data in the extracted file will |
ARG_PROFILE_ID |
VARCHAR(20) |
The profile ID of the process. This will allow the procedure to acquire profile information from the DB_PROFILE_DTL table. |
ARG_JOB_NUMBER |
INTEGER |
The system generated job number of the specific load process. This will be |
These pre-defined functions as well as any new functions that are created specifically for a client must follow the standards for return values that are inherent in the TEAIM application. For all standard and customized functions, if an error occurs, then a function must return a value of negative one (-1). This will ensure the proper handling of error messages and "trapped" database messages. If no error occurs and the function logic is successful, then a return value of zero (0), will allow TEAIM to continue processing the profile.
Continue to Profile Execution.
2024 DATABASICS, Inc