How to remove schema part from the payload

3,443 views
Skip to first unread message

sau...@lifeincontrol.com

unread,
Jul 23, 2018, 1:44:03 AM7/23/18
to debezium
Is there anyway I can get only payload part in json message ?



Jiri Pechanec

unread,
Jul 23, 2018, 2:00:55 AM7/23/18
to debezium
Hi,

please try setting value.converter.schemas.enable=false for the Connect configuration. It will then just provide plain JSON without schema.

J.

John T

unread,
Sep 14, 2018, 8:05:42 AM9/14/18
to debezium
I'm using the Debezium Connector for SQL Server with docker-compose, any idea how I change the connect configuration?

Gunnar Morling

unread,
Sep 14, 2018, 8:17:44 AM9/14/18
to debezium
If you're using Debezium's Docker image for Kafka connect, you can add this to your environment variables of the "connect" service in Compose:

    CONNECT_VALUE_CONVERTER_SCHEMAS_ENABLE=false

Hth,

--Gunnar

John T

unread,
Sep 14, 2018, 8:23:09 AM9/14/18
to debezium
Thanks for the quick answer, it worked.

Alexandru Lazarev

unread,
Jan 28, 2021, 3:59:15 PM1/28/21
to debezium
Hi All, 
Still cannot get rid of schema...

I followed tutorial on debezium.io and tried delete connector and recreate it with schema disabled:
curl -s -i -X POST -H "Accept:application/json" -H "Content-Type:application/json" localhost:8083/connectors/ -d '{
"name": "inventory-connector",
"config": {
"connector.class": "io.debezium.connector.mysql.MySqlConnector",
"tasks.max": "1",
"key.convertor": "org.apache.kafka.connect.json.JsonConverter",
"key.converter.schemas.enable": "false",
"value.convertor": "org.apache.kafka.connect.json.JsonConverter",
"value.converter.schemas.enable": "false",
"database.hostname": "mysql",
"database.port": "3306",
"database.user": "debezium",
"database.password": "dbz",
"database.server.id": "184054",
"database.server.name": "dbserver1",
"database.include.list": "inventory",
"database.history.kafka.bootstrap.servers": "kafka:9092",
"database.history.kafka.topic": "dbhistory.inventory"
}
}'

but no effect at all!
Tried both with and without "key.convertor"/"value.convertor".

Only when starting docker image with "CONNECT_VALUE_CONVERTER_SCHEMAS_ENABLE=false"/"CONNECT_KEY_CONVERTER_SCHEMAS_ENABLE=false" schema is omitted.
QUESTION: Why so? What is the difference? 
Why I cannot disable schema from connector config itself?

Thx, I am a newbie here

Gunnar Morling

unread,
Feb 2, 2021, 4:14:03 AM2/2/21
to debezium
You got a typo there: convert*o*r instead of convert*e*r. It's then using the default converters from the KC level and your schema.enabled properties don't apply.

--Gunnar

Alexandru Lazarev

unread,
Feb 2, 2021, 12:23:48 PM2/2/21
to debe...@googlegroups.com
Thanks! Indeed

Virus-free. www.avast.com

--
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/WBSZSoJ4734/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/0e943a6c-2a56-4862-8617-76cf0fa55fedn%40googlegroups.com.

Virus-free. www.avast.com

林晓东

unread,
Jul 7, 2022, 10:11:00 AM7/7/22
to debezium
I am running in debezium server mode,  there is a conf/application.properties ,and how to set the 
  • value/key.converter.schemas.enable ?

I have done like this:

debezium.format.value.converter.schemas.enable=false
or 
debezium.sink.http.key.converter.schemas.enable=false

all has no effect.

Chris Cranford

unread,
Jul 7, 2022, 10:38:25 AM7/7/22
to debe...@googlegroups.com, 林晓东
Hi,

If the "debezium.format.[key|value].converter.schemas.enable" then this sounds like a bug, could you raise a Jira issue?
Could you also try "debezium.source.[key|value].converter.schemas.enable" to see if that works by chance?

Thanks
Chris
You received this message because you are subscribed to the Google Groups "debezium" group.
To unsubscribe from this group and stop receiving emails from it, send an email to debezium+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/debezium/3efda8c9-e140-4b73-8ff7-6a2831c612e5n%40googlegroups.com.

Nathan Smit

unread,
Jul 7, 2022, 4:42:41 PM7/7/22
to debezium
This is how I remove schemas in my Debezium Server deployment.  Looks a little different to what you have there:

debezium.source.value.converter=org.apache.kafka.connect.json.JsonConverter
debezium.source.value.converter.schemas.enable=false

Chris Cranford

unread,
Jul 8, 2022, 8:45:31 AM7/8/22
to debe...@googlegroups.com, Nathan Smit
Sorry Nathan, I probably should have clarified my usage of [key|value] was meant more in the pick one, this part is a choice fragment :)
Reply all
Reply to author
Forward
0 new messages