Parse pgoutput fromat

174 views
Skip to first unread message

Ran Silberman

unread,
May 9, 2022, 8:48:00 AM5/9/22
to debezium
Hi, 
I am using debezium for Postgres.
I recently moved from 'wal2json' to 'pgoutput' decoding.
Problem is that the records are not SJON anymore.
Is there a simple parser that can convert those events to any object (preferably JSON).

This is an example of an event:
Struct{after=Struct{id=11998,emailaddress=ra1...@geek.com,companyid=2634820328732,title=Software Engineer1,createdatetime=2022-03-13T11:01:10.2945Z,updatedatetime=2016-06-23T02:10:25Z},source=Struct{version=1.9.0.Final,connector=postgresql,name=oper-db-3,ts_ms=1652004886300,db=db_dev,sequence=["181736","172216"],schema=public,table=appuser,txId=6978,lsn=1712216},op=u,ts_ms=1652004890131}

Gunnar Morling

unread,
May 9, 2022, 8:57:43 AM5/9/22
to debezium
I don't think that's caused by switching from wal2json to pgoutput, but rather by a change to the Kafka Connect converter you're using (StringConverter rather than JsonConverter). Any chance you did those two changes to your connector configuration at the same time?

--Gunnar

Ran Silberman

unread,
May 10, 2022, 1:23:21 AM5/10/22
to debe...@googlegroups.com
Thank you!
Your answer helped resolve the problem.
Ran

--
You received this message because you are subscribed to a topic in the Google Groups "debezium" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/debezium/TWiw99hRAVI/unsubscribe.
To unsubscribe from this group and all its topics, send an email to debezium+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/debezium/dfa65737-3d48-48ce-bcc0-4ba55cfcba81n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages