Uwe Ranft
Uwe Ranft

Reputation: 91

Confluent Elasticsearch sink connector Indexname manipulation

I'm still new to kafka and am looking for a solution to the following problem: With Kafka Connect SMT it is possible to manipulate part of a topic or its name. Is there a way to get a date from the data stream and build an index name from it? For example:

{"transmitdate": "2020-03-20T14: 00: 00"} -> index name: foo-2020-03-20

Thanks.

Upvotes: 2

Views: 535

Answers (1)

Uwe Ranft
Uwe Ranft

Reputation: 91

So I found the answer myself. The MessageTimestampRouter from the connector package is ideal for the task.

Here is a link:

https://docs.confluent.io/current/connect/transforms/messagetimestamprouter.html#messagetimestamprouter

Upvotes: 1

Related Questions