Handling Time Values in the Distant Past or Far Future - Aster Client

Teradata Aster® Client Guide

Product
Aster Client
Release Number
7.00
Published
May 2017
Language
English (United States)
Last Update
2018-04-13
dita:mapPath
hki1475000360386.ditamap
dita:ditavalPath
Generic_no_ie_no_tempfilter.ditaval
dita:id
B700-2005
lifecycle
previous
Product Category
Software
Due to a limitation of Informatica SDK, time or timestamp values that are either far in the past or the future get transferred incorrectly. See the following examples:
  • 1580-12-31 12:29:59.001234000 is converted to 1580-12-05 12:29:59.000999
  • 4900-01-01 22:00:00.000 is converted to 4900-02-02 22:00:00
  • 9999-01-01 20:00:00.000 is converted to 9999-03-22 21:00:00

Teradata has identified the cause for this as Infa SDK's bug in handling getLong and setLong functions based on the following note in Informatica® Corporation PowerCenter® Version 8.1.1 SP5 Release Notes, March 2008.

“CR 92842: Cannot use getLong or setLong APIs for values higher than maximum integer and smaller than maximum long value in a Java Custom transformation: The getLong and setLong APIs in the InputBuffer interface for a Java Custom transformation do not return the correct values. The values are not correct if the values returned by the APIs are larger than the maximum Java integer value but smaller than the maximum Java long value.”

Use this workaround in the PowerCenter Designer to export or import time or timestamp values in the distant past or far future:

  1. Open the Source Analyzer and make these changes:
    1. Double-click the table to open the Edit Tables dialog box.
    2. Click the Columns tab.
    3. For the time field, change its type to varchar and its precision to 15.
    4. For the timestamp field, change the type to varchar and its precision to 26.
    5. Save the repository.
  2. Open the Target Designer and make these changes for the Target field:
    1. Double-click the table to open the Edit Tables dialog box.
    2. Click the Columns tab.
    3. For the time field, change its type to varchar and its precision to 15.
    4. For the timestamp field, change the type to varchar and its precision to 26.
    5. Save the repository.