Relationship with scalar variant

Each child node can have only one direct parent.

You can specify the relationship between a parent and child node using the relationship property.

[
    {
        "database": "book",
        "index": "book",
        "nodes": {
            "table": "book",
            "children": [
                {
                    "table": "author",
                    "columns": [
                        "name"
                    ],
                    "relationship": {
                        "variant": "scalar",
                        "type": "one_to_one"
                    },
                }
            ]
        }
    }
]

To get this document structure in Elasticsearch/OpenSearch

[
  {
      "isbn": "9785811243570",
      "title": "Charlie and the chocolate factory",
      "publisher": "Oxford Press"
  },
  {
      "isbn": "9788374950978",
      "title": "Kafka on the Shore",
      "publisher": "Penguin Books"
  },
  {
      "isbn": "9781471331435",
      "title": "1984",
      "publisher":  "Pearson Press"
  }
]

Info

A relationship must include both a variant and a type attribute