Feature Representation

Features read from a DB2 database consist of a series of attribute values. They have no geometry.

The attribute names are as defined in the DEF line if the first form of the DEF line was used. If the second form of the DEF line was used, then the attribute names are as they are returned by the query, and as such may have their original table names as qualifiers. The feature type of each DB2 feature is as defined on its DEF line.

Features written to the database have the destination table as their feature type, and attributes as defined on the DEF line.

DATE, TIME, and DATETIME Fields

When a DATE,TIME or TIMESTAMP field is read by the DB2 reader, two attributes are set in the FME feature. The first attribute is has the name of the database column, and its value is of the form YYYYMMDD or HHMMSS. This is compatible with all other FME date and time values.

The second attribute has a suffix of .full and is of the form YYYYMMDDHHMMSS. It specifies the date and the time, with the time portion specified using the 24-hour clock.

For example, if a date field called UPDATE_DATE is read, the following attributes will be set in the retrieved FME feature:

UPDATE_DATE =’19980820’ 
UPDATE_DATE.full=’19980820000000’

The DB2 writer looks for both attributes when a date or datetime column is being output. Either may be specified. If both attributes are specified, then the value specified in UPDATE_DATE.full is used to populate the DATE or DATETIME portion of the date; otherwise, this portion is set to 0.