Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is there any configuration property in source connector to notify the delete of es document. in Kafka topic. #46

Open
shanthkumar079 opened this issue Jun 2, 2021 · 3 comments

Comments

@shanthkumar079
Copy link

We are able to insert data to sink(Postgres) using the Kafka-connect elasticsearch-source from a data source(elastic search).
I have a use case to delete a document from elastic search and the same should be reflected in the data sink(Postgres).

@shanthkumar079 shanthkumar079 changed the title Is there any configuration properties in source connector to notify the delete of es_document. in Kafka topic. Is there any configuration propertie in source connector to notify the delete of es_document. in Kafka topic. Jun 2, 2021
@shanthkumar079 shanthkumar079 changed the title Is there any configuration propertie in source connector to notify the delete of es_document. in Kafka topic. Is there any configuration property in source connector to notify the delete of es document. in Kafka topic. Jun 3, 2021
@DarioBalinzo
Copy link
Owner

Hi @shanthkumar079,
No, it is not possible to detect deletion in elasticsearch using this connector.

However, I suggest to add a new boolean field (e.g. deleted=true/false) to logically delete records in elastic and use that field in postgres to discard logically deleted data. In addition to this you may delete from postgres old data based on retention based.

Hope this helps,
Dario

@shanthkumar079
Copy link
Author

Hi @DarioBalinzo,
Thanks for your response:-)
I was trying to update a document(value for some fields) by the document Id, seems like this connector doesn't support the update as well.
Please correct me, if my understanding is wrong.

Thanks
Shantkumar.s

@DarioBalinzo
Copy link
Owner

The connector supports updates if you use an incremental timestamp field (e.g. last update time).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants