Skip to content

Upsert issue #333

@Zako-idt

Description

@Zako-idt

Hey, my current problem is in configuration, I want to achieve upsert, for example whenever I post this object from kafka topic :

key => "test",
value => {
"FirstName": "Name",
"id": 5,
"TransactionId": "transactionId",
"LastName": "lastName",
"PayInMethod": "visa"
} and then

key => "test",
value => {
"FirstName": "Name",
"id": 5,
"TransactionId": "transactionId",
"PayInMethod": "visa2"
}

I want to get in opensearch object like this : {
"FirstName": "Name",
"id": 5,
"LastName": "lastName",
"TransactionId": "transactionId",
"PayInMethod": "visa2"
}, I have configurations like this :

{
"name": "opensearch-sink-connector",
"connector.class": "io.aiven.kafka.connect.opensearch.OpensearchSinkConnector",
"tasks.max": "1",
"topics": "search-transactions",
"connection.url": "http://opensearch:9200",
"opensearch.index": "search-transactions",
"value.converter": "org.apache.kafka.connect.json.JsonConverter",
"value.converter.schemas.enable": "false",
"opensearch.update.method": "partial", // Enables partial updates and upsert behavior
"opensearch.id.field": "TransactionId", // Use TransactionId as the document ID
"aiven.api_key": "your_aiven_api_key",
"aiven.project": "your_aiven_project",
"aiven.service": "your_aiven_service",
"behavior.on.version.conflict": "ignore"
}

Where is the issue guys, can you help me?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions