I got two different topics with their own schema in avro format, X and Y. Both of these topics have a lot of fields. I want to create a table-stream join relation between them and output it to another topic in the following format:
{
id, // the id used to join them
x_name : X,
y_name: Y
}
With other words, I want to join these two with each source nested. I am able to join them in a normal way, however all fields are flattened out. Can this be achieved with KsqlDB? I've tried to find a good way of doing this without success.
EDIT:
Adding more information and example. Say I have two topics with this type of data.
product_supply
{
"product_id": 1,
"name": "name",
"stock": 11
"price": "141",
"storage_ids": [1, 2, 3]
}
product_information
{
"product_id": 1,
"description": "151",
"manufacturer": "ABC"
"Vendor_id": "5"
}
I'd like to use KsqlDB to join these tables in a unflattened manner and publish to a topic, like this:
{
"product_id": 1,
"product_information": {
"product_id": 1,
"description": "151",
"manufacturer": "ABC"
"Vendor_id": "5"
}
"product_supply": {
"product_id": 1,
"name": "name",
"stock": 11
"price": "141",
"storage_ids": [1, 2, 3]
}
}
I've added schema for each topic and wish if possible, to use the schemas without having to explicitly define each field in ksql.