Skip to Main Content

GoldenGate

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Compare before and after image in OGG 12c

User_A4Y9QJun 13 2018 — edited Jul 2 2018

Hi -

I have a requirement where I need to capture updates only when the column before image and after image values are different.

I cannot use coltest because the update comes from a toll and it will include all caolumns in the update statement even if the value is not being changed.

I tried below filters but nothing worked as expected:

--table SCHEMA.TABLE_NAME, FILTER (ON UPDATE, (@STREQ (@BEFORE (COLUMNA), @AFTER (COLUMNA)) <>0));

--table SCHEMA.TABLE_NAME, FILTER (ON UPDATE,(1 = @streq (before.COLUMNA, COLUMNA)));

--table SCHEMA.TABLE_NAME, FILTER (ON UPDATE,(0 = @streq (before.COLUMNA, COLUMNA)));

Just an example of wht I am expecting:

we have column A value is empty
now we have it updated to X        -- this needs to be captured as before image is diff from after image
again we have an update but value of column A is still X       -- this should not be captured as both before and after images are same
again we have another update and column A value is now Y      -- this needs be captured as before image is diff from after image

I need to put filter on the extract itself because in extract I am calling a proc based on the filter which inserts data into another table.

So can someone help how I can compare before and after images values on update in extract for OGG version 12c.

Thanks

Praveen

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 30 2018
Added on Jun 13 2018
10 comments
1,250 views