My Oracle Support Banner

OGGBD - PathMappingTemplate and optimestamp (Doc ID 2945274.1)

Last updated on JANUARY 17, 2024

Applies to:

Oracle GoldenGate Big Data and Application Adapters - Version 21.4.0.0.0 and later
Information in this document applies to any platform.

Symptoms

In Golden Gate Big Data Adapter, using file adapter to generate the files to Google Cloud Bucket and as part of it want to create a folder and then store the Json file in that.

When using

gg.eventhandler.gcs.pathMappingTemplate=ebs/${toLowerCase[${schemaName}]}/${toLowerCase[${tableName}]}/loadtype=audit/dt=${opTimestamp[yyyy-MM-dd]}

 

The replicat fail with error like

2023-04-10 11:51:34 INFO OGG-03010 Performing implicit conversion of column data from character set CESU-8 to UTF-8.

Exception in thread "main" oracle.goldengate.util.GGException: Error detected handling operation added event.

at oracle.goldengate.datasource.UserExitDataSource.addOperationToTransactionAndFireEvent(UserExitDataSource.java:2467)

 

From Replicat log

 

ERROR 2023-04-10 11:51:20.000442 [TaskEngine_2(FileFinalizeTask)] - An exception occurred in an event handler execute call.

java.lang.NullPointerException: null

at oracle.goldengate.datasource.mapping.TimestampMappingMethodology.performMapping(TimestampMappingMethodology.java:30) ~[ggaddons-21.9.0.0.0.005.jar:21.9.0.0.0.005]

at oracle.goldengate.datasource.mapping.TemplateNameMapper.performMapping(TemplateNameMapper.java:41) ~[ggaddons-21.9.0.0.0.005.jar:21.9.0.0.0.005]

at oracle.goldengate.eventhandler.objectstore.gcs.GCSEventHandler.execute(GCSEventHandler.java:343) ~[gggcseh-21.9.0.0.0.005.jar:21.9.0.0.0.005]

at oracle.goldengate.datasource.eventhandler.EventHandlerFramework.executeHandlers(EventHandlerFramework.java:84) [ggaddons-21.9.0.0.0.005.jar:21.9.0.0.0.005]

at oracle.goldengate.handler.filewriter.FileFinalizeManager$FileFinalizeTask.call(FileFinalizeManager.java:80) [ggfw-21.9.0.0.0.005.jar:21.9.0.0.0.005]

at oracle.goldengate.util.taskmanager.TaskPoolRunnable.run(TaskPoolRunnable.java:78) [ggutil-21.9.0.0.0.005.jar:21.9.0.0.0.005]

at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_291]

at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_291]

at oracle.goldengate.util.taskmanager.TaskPoolThread.run(TaskPoolThread.java:53) [ggutil-21.9.0.0.0.005.jar:21.9.0.0.0.005]

INFO 2023-04-10 11:51:34.000495 [main] - == JNI == setSourceIsTable(false)

INFO 2023-04-10 11:51:34.000497 [main] - Metadata changed <Schema>.<Table name>

INFO 2023-04-10 11:51:34.000497 [main] - == JNI == setRecOpts for table[<Schema>.<Table name>]: insertUpdates[false] insertDeletes[false]

WARN 2023-04-10 11:51:34.000509 [main] - Error sending event to listener filewriter, status: ABEND, event: Add operation

If using currentTimestamp it works but when using opTimestamp it does not

Below is the property which is working with currentTimestamp

gg.eventhandler.gcs.pathMappingTemplate=ebs/${toLowerCase[${schemaName}]}/${toLowerCase[${tableName}]}/loadtype=audit/dt=${currentTimestamp[yyyy-MM-dd]}

Do we have a option to capture only date from the opTimestamp, something like ${opTimestamp[yyyy-MM-dd] ?



Changes

 

Cause

To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!


In this Document
Symptoms
Changes
Cause
Solution


My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.