GETLOAD

The GETLOAD profile "gets" data from any client database (i.e. Lawson) and loads that data directly into pre-configured TESite tables. The configuration of the GETLOAD profile consists of several activities: defining the TESite tables being loaded into using the Import Table Setup module, configuring the TEAIMSetup utility, populating the GETLOAD profile attributes, and establishing a valid DBMS connection to the source database. Each of these activities will be outlined below with some of the activity descriptions being referenced to other sections of the guide.

In establishing a valid DBMS connection to the source database, follow the instructions provided by the database vendor in setting up the appropriate type of connection (i.e., in MSSQL Server, you will use the ODBC setup wizard; in Oracle, use the NET Configuration Assistant to create the correct entry in the TNSNAMES.ora file). One additional note that merits discussion is that the source and target database may be different database platforms. For example, if one is planning to get data from LAWSON running Oracle and loading data into DATABASICS on MSSQL DBMS, then one could configure GET to connect to Oracle and Load to connect to MSSQL. Please refer to the section TEAIM DBMS and File Directory Setup for more details.

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, refer to the section called Configuring Import Table Definitions.

TEAIM Setup
The next step in the setup process is the configuration of the directory structure for the TEAIM GETLOAD profile using the TEAIMSetup utility. This is necessary for the TEAIM engine to know the source and location of the data being loaded, called the GETDIR, and the name and location for the loaded directory, called LOADDIR. The name and location of the TEAIM log files are also configured with this utility. Please refer to the section called TEAIM DBMS and File Directory Setup for further reference.

Profile Creation
The following steps outline the process for creating a GETLOAD type profile. Note: On every entry screen in TEAIM, an entry field with an asterisk "*" indicates a required field.

  1. Under Profiles in the Main Menu, select the Profile link.
  2. The Profile screen will be displayed.
  3. To create a new profile, select the New button.
  4. Enter in an appropriate name for the new profile in the Name field.
  5. In the Profile Type field, select the type GET and LOAD.
  6. 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.
  7. Click the Save button to save the new profile.
  8. The new profile can be seen by selecting the Profile link. 

Profile Attribute Setup
A profile of type GETLOAD requires a certain amount of profile attributes to be populated. The table
below outlines and defines the different GETLOAD attributes.

Section

Key

Description

Value(s)

EMAIL

EMAIL_ON

An Option to send an Email at the end of the process.

C: Sends an email when the process is completed.
F: Sends an email when/if the process fails.
B: Sends an email if process succeeds or fails.
Default: Empty


EMAIL_TO

The email address to be sent to.
(Ex. youremail@domain.com)

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:
In ('EMPLOYEE')

XML_DECLARE

ATTRIBUTES

A string consisting of the attribute list for the SESSION_ELEMENT. Example agent="Databasics" coName="DB client"

Default is empty.


ENCODING

The character set for XML. Currently the only value is: US-ASCII

US-ASCII


SESSION_ELEMENT

An element specified by each client.

Default is empty.


STANDALONE

If the DTD is local or specified by URL. Valid values yes or no.

Yes

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 GETLOAD 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. The steps before and after either the GET portion or the LOAD portion of the process starts and ends with a Before and After "event" 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_GET and SP_JAGTEAIM_AFTER_GET for the GET portion of the process, and SP_JAGTEAIM_BEFORE_LOAD and SP_JAGTEAIM_AFTER_LOAD for the LOAD portion of the process, respectively. The step involving the TEAIM GET module exports the data from the source database and moves the data into temporary files. The TEAIM LOAD module then takes this temporary data file and loads that information into the specified table. Figure 2 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
be loaded.

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
used to log any errors that occur into the TE_JOB_PROCESS_LOG table.

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