QUOTE (burleson @ Mar 8 2017, 11:28 AM)
>> is it possible to completely replace built-in GG mechanism for target records insert/update with custom stored procedure wich takes care of both mapping and serialization logic?
Yes, I'm sure it's possible, but I'm not a GG expert, sorry . . .
This might help, my notes on colmap:http://www.dba-oracle.com/t_goldengate_column_mapping.htm
Thank you. Have tested - that is possible indeed. Simply remove "TARGET" clause in replicat configuration and provide SQLEXEC. Another importatnt element - you need to add "EXEC SOURCEROW" to SQLEXEC expression to force GG to execute SQL on each row in transaction.
Example (I use SP in Oracle package):
MAP SCOTT.MYTABLE, SQLEXEC (
SPNAME SCOTT.TEST_PKG.map_MYTABLE, ID map_MYTABLE,
PARAMS(P_ID=ID, P_REC_CREATE_DT=REC_CREATE_DT, P_NAME=NAME, P_ADDRESS=ADDRESS),
Such mapping results in warning message in error log, like
2017-03-24 14:11:28 WARNING OGG-10173 Oracle GoldenGate Delivery for Oracle, test_replicat.prm: (test_replicat.prm) line 93: Parsing error, required parameter option [target] is missing.
But despite the warning the replicat works well.