Data Replication 2
Results 1 to 3 of 3

Thread: Capture the operation indicator

  1. #1
    mkurup is offline Junior Member
    Join Date
    Aug 2019
    Posts
    7
    Rep Power
    0

    Capture the operation indicator

    Hi,

    I have added a field in the Oracle target table to check if row is coming through as INSERT, UPDATE AND DELETE. This appears not working at all. Can you please suggest how to get this right?

    CASE
    WHEN $AR_H_OPERATION='DELETE' THEN OPERATION_INDICATOR("D",NULL,NULL)
    WHEN $AR_H_OPERATION='UPDATE' THEN OPERATION_INDICATOR("U",NULL,NULL)
    WHEN $AR_H_OPERATION='INSERT' THEN OPERATION_INDICATOR("I",NULL,NULL)
    ELSE
    OPERATION_INDICATOR("F",NULL,NULL)
    END

    Thanks,
    mk

  2. #2
    Hein is offline Senior Member
    Join Date
    Dec 2007
    Location
    Nashua, NH - USA.
    Posts
    163
    Rep Power
    12
    Please define - 'not working at all' - are the change rows replicated?
    - be sure to do initial testing with small controlled test and enable 'store changes'

    "added a field in the Oracle target table " - and it is added to replicate, with the logic you indicate right?

    It seems the operation of 'OPERATION_INDICATOR' is not fully understood.
    It internally executes the case which is showing externally. Please re-read the documentation.

    Just use: operation_indicator('D', 'U', 'I')
    Or maybe (I did NOT test) ifnull(operation_indicator('D', 'U', 'I'),'F')

    For full-load you may want to test for "$AR_H_STREAM_POSITION", not operation.


    Hein.

  3. #3
    mkurup is offline Junior Member
    Join Date
    Aug 2019
    Posts
    7
    Rep Power
    0
    Thank you Hein, I could make the indicator work with $AR_H_OPERATION.

Posting Permissions

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