Push Data from Kafka Topic to PostgreSQL in JSON

牧云@^-^@ 提交于 2019-12-04 20:03:01
vishruti

I solved this error by making following changes

  1. insert.mode=insert
  2. Comment out the table.name.format=kafkatable because table will be created through auto create
  3. Remove the question mark from the end of connection.url line.
  4. pk.fields should not be kept none here, please make sure to give a column name instead to avoid complications.
  5. int32 is not supported by postgresql, so when I changed it to int8 it is working fine.
  6. The fields in your schema and payload have different names, please make sure to give same name.

Kafka Connect, which is part of Apache Kafka, is perfectly suited to this. You can learn more about Kafka Connect in general here.

To stream data from your Kafka topic to Postgres (or any other database) use the JDBC Sink connector, which you can get from here.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!