I want to create a parent-child relation from the tables I have in KSQLDB to elasticsearch.
In elasticsearch mapping I just define the the join field:
"mappings": {
"properties": {
"join_field": {
"type": "join",
"relations": {
"parent": "child"
}
},
...
For parent in ksqldb i just add a "join_field" in the select in ksqldb:
SELECT
'parent' AS join_field, \
...
But how do I create the child? Elasticsearch is expecting this format:
"join_field": {
"name": "child",
"parent": "1"
}
I use "io.confluent.connect.elasticsearch.ElasticsearchSinkConnector" to push data from ksqldb to elasticsearch.