Data Replication 2
Results 1 to 3 of 3

Thread: Using Global Transformation to Add Column with update date/time field

  1. #1
    DougW is offline US Technical Sales
    Join Date
    Aug 2006
    Location
    Northern California
    Posts
    21
    Rep Power
    0

    Using Global Transformation to Add Column with update date/time field

    Adding a column showing current date/time in either LOCAL time, or UTC time.


    1. Create a new Global Transformation of ‘Add Column’ type, and give it a meaningful name.
    Name:  8-22-2012 07-05-14.png
Views: 432
Size:  42.5 KB

    2. Select which schema and tables to apply transform to on the next step.

    Name:  8-22-2012 07-07-20.png
Views: 406
Size:  29.5 KB

    3. Create Transformation Rule, then save. Examples below show expressions for LOCAL and UTC time.
    • LOCAL TIME:

    Name:  8-21-2012 19-49-54.png
Views: 405
Size:  43.5 KB
    Expression:
    datetime('NOW','LOCALTIME')


    • UTC Time:

    Name:  8-21-2012 19-48-42.png
Views: 412
Size:  37.6 KB
    Expression:
    datetime()
    To Find Out more About Attunity Technology:
    Attunity
    or:
    Contact Us

  2. #2
    vpnicholls is offline Junior Member
    Join Date
    Jun 2016
    Posts
    3
    Rep Power
    0

    What does this date represent?

    When using a timestamp in this way in a global transformation, what does this timestamp represent? Is it the time that record was written to the __ct change table? Or the target table itself? Or some other 'event'?

  3. #3
    Hein is offline Senior Member
    Join Date
    Dec 2007
    Location
    Nashua, NH - USA.
    Posts
    119
    Rep Power
    10
    Quote Originally Posted by vpnicholls View Post
    When using a timestamp in this way in a global transformation, what does this timestamp represent? Is it the time that record was written to the __ct change table? Or the target table itself? Or some other 'event'?
    Some other event. It is the time the event passes through the sorter on the replicate engine and transformations are applied.
    It is during the 'prepare' of the target data columns, before the request to insert/update.

    To get the insert time on target we recommend to add a date-time column on the target table which is NOT provided by Replicate and has a default of the current time.

    The source time is already in the Change table header column.

    Between the Global transformation to add a timestamp, and the source time, and the target time you should have a clear picture of the latencies.

    Hein

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •