Generic Table Import XML tag reference
The table import definition is contained in a single XML document, which includes data mapping and reference directives to the specified application table. Below is the XML definition tag reference set:
Main XML document tags
<table-config>
- Definition
- Defines the Generic Table Import XML document.
- Attributes
- None
- Innertags
<table>
(required)
Table tags
<table>
- Definition
- Defines the table to perform the insert, update, or delete operation.
- Attributes
name
(required): The table name.- Inner tags
<fields>
(required)
<fields>
- Definition
- Contains a set of fields to insert or update in the application table.
- Attributes
- None
- Inner tags
-
<field>
(required)
<deletes>
- Definition
- Contains a set of conditional delete instructions for the application table. The tags within this element enable conditional deletes.
- Attributes
- None
- Inner tags
-
<delete>
(required)
<delete>
- Definition
- Describes how to construct and execute a delete statement on the table.
- Attributes
-
type
(required): The occurrence type of the delete operation. These deletion types are available:- PRE: The deletion occurs before the processing of the records.
- POST: The deletion occurs after the processing of the records.
- EACH: The deletion
occurs before each record is imported. This is useful when the delete
statement uses field values that are derived from the imported data. In this
case, when a
<delete-field>
element contains nodefault-value
or<reference>
element, then the value that is used is obtained from the resolved value of the imported data field.
- Inner tags
-
<delete-field>
(required): You can have many<delete-field>
elements. Each<delete-field>
element performs a condition check on a particular field. The<delete-field>
conditions are ANDed together to determine if the record is deleted from the database.
<delete-field>
- Definition
- Defines the field checking condition based on the attributes that
are provided. If the collection of
<delete-field>
condition holds true (evaluates to TRUE), then the record is deleted.This tag set is similar to the where statement in SQL.
- Attributes
-
db-field
(required): The field in the table on which to perform the condition checking. - Inner tags
<reference>
(optional): Used to look up a value from another table to resolve the value to the key.
<field>
- Definition
- Specifies a field (column) in the application database table to import from the data file.
- Attributes
index
(required): The index of the column (field) in the data file (must be unique).- Inner tags
<reference>
(optional)
<reference>
- Definition
- Defines a field lookup from another table to resolve the current
field value.
Example 1: HTYPE_NAME is to be resolved to a HTYPE_ID from the HOUR_TYPE table:
<field name="F" db-field ="HTYPE_ID"> <reference table-name="HOUR_TYPE" supplied-value="HTYPE-NAME" resolve-to-field="HTYPE_ID"/>
Example 2: DEPT_UDF1 is to be resolved to a DEPT_ID for JOB.JOB_VAL1:
<field name="F" db-field ="JOB_VAL1"> <reference table-name="DEPARTMENT" supplied-value="DEPT_UDF1" resolve-to-field="DEPT_ID"/>
- Attributes
table-name
(required): The name of the table to perform the lookup.- Inner tags
- None
<mapping>
- Definition
- Defines a mapping of the current field value. If the
<mapping>
and<reference>
tags are used together, then mapping is performed first before the reference lookup is performed. - Attributes
name
(required): The name of the mapping definition to use. The specified value must exist in the WBINT_MAPPING table (Mapping Definition page).- Inner tags
- None