OLE DB Access Module amj file having multiple jobs

Connectivity
Connectivity covers the mechanisms for connecting to the Teradata Database, including driver connectivity via JDBC or ODBC.
Teradata Employee

OLE DB Access Module amj file having multiple jobs

OLE DB Access Module amj files or Access Module Job files contain the following information:

  • Data source details (Database Name, Driver used to connect to database) for the both source and destination.
  • Table name for the data source supplying data
  • List of columns for the data source supplying data

All the information is stored in XML format and is stored under a JOB element.

Prior to OLE DB Access Module 14.00 a single amj file can only contain a single JOB element. This old amj file can be used with newer versions of the OLE DB Access Module.

In case of any parameter change (Source Database or Destination Database or Source Table or List of columns in source Table) a new JOB element is required and this enforces the creation of a new amj file.

It’s a cumbersome task to maintain many amj files or job files.

In OLE DB Access Module 14.00 a new feature has been incorporated which allows the union of multiple amj files to a single amj file.

In OLE DB Access Module 14.00 amj file different jobs will be identified through their jobid’s.

Adding multiple jobs to OLE DB Access Module14.0 amj file           

  1. From Teradata OleLoad dialog box click File->Open to open the Open Dialog box.

  1. Select an old amj file (1st) and click open.(Note: The amj file will open in unsaved mode because the JOB element will now have a jobid attribute and the jobid value will be 1) 

  1. From Teradata OleLoad dialog box click File->”Save As” to open the Save Dialog box and save the amj file in a new format.This will save the job as job1 in 1st amj file. 

  1. Repeat step1 and step2 to open a 2nd amj file

  1. From Teradata OleLoad dialog box click File->”Save As” to open the Save Dialog box and click 1st amj file
  2. Check the append check box and click save.

  1. The unsaved job will be saved as Job2 in 1st amj file

(If append option is not clicked then OLE DB Access Module will overwrite job1 in 1st amj file and save the unsaved job as job1 in 1st amj file.)

Using OLE DB Access Module14.0 amj file which contains multiple jobs

  1. From the Teradata OleLoad dialog box click File->Open to open the Open Dialog box.
  2. Select an amj file which has multiple job elements and click open.
  3. A job list window will pop up.Select the job of your choice and click OK. Teradata Oleload will load the job.

  1. In SA/TPT scripts use ‘jobid = jobnum’ in the Oledb Access Module Initialization String to select the desired job.jobid is the Oledb Access Module Initialization String attribute . jobnum is a positive integer and jobnum should be greater than 0

 Miscellaneous Facts

  • User scenario examples

User has 2 OLE DB Access Module 14.0 amj files, say test.amj and test1.amj.

  • test.amj has 25 jobs stored in it.
  • test1.amj has 30 jobs stored in it.

1. User opened Job30 from test1.amj file and wants to store the same job in test.amj file.

In such a scenario the job will be stored as job26 in test.amj file irrespective of whether the append check box is clicked or not at the time of saving as there is no job30 in test.amj file.

2. User opened job15 from test1.amj and wants to store the same in test.amj file.

In such a scenario the job will be stored as job26 in test.amj file if the append check box is clicked at the time of saving.

If the append check box is not clicked then OLE DB Access Module will overwrite the job15 already present in test.amj file.

  • For performance reason it’s recommended not to store more than 50 jobs in a single amj file.
  • The OLE DB Access Module supports different session character sets.

The OLE DB Access Module 14.00 amj file encoding will be UTF-8 for all but the UTF-16 session character set.The OLE DB Access Module 14.00 amj file encoding will be UTF-16 for the UTF-16 session character set.It’s recommended to maintain a separate amj file for all the jobs which uses the UTF-16 session character set.