Generic Table Import Interface logic

The Generic Table Import Interface uses the import interface framework to read in a CSV file into the staging table and translate the data into a table using XML mapping directives that are defined in the Mapping Definitions page (WBINT_MAPPING table).

You must create a mapping definition for each table to which you want to import data. See Generic Table Import XML tag reference and Generic Table Import DTD.

<deletes> sample

The Generic Table Import Interface contains an extensive delete mechanism for looking-up and deleting records. This is all configured through the XML definition file.

This code block is a sample of an XML definition file:

<deletes>
  <delete type="PRE">
    <delete-field db-field="RESDET_DATE" 
      default-value="!SYSTEM_DATE" day="SAT" condition="GREATER" 
        offset="-7"/>
    <delete-field db-field="RESDET_DATE" 
      default-value="!SYSTEM_DATE" day="SAT" 
      condition="LESS_EQUALS"/>
    <delete-field db-field="INVTYP_ID" default-value="1" 
      condition="EQUALS"/>
  </delete>
</deletes>
If !SYSTEM_DATE=01/12/2004, the previous definition translates to this WHERE condition of the SQL statement:
WHERE (RESDET_DATE > 01/03/2004) AND 
(RESDET_DATE <= 01/10/2004) AND (INVTYP_ID = '1')
  • The day="SAT" attribute indicates that the system is to use the previous Saturday relative to the default-value date (01/12/2004).
  • The offset="-7" attribute indicates that the system is to use the date that is 7 days before the default-value date (01/12/2004).

Logic validation

This validation logic is applied during the import transaction:

Validation Error Action Message
XML is not valid against the DTD. Return stream is not valid XML: {msg}.
One of the index attributes is not an integer. Index attribute must be an integer.
One of the index attributes is not between 1 and 104. Index attribute must be between 1 and 104.
Index attribute is not unique. Index attribute must be unique; {0} is defined more than once.
db-field attribute is not unique. db-field attribute must be unique; {0} is defined more than once.
If transaction-type is INSERT_UPDATE, DELETE, or UPDATE and no fields are defined as the key-fields attribute or the defined fields are not valid. Transaction type is INSERT_UPDATE, DELETE, or UPDATE but no field is defined with update-key attribute or defined fields are not valid.
Mapping name does not exist in the WBINT_MAPPING table (Mapping Definitions page). Mapping {0} not found.
The date-format attribute is used in a field that is not of date type. Field: {0} has date-format but the attribute is not Date type.
Primary-key field exists in one of db-fields. Primary Field: {0} cannot exist in db-field tag
The reference table is same as the application table using the reference. Reference table: {0} cannot be same as transaction table.
Table in the <table> tag is not found in the application database. Transaction table {0} not found.
The field listed in <db-field> does not exist in the application table. Database column {0} not found in table {1}.
The value in the table-name attribute in the <reference> element is not found in the application database. Reference table {0} not found.
Columns in supplied-value and resolve-to-field attributes do not exist in the reference table. Database column {0} not found in reference table {1}
The TRANSACTION_TYPE that is determined by an import record is not valid. Transaction type: {0} not valid