Skip to content

Commit

Permalink
sdfMerge branch '73-source-connector-issue-tombstones' of github.com:…
Browse files Browse the repository at this point in the history
…cloudant-labs/kafka-connect-cloudant into 73-source-connector-issue-tombstones
  • Loading branch information
tomblench committed Aug 17, 2022
2 parents c38d8c6 + 2c43190 commit f090c7d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,8 @@ Single Message Transforms, or SMTs, can be used to customize fields or values of
```
1. If you have events where there is no value ([_tombstone_ events](https://kafka.apache.org/documentation.html#compaction)), you may wish to filter these out.
- In the Cloudant sink connector, these may be undesirable as they will generate an empty document.
- In the Cloudant source connector, tombstone events are generated by default for deleted documents (in addition to the deleted document itself).
- In either case, you will need to use a `dropNullRecords` transform and predicate to filter out and remove these tombstone events:
- In the Cloudant source connector, tombstone events are generated for deleted documents (in addition to the deleted document itself).
- In either case, you can use the `RecordIsTombstone` predicate with a filter to remove these tombstone events as shown in this example:
```
transforms=dropNullRecords
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,9 @@ public class TombstoneTest {

private static final String connectionName = "_mock";

// test that both the original document with _deleted = true, and a tombstone are emitted
@Test
public void foo() throws Exception{
public void testDeletedDocumentEmitsTombstone() throws Exception{

String id = "123";

Expand Down

0 comments on commit f090c7d

Please sign in to comment.