Re: How to replicate additional column using Goldengate Big Data Adapter?

From: Redacted sender <Shane>
Date: Tue, 19 Jan 2021 11:11:07 -0500
Message-Id: <B5F225E1-9C57-48DF-B8C5-BEF422CE84D9_at_yahoo.com>



You won’t be able to map the token in the replicat if you are using the big data adapter. Just ran into this limitation the other day. The COLMAP function doesn’t work at least in OGG Big Data 19c.

You will have to do that upstream in the pump (or extract if possible) and then once it gets to the replicat, it will look like a real column.

There are at least 3 MOS notes that discuss this:

BD Adapter Abend Error COLMAP Initializing Avro Metadata Provider (Doc ID 2216100.1) GoldenGate BigData ElasticSearch Does Not Allow COLMAP In Replicat (Doc ID 2455309.1) Colmap Does Not Work With Kafka Handler (Doc ID 2506990.1)

---

Thanks,


Shane Borden
sborden76_at_yahoo.com



> On Jan 19, 2021, at 9:24 AM, Sourav Biswas <biswas.sourav_at_hotmail.com> wrote:
>
> Hi Bobby,
>
> I modified the Extract & Replicat params file(shown below). However, the replicat Abends with same error for fresh data load. It looks like whenever, I introduce new Column Name(SOURCE_DB_NAME) it fails, but when I use an existing column from Source table, it works fine and overwrites the data with Token Value.
>
> Please suggest work around.
>
> Current Extract Params:-
>
> TABLE XYZ.PCM,tokens(DBNAME1=_at_GETENV('GGFILEHEADER', 'DBNAME'));
>
> Current Replicat Params:-
>
> MAP XYZ.PCM, TARGET XYZ.PCM, COLMAP(USEDEFAULTS, SOURCE_DB_NAME=_at_TOKENS('DBNAME1'));
>
> Replicat Abends with same error message:-
>
> 2021-01-19 19:19:33 INFO OGG-15056 The definition for target table XYZ.PCM is derived from the source table XYZ.PCM.
> ...(USEDEFAULTS, SOURCE_DB_NAME=_at_...
> ^
> Error in COLMAP clause. Unrecognized clause or element.
>
> Source Context :
> SourceModule : [er.mapping]
> SourceID : [er/mapping.cpp]
> SourceMethod : [get_map_entry]
> SourceLine : [3089]
> ThreadBacktrace : [17] elements
> : [/goldengatecu/goldengate/ggsolace/libgglog.so(CMessageContext::AddThreadContext())]
> : [/goldengatecu/goldengate/ggsolace/libgglog.so(CMessageFactory::CreateMessage(CSourceContext*, unsigned int, ...))]
> : [/goldengatecu/goldengate/ggsolace/libgglog.so(_MSG_String(CSourceContext*, int, char const*, CMessageFactory::MessageDisposition))
> ]
> : [/goldengatecu/goldengate/ggsolace/replicat(get_map_entry(ggs::gglib::ggunicode::UString const&, int, wc_def*, ObjectMetadataReques
> t const&, unsigned int, unsigned int, ggs::gglib::ggmetadata::MetadataContext&, ggs::gglib::ggmetadata::TableManager&, unsigned int, ggs::gglib::ggmetadata::CT
> blMetadata*, ggs::gglib::ggmetadata::CMetadataReader*, bool, bool, bool))]
> : [/goldengatecu/goldengate/ggsolace/replicat(wc_def::resolve_wc_entry(ObjectMetadataRequest const&, int, ggs::gglib::ggapp::CQualDBO
> bjName<(DBObjType)1>*, ggs::gglib::ggmetadata::MetadataContext&, ggs::gglib::ggmetadata::TableManager&, ggs::gglib::ggmetadata::CTblMetadata*, ggs::gglib::ggme
> tadata::CMetadataReader*))]
> : [/goldengatecu/goldengate/ggsolace/replicat(WILDCARD_check_table(ObjectMetadataRequest const&, bool, bool, unsigned int, ggs::gglib
> ::ggapp::CQualDBObjName<(DBObjType)1>*, ggs::gglib::ggmetadata::TableManager&, ggs::gglib::ggmetadata::CTblMetadata*, ggs::gglib::ggmetadata::CMetadataReader*,
> bool, ggs::gglib::gglcr::CommonLCR*))]
> : [/goldengatecu/goldengate/ggsolace/replicat(ggs::er::ERContext::findSourceMetadata(ggs::gglib::ggapp::CQualDBObjName<(DBObjType)1>
> const&, int, ggs::gglib::ggmetadata::CTblMetadata*, ggs::gglib::ggmetadata::CMetadataReader*, bool))]
> : [/goldengatecu/goldengate/ggsolace/replicat(ggs::gglib::ggapp::ReplicationContext::sourceMetadataLookup(ggs::gglib::gglcr::CommonLC
> R const*))]
> : [/goldengatecu/goldengate/ggsolace/replicat(ggs::er::ReplicatContext::processReplicatLoop())]
> : [/goldengatecu/goldengate/ggsolace/replicat(ggs::er::ReplicatContext::run())]
> : [/goldengatecu/goldengate/ggsolace/replicat()]
> : [/goldengatecu/goldengate/ggsolace/replicat(ggs::gglib::MultiThreading::MainThread::ExecMain())]
> : [/goldengatecu/goldengate/ggsolace/replicat(ggs::gglib::MultiThreading::Thread::RunThread(ggs::gglib::MultiThreading::Thread::Threa
> dArgs*))]
> : [/goldengatecu/goldengate/ggsolace/replicat(ggs::gglib::MultiThreading::MainThread::Run(int, char**))]
> : [/goldengatecu/goldengate/ggsolace/replicat(main)]
> : [/lib64/libc.so.6(__libc_start_main)]
> : [/goldengatecu/goldengate/ggsolace/replicat()]
>
> 2021-01-19 19:19:33 ERROR OGG-00919 Error in COLMAP clause.
>
>
>
>
>
>
>
> Best Regards,
> Sourav Biswas
> +91-9650017306
>
> From: oracle-l-bounce_at_freelists.org <oracle-l-bounce_at_freelists.org> on behalf of Sourav Biswas <biswas.sourav_at_hotmail.com>
> Sent: Tuesday, January 19, 2021 7:17 PM
> To: Bobby Curtis <curtisbl_at_gmail.com>; Oracle Mailinglist <oracle-l_at_freelists.org>
> Subject: Re: How to replicate additional column using Goldengate Big Data Adapter?
>
> Hi Bobby,
>
> Thank you for your prompt response. Let me try this out, I will get back with you shortly.
>
>
>
>
> Best Regards,
> Sourav Biswas
> +91-9650017306
>
> From: Bobby Curtis <curtisbl_at_gmail.com>
> Sent: Tuesday, January 19, 2021 6:34 PM
> To: biswas.sourav_at_hotmail.com <biswas.sourav_at_hotmail.com>; Oracle Mailinglist <oracle-l_at_freelists.org>
> Subject: Re: How to replicate additional column using Goldengate Big Data Adapter?
>
> Morning/Evening,
>
> In short, TOKENS are going to be your friend with this approach.
>
> Define a Token:
>
> TABLE <table>, TOKENS(<token name> = <token data>);
>
> Looks something like this (in extract):
>
> TABLE XYZ.PCM, TOKENS (DBNAME1=_at_GETENV(‘GGFILEHEADER’, ‘DBNAME’));
>
> Then in the replicat file:
>
> MAP XYZ.PCM, TARGET XYZ.PCM, COLMAP(USEDEFAULTS, STATUS=_at_TOKENS(‘DBNAME1’));
>
> This should get what you want out of the adapter.
>
> -Bobby Curtis
> bobby.curtis_at_rheodata.com <mailto:bobby.curtis_at_rheodata.com>
>
>
> From: "oracle-l-bounce_at_freelists.org" <oracle-l-bounce_at_freelists.org> on behalf of Sourav Biswas <biswas.sourav_at_hotmail.com>
> Reply-To: "biswas.sourav_at_hotmail.com" <biswas.sourav_at_hotmail.com>
> Date: Tuesday, January 19, 2021 at 6:39 AM
> To: Oracle Mailinglist <oracle-l_at_freelists.org>
> Subject: How to replicate additional column using Goldengate Big Data Adapter?
>
> Hello All,
>
> How to replicate additional column using Goldengate Big Data Adapter?
>
> Source Database Version: 12.1.0.2
> Source Goldengate Version: 12.2.0.2.2
> Target Goldengate Big Data Adapter: 19.1.0.0.5
> Target Destination: Solace
>
> Source Table Definition:
> SQL> desc XYZ.PCM
> Name Null? Type
> ----------------------------------------- -------- ----------------------------
> PAYMENT_CODE NUMBER(10)
> PAYMENT_DESCRIPTION VARCHAR2(240)
> TYPE_PG_NAME VARCHAR2(240)
> GL_CODE NUMBER
> CATEGORY VARCHAR2(240)
> STATUS VARCHAR2(240)
> SETTLEMENT VARCHAR2(240)
> COMMISSION NUMBER
> SETTLEMENT_DAYS NUMBER
>
> Replicat Param File:
> REPLICAT REPFXMT1
> TARGETDB LIBFILE libggjava.so SET property=dirprm/REPFXMT1.props
> REPORTCOUNT EVERY 1 MINUTES, RATE
> REPLACEBADCHAR SPACE
> --MAP XYZ.PCM, TARGET XYZ.PCM;
> --MAP XYZ.PCM, TARGET XYZ.PCM , COLMAP(USEDEFAULTS, DBNAME = _at_GETENV ('GGFILEHEADER', 'DBNAME'));
> MAP XYZ.PCM, TARGET XYZ.PCM, COLMAP(USEDEFAULTS, STATUS = _at_GETENV ('GGFILEHEADER', 'DBNAME'));
>
> When we try to replicate 9 columns from source to target using “MAP XYZ.PCM, TARGET XYZ.PCM;” clause, it works fine.
>
> However, when we try to replicate addition column using “MAP XYZ.PCM, TARGET XYZ.PCM , COLMAP(USEDEFAULTS, DBNAME1 = _at_GETENV ('GGFILEHEADER', 'DBNAME'));”clause, it fails with below error;
>
> 2021-01-18 15:04:38 INFO OGG-15056 The definition for target table XYZ.PCM is derived from the source table XYZ.PCM.
> ...(USEDEFAULTS, DBNAME1 =...
> ^
> Error in COLMAP clause. Unrecognized clause or element.
>
> Source Context :
> SourceModule : [er.mapping]
> SourceID : [er/mapping.cpp]
> SourceMethod : [get_map_entry]
> SourceLine : [3089]
> ThreadBacktrace : [17] elements
> : [/goldengatecu/goldengate/ggsolace/libgglog.so(CMessageContext::AddThreadContext())]
> : [/goldengatecu/goldengate/ggsolace/libgglog.so(CMessageFactory::CreateMessage(CSourceContext*, unsigned int, ...))]
> : [/goldengatecu/goldengate/ggsolace/libgglog.so(_MSG_String(CSourceContext*, int, char const*, CMessageFactory::MessageDisposition))]
> : [/goldengatecu/goldengate/ggsolace/replicat(get_map_entry(ggs::gglib::ggunicode::UString const&, int, wc_def*, ObjectMetadataRequest const&, unsigned int, unsigned int, ggs::gglib::ggmetadata::MetadataContext&, ggs::gglib::ggmetadata::TableManager&, unsigned int, ggs::gglib::ggmetadata::CTblMetadata*, ggs::gglib::ggmetadata::CMetadataReader*, bool, bool, bool))]
> : [/goldengatecu/goldengate/ggsolace/replicat(wc_def::resolve_wc_entry(ObjectMetadataRequest const&, int, ggs::gglib::ggapp::CQualDBObjName<(DBObjType)1>*, ggs::gglib::ggmetadata::MetadataContext&, ggs::gglib::ggmetadata::TableManager&, ggs::gglib::ggmetadata::CTblMetadata*, ggs::gglib::ggmetadata::CMetadataReader*))]
> : [/goldengatecu/goldengate/ggsolace/replicat(WILDCARD_check_table(ObjectMetadataRequest const&, bool, bool, unsigned int, ggs::gglib::ggapp::CQualDBObjName<(DBObjType)1>*, ggs::gglib::ggmetadata::TableManager&, ggs::gglib::ggmetadata::CTblMetadata*, ggs::gglib::ggmetadata::CMetadataReader*, bool, ggs::gglib::gglcr::CommonLCR*))]
> : [/goldengatecu/goldengate/ggsolace/replicat(ggs::er::ERContext::findSourceMetadata(ggs::gglib::ggapp::CQualDBObjName<(DBObjType)1> const&, int, ggs::gglib::ggmetadata::CTblMetadata*, ggs::gglib::ggmetadata::CMetadataReader*, bool))]
> : [/goldengatecu/goldengate/ggsolace/replicat(ggs::gglib::ggapp::ReplicationContext::sourceMetadataLookup(ggs::gglib::gglcr::CommonLCR const*))]
> : [/goldengatecu/goldengate/ggsolace/replicat(ggs::er::ReplicatContext::processReplicatLoop())]
> : [/goldengatecu/goldengate/ggsolace/replicat(ggs::er::ReplicatContext::run())]
> : [/goldengatecu/goldengate/ggsolace/replicat()]
> : [/goldengatecu/goldengate/ggsolace/replicat(ggs::gglib::MultiThreading::MainThread::ExecMain())]
> : [/goldengatecu/goldengate/ggsolace/replicat(ggs::gglib::MultiThreading::Thread::RunThread(ggs::gglib::MultiThreading::Thread::ThreadArgs*))]
> : [/goldengatecu/goldengate/ggsolace/replicat(ggs::gglib::MultiThreading::MainThread::Run(int, char**))]
> : [/goldengatecu/goldengate/ggsolace/replicat(main)]
> : [/lib64/libc.so.6(__libc_start_main)]
> : [/goldengatecu/goldengate/ggsolace/replicat()]
>
> 2021-01-18 15:04:38 ERROR OGG-00919 Error in COLMAP clause.
>
> As a test, we tried to replicate using “MAP XYZ.PCM, TARGET XYZ.PCM, COLMAP(USEDEFAULTS, STATUS = _at_GETENV ('GGFILEHEADER', 'DBNAME'));” clause and it works fine.“Status” is an existing column in source table with VARCHAR2(240) datatype. When this clause is used, the target “Status” column is overwritten with ‘DBNAME’ value. This is not a fix, we just wanted to see whether Goldengate Adapter can replicat token values.
>
> The expectation is to replicate 9 columns from source and apply them to target along with additional column with token value. Please suggest how to do this, like is there a way to define this new column datatype to GG Adapter, or something else.
>
>
>
>
> Best Regards,
> Sourav Biswas
> +91-9650017306
-- http://www.freelists.org/webpage/oracle-l
Received on Tue Jan 19 2021 - 17:11:07 CET

Original text of this message