2

I managed to stream CDC events from Postgres using Debezium Embedded version 1.6.2.Final. Now I'm interested in flattening the events so only the after data is sent.

As per the following article: https://debezium.io/documentation/reference/1.6/transformations/event-flattening.html#_configuration

I assume these are the properties I need to include in my Configuration

        return io.debezium.config.Configuration.create()
                ...
                .with("transforms", "unwrap")
                .with("transforms.unwrap", "io.debezium.transforms.ExtractNewRecordState")
                .build();

Then I create my DebeziumEngine like below:

        this.debeziumEngine = DebeziumEngine.create(Json.class)
                .using(cdcConfiguration.asProperties())
                .notifying(...)
                .build();

When I run the application I get the following error on startup:

io.debezium.DebeziumException: Cannot instatiate transformation 'unwrap'
    at io.debezium.embedded.Transformations.getTransformation(Transformations.java:66) ~[debezium-embedded-1.6.2.Final.jar:1.6.2.Final]
    at io.debezium.embedded.Transformations.<init>(Transformations.java:44) ~[debezium-embedded-1.6.2.Final.jar:1.6.2.Final]
    at io.debezium.embedded.EmbeddedEngine.<init>(EmbeddedEngine.java:593) ~[debezium-embedded-1.6.2.Final.jar:1.6.2.Final]
    at io.debezium.embedded.EmbeddedEngine.<init>(EmbeddedEngine.java:81) ~[debezium-embedded-1.6.2.Final.jar:1.6.2.Final]
    at io.debezium.embedded.EmbeddedEngine$BuilderImpl.build(EmbeddedEngine.java:302) ~[debezium-embedded-1.6.2.Final.jar:1.6.2.Final]
    at io.debezium.embedded.EmbeddedEngine$BuilderImpl.build(EmbeddedEngine.java:218) ~[debezium-embedded-1.6.2.Final.jar:1.6.2.Final]
    at io.debezium.embedded.ConvertingEngineBuilder.build(ConvertingEngineBuilder.java:151) ~[debezium-embedded-1.6.2.Final.jar:1.6.2.Final]

Could somebody please point what I'm doing wrong?

franDayz
  • 883
  • 10
  • 22
  • did you succeeded ? I have the same issue with Debezium 1.7 – Will Nov 29 '21 at 16:34
  • Unfortunately I haven't investigated further as I left this on stand-by to work on other things, but I hope to come back soon. I'm also surprised nobody from the dev team answered. If you are also facing this, I wonder if it could be a bug and we should post it on GitHub – franDayz Dec 06 '21 at 14:51

0 Answers0