GoldenGate Newb question ???

From: Kenny Payton <k3nnyp_at_gmail.com>
Date: Wed, 7 Mar 2018 17:28:42 -0500
Message-Id: <CC72B955-E641-4BFD-A443-82B7965A605C_at_gmail.com>



When I say newb I mean I’ve spent about 2 days setting up a test environment to stream changes to Kafka.

I’m trying to capture rows where particular columns have had their contents changed. Change in this context is when the column is updated from null, set to null from an existing value or set to a differing value.

Below is a MAP FILTER I’ve came up with but was hoping there was a more elegant way of doing it. Any alternatives I should be looking at?

FILTER
(
  (
( _at_COLTEST(col1, PRESENT) AND @COLTEST( @BEFORE(col1), PRESENT ) AND ( @STREQ(col1, @BEFORE(col1) ) = 0 ) )
    OR
( _at_COLTEST(col1, PRESENT) AND @COLTEST( @BEFORE(col1), NULL ) )
    OR
( _at_COLTEST(col1, NULL) AND @COLTEST( @BEFORE(col1), PRESENT ) )
  )

  OR

  (
( _at_COLTEST(col2, PRESENT) AND @COLTEST( @BEFORE(col2), PRESENT ) AND ( @STREQ(col2, @BEFORE(col2) ) = 0 ) )
    OR
( _at_COLTEST(col2, PRESENT) AND @COLTEST( @BEFORE(col2), NULL ) )
    OR
( _at_COLTEST(col2, NULL) AND @COLTEST( @BEFORE(col2), PRESENT ) )
  )

)--
http://www.freelists.org/webpage/oracle-l Received on Wed Mar 07 2018 - 23:28:42 CET

Original text of this message