Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
curl -i -X PUT -H "Content-Type:application/json" \
http://localhost:8083/connectors/sink-elastic-orders-00/config \
-d '{
"connector.class": "io.confluent.connect.elasticsearch.ElasticsearchSinkConnector",
"topics": "orders",
"connection.url": "http://elasticsearch:9200",
"type.name": "type.name=kafkaconnect",
"key.ignore": "true",
"schema.ignore": "false",
"errors.tolerance":"all",
"transforms": "addTS,InsertTopic,InsertOffset,InsertPartition",
"transforms.addTS.type": "org.apache.kafka.connect.transforms.InsertField$Value",
"transforms.addTS.timestamp.field": "op_ts",
"transforms.InsertTopic.type":"org.apache.kafka.connect.transforms.InsertField$Value",
"transforms.InsertTopic.topic.field":"source_topic",
"transforms.InsertOffset.type":"org.apache.kafka.connect.transforms.InsertField$Value",
"transforms.InsertOffset.offset.field":"source_offset",
"transforms.InsertPartition.type":"org.apache.kafka.connect.transforms.InsertField$Value",
"transforms.InsertPartition.partition.field":"source_partition"
}'
@manojkupadhyay

This comment has been minimized.

Copy link

@manojkupadhyay manojkupadhyay commented Jun 28, 2020

Do we have a way to use message field value for ElasticSearch index? Means i push old historical data into Kafka then ElasticsearchSinkConnector should be able to push into right ES index "indexPrefix-{messageCreatedDate}". I am not that Timestamp transforms can be used in this case

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.