HiRDB Datareplicator Version 8 Description, User's Guide and Operator's Guide

[Contents][Glossary][Index][Back][Next]

4.3.7 Creating a time-ordered information table

This section explains the procedure for creating a time-ordered information table.

Organization of this subsection
(1) Available time-ordered information
(2) Defining a table for collection of time-ordered information
(3) Notes about the data that is imported to a time-ordered information table

(1) Available time-ordered information

By specifying timestamp in the to clause of the import table definition, you can obtain a historical record of update information in chronological order. However, time-ordered information might not be available, depending on the type of update processing. If Datareplicator cannot obtain the specified time-ordered information, it sets the null value.

The following table shows the contents and availability of time-ordered information.

Table 4-30 Contents and availability of time-ordered information

Information Description Availability
Update Insert Delete PURGE
Extraction date Date update information was output to the update journal at the source system Y Y Y Y
Extraction time Time update information was output to the update journal at the source system Y Y Y Y
Extraction time stamp Date and time update information was output to the update journal at the source system Y Y Y Y
Import date Date update information was imported into the target database at the target system Y Y Y Y
Import time Time update information was imported into the target database at the target system Y Y Y Y
Import time stamp Date and time update information was imported to the target database at the target system Y Y Y Y
Import type Import type, indicated as follows:
Update: upd
Insert: ins
Delete: del
PURGE: purge
Y Y Y Y
Mapping key Key value used to identify the data to be updated Y Y Y N/A
Update information Updated data Y Y N/A N/A

Y: Available.

N/A: Becomes the null value.

(2) Defining a table for collection of time-ordered information

To collect time-ordered information, such as update information, import dates, and import times, you must create in advance in the target HiRDB database a table for storing this information (time-ordered information table). You can specify any name for the table and you must specify the table's column structure (number of columns, order of columns, column names). You must define the column attributes as appropriate for the information to be collected. Depending on the type of information, you might have to specify a literal in the const clause in the update information field definition.

The following table shows the column attributes of a time-ordered information table and the specification in the const clause.

Table 4-31 Column attributes for a time-ordered information table and the specification in the const clause

Information to be collected Column attribute Specification in the const clause in the update information field definition
Extraction date DATE extract_date
Extraction time TIME extract_time
Extraction time stamp TIMESTAMP[(p)]#, p = 0, 2, 4, 6 extract_timestamp
Import date DATE reflect_date
Import time TIME reflect_time
Import time stamp TIMESTAMP[(p)]#, p = 0, 2, 4, 6 reflect_timestamp
Import type CHAR(5) reflect_kind
Mapping key Attribute that allows storage of mapping keys N/A
Update information Attribute that allows storage of update information N/A

N/A: Not applicable.

#
p is an integer representing the number of decimal places displayed for the seconds value. For example, p = 2 means that the seconds value is to be obtained out to two decimal places.

Note the following about using time-ordered information:

(3) Notes about the data that is imported to a time-ordered information table