Example: Job File - Access Module

Teradata Tools and Utilities Access Module Reference

Product
Access Module
Release Number
16.10
Published
July 2017
Language
English (United States)
Last Update
2019-03-27
dita:mapPath
amk1499705096540.ditamap
dita:ditavalPath
amk1499705096540.ditaval
dita:id
B035-2425
lifecycle
previous
Product Category
Teradata Tools and Utilities

The example, which explains the contents of an .amj file, assumes an understanding of the XML specification and the format is subject to change without notice.

Files begin with an XML declaration specifying the XML version and character encoding used and may have comments interspersed as permitted by the XML specification; these comments are discarded when the file is processed.

Following the XML declaration is a processing instruction containing the version number of the first version of the Teradata Access Module for OLE DB that handled the .amj file:

OLE_DB_AXSMOD_FirstCompatibleVersion

After this processing instruction is the root element, named OLE_DB_AXSMOD_Jobs, which has one child element, named Job, which has four child elements: Source, Destination, CharacterEncoding, and might contain CheckpointInterval, LargeDecimalSupport, RowsPerFetch, BufferSize, and EnableScrollBackwards.

Source – The Source element can contain the following:

  • One child element named DataSourceParseName

    A DataSourceParseName element contains an altered parse name uniquely identifying the selected OLE DB provider.

  • One child element named DataSourceProperties
    • A DataSourceProperties element contains the values of all properties needed to initialize the provider, including provider-specific properties. It contains one child PropertySet element for each property set supported by the provider.
    • Each PropertySet element contains one child PropertySetId element followed by one child Property element for each supported property in that property set.
    • A PropertySetId element contains identification of a property set. For some property sets, the Teradata Access Module for OLE DB associates a symbolic name for the property set; for example, DBPROPSET_DBINIT. For these property sets, the identification is the altered symbolic name. For other property sets (such as, many provider-specific property sets) the identification is an altered textual representation of the GUID identifying the property set; for example, {c200e360-38c5-11ce-ae62-08002b2b79ef}.
    • Each Property element contains one PropertyId element followed by one PropertyType element followed by one PropertyValue element.
    • A PropertyId element contains the identification of a property (within a property set). For some properties, the Teradata Access Module for OLE DB associates a symbolic name for the property; for example, DBPROP_INIT_TIMEOUT. For these properties, the identification is the altered symbolic name. For other properties (such as, many provider-specific properties), the identification is the altered textual hexadecimal representation of the integer identifying the property; for example, 0x43.

      A property's value may be included in one of two ways. The first method is used when the property value can be converted to a string (VT_BSTR) and then back to the original value using the features supplied by the COleVariant class (which is part of the Microsoft Foundation Classes (MFC)). Otherwise, the second method is used.

      When the first method is used, a PropertyType element contains the data type associated with the property and a PropertyValue element contains the altered textual representation of the value for the property. For some PropertyType elements, the Teradata Access Module for OLE DB knows a symbolic name for the data type; for example, VT_I4. For these types, PropertyType contains the altered symbolic name. For other data types, PropertyType contains the altered textual hexadecimal representation of the type number; for example, 0x43.

      When the second method is used, PropertyType contains “ARCHIVED” and the PropertyValue element contains the altered byte pattern obtained in an archive by dumping the property value to an archive (managed by an object of the MFC CArchive class) using the COleVariant insertion (<<) operator.

      To learn more about OLE DB defined properties, see the OLE DB Programmer's Reference at http://msdn.microsoft.com/library/. For documentation of provider-specific properties, consult the documentation or supplier of the relevant OLE DB provider.
  • One child element named TableSelection or one child element named TableName or one child element named TableCommand.
    • The TableSelection element is present when a source table is selected from the tree control. It contains one child element named Catalog, followed by one child element named Schema, followed by one child element named Name.
    • The Catalog element contains the altered name of the catalog of the table selected by the user. The Schema element contains the altered name of the schema of the table selected by the user. The Name element contains the altered name of the table selected by the user. When a source table is specified by name using the edit control, the Source element has a child element named TableName containing the altered table name.

    The TableCommand element is present when a source table has been specified by command using the edit control, for example, a SQL SELECT... command.

    The precise manner in which the OLE DB provider uses catalog names, schema names, table names, and commands is specific to the provider. Consult the documentation or supplier of the relevant OLE DB provider for details relating to a particular provider.
  • One child element named LocationOfLogTables and one child element named OtherDatabase:
    • The contents of the LocationOfLogTables depends on which option you select in the Location of log tables frame on the Teradata OleLoad – Advanced Settings dialog box. If you select the User's default database option, then the LocationOfLogTables element is zero. This option is enabled in the export job operation. If you select the Source database option, then the LocationOfLogTables element is 1. If you select the Other database option, then the LocationOfLogTables element is 2.
      The OtherDatabase element contains the altered string from the Other database box in the Teradata OleLoad – Advanced Settings dialog box.
  • One child element named Columns:
    • The Columns element contains one child element named Column for each column in the selected source table. Each Column element contains one empty child element named Selected, if the column is selected. If the column is not selected, the Selected child element is not present. Each Column element also contains one child element named SourceName, followed by one child element named DestinationName, followed by one child element named TypeName.
    • A SourceName element contains the altered name of the source column. This is the name that appears in the Src. Column Name column of the list of available columns in OleLoad. When you click Teradata Database from the Select a source list, this name is derived from the source Teradata Database by issuing a HELP COLUMN command and removing trailing SPACE (“ ”) characters from the returned Column Name value. When you select an OLE DB provider from the Select a source list, this name is the name returned in the pressmen field of the DBCOLUMNINFO structure by the IColumnsInfo::GetColumnInfo() method when applied to the source table.
    • A DestinationName element contains the altered destination column name. This is the name that appears in the Dest. Column Name column of the list of available columns in OleLoad. Often this name is the same as the source column name, but it need not be the same. You can change the name using OleLoad.
    • A TypeName element contains the altered Teradata data type name for the column. This is the name that appearing in the Data Type column of the list of available columns.

Destination – The Destination element contains one child element named TableName, and may contain one child element named DataSourceParseName, one child element named DataSourceProperties, one child element named ReferentialIntegrityIsChecked, and one child element named IndexUpdatesAreRequired.

  • A TableName element that is a child of the Destination element contains the altered name of the destination table. This is the name in the Table name box in the Edit the table name frame of the Teradata OleLoad – Advanced Settings dialog box.

    If you select the Referential integrity check check box in the Bulk Loading Options frame of the Teradata OleLoad – Advanced Settings dialog box, the ReferentialIntegrityIsChecked element is present. This element sets the DBPROPVAL_BO_REFINTEGRITY bit in the DBPROP_ROW_BULKOPS property in the DBPROPSET_ROWSET property set used to create the rowset for the destination table. The ReferentialIntegrityIsChecked element serves as a hint to the destination provider that referential integrity constraints do not need to be checked or enforced for changes made through the rowset. This is effective only during exports to a provider that supports DBPROPVAL_BO_REFINTEGRITY.

    If you select the Index updates required check box in the Bulk Loading Options frame of the Teradata OleLoad – Advanced Settings dialog box, the IndexUpdatesAreRequired element is present. This element sets the DBPROPVAL_BO_NOINDEXUPDATE bit in the DBPROP_ROW_BULKOPS property in the DBPROPSET_ROWSET property set used to create the rowset for the destination table. The IndexUpdatesAreRequired element serves as a hint to the destination provider that the provider is not required to update indexes based on inserts or changes to the rowset. Any indexes need to be recreated following changes made through the rowset.

  • Character Encoding – The CharacterEncoding element contains the altered character set name for this job.
  • CheckpointInterval – The CheckpointInterval element contains the altered string from the Checkpoint Interval box in the Teradata OleLoad – Advanced Settings dialog box when you enter any integral value.
  • LargeDecimalSupport – The LargeDecimalSupport element contains Supported and NotSupported. If Supported, the access module can return DECIMAL values greater than 18 digits; otherwise the maximum returned DECIMAL values is 18 or less.
  • RowsPerFetch – The RowsPerFetch element, if present, contains the value specified in the Advanced Settings dialog box.
  • BufferSize – The BufferSize element, if present, contains the value specified in the Advanced Settings dialog box. If not present, the default BufferSize used for data transfer is 1,048,576 bytes.
  • EnableScrollBackwards – The EnableScrollBackwards element, if present, contains the value specified in the Advanced Settings dialog box.