Bucket Temporal.RowHistory
Middle East & Asia Globe
Blue Marble
World Map

Goto: Documentation Home | Technical Structure

This bucket returns the history and versioning information for a given row in a temporal data table.

About Temporal Data

Temporal data records the changes to table rows over time and allows you to see the history of changes made to individual rows. While normal auditing functionality can often show you changes, temporal data records and detects changes at a level below auditing, so can detect changes that do not record audit information and can also show actual column values as they were at a previous time.

Logically, a Temporal table is the same as a "normal" table, but with the addition of timestamps and additional recording information. A temporal table does not affect the source table in any way (not even with additional columns, there are none) This means that GDS can support any table as a temporal table, even one where GDS has a read only connection to the source database and is not writing to the tables. When used in this read only mode, GDS performs periodic scans of the source table to detect changes. While this scanning technique is not as detailed, it can often be more than sufficient for many types of data.

When dealing with temporal data in GDS, each row is given a "Temporal File Key" or TFK. This is an opaque value that remains constant for a given row. TFKs are not designed to be used by applications, other than the ability to use them to extract exact records. A TFK is required, rather than the more normal "primary key" of a table as the source table may delete a primary key value, and then reuse it later for a different record.

Bucket Usage

Input Predicates

Field IdDescription
f100Source Table, preferably a GID
f101Temporal Key (NYI)

Header Output Fields

FieldDescription
f110Date/Time the row was first inserted, or discovered.
f111Date/Time the row was most recently changed
f112Date/Time the row was deleted (NYI)
f115Number of versions of the row available. This roughly equates to the number of known changes

Change Record Fields

FieldDescription
f200Date/Time of this change
f201Source IP making change, where available
f202Application making change, where supplied.
f203Type of Change, I,E,D for Insert, Edit or Delete
APPDA single subpacket holds the changes made at this point for an edit.

Example

An example of a row that has been inserted once, and editted once.

<ARAY>
  <APPT>
    <f110>23-september-2009 11:40:56.234</f110>
    <f111>25-september-2009 17:02:06.140</f111>
    <f115>2</f115>
    <APPT>
      <f200>25-september-2009 17:02:06.140</f200>
      <f201>192.168.17.233</f201>
      <f202>Biller.exe</f202>
      <f203>E</f203>
        <APPD>
          <f132>1</f132>
          <f147>22-dec-2009</f147>
          <f112>818.50</f112>
      </APPD>
    </APPT>
    <APPT>
      <f200>23-september-2009 11:40:56.234</f200>
      <f201>192.168.131.15</f201>
      <f202>InternetGW.exe</f202>
      <f203>I</f203>
        <APPD>
          <f100>1234566</f100>
          <f101>Bob & Sue</f101>
          ...
      </APPD>
    </APPT>
  </APPT>
</ARAY>