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!

Complex FILTER Based on SQLEXEC

Relative GG newbie here, looking for some help with how to properly filter an integrated extract to meet our requirements. At a high level, we need to be able to limit the extraction of some tables with a condition of “where object_id in (select object_id from other_table)”. I was able to get an initial load extract to do this combining SQLEXEC and FILTER as follows:

EXTRACT einit
USERIDALIAS srcdb DOMAIN OracleGoldenGate
EXTFILE ei MEGABYTES 250 PURGE 
TABLE PDBORCL.ADMUSER.PROJECT,
  SQLEXEC(ID lookup, &
  QUERY 'select proj_id from admuser.projectx where proj_id = :pid', &
  PARAMS(pid = proj_id), &
  BEFOREFILTER), &
  FILTER (proj_id = lookup.proj_id);

For initial load this is working as expected, it extracts only the records meeting the desired criteria. However, when I put the same into an integrated extract it doesn't pick up any changes. In the source DB, records will move in and out of that projectx table based on users opting projects in/out of a publication service, so what we need is for the extract to pick up projects as they are added to that table.

Any guidance or suggestions for alternative approaches would be greatly appreciated.

Comments
Post Details
Added on Feb 16 2023
2 comments
616 views