Options
- Subscribe to RSS Feed
- Mark Question as New
- Mark Question as Read
- Float this Question for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
create a ksql table with a struct as the element type of an ARRAY
Labels:
- Labels:
-
Apache Kafka
Contributor
Created on 03-14-2023 02:48 PM - edited 03-14-2023 02:52 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hey i need help to create a ksql table with A STRUCT as the element type of an ARRAY. Has everyone an idea.
Input Stream:
{
"GTIN": "4066136261834",
"PRODUCT_SKU": "UC_55.08_W08_900_black",
"SIZE_NAME": "34",
"CALC_SALES_PRICE": 199.90,
"SALES_PRICE": 199.90
}
{
"GTIN": "4066136261846",
"PRODUCT_SKU": "UC_55.08_W08_900_black",
"SIZE_NAME": "36",
"CALC_SALES_PRICE": 199.90,
"SALES_PRICE": 199.90
}
The expected result of the KTable should be:
{
"PRODUCT_SKU":"UC_55.08_W08_900_black",
"variants":[
{
"GTIN":"4066136261834",
"SIZE_NAME":"34",
"CALC_SALES_PRICE":199.90,
"SALES_PRICE":199.90
},
{
"GTIN":"4066136261846",
"SIZE_NAME":"36",
"CALC_SALES_PRICE":199.90,
"SALES_PRICE":199.90
}
]
}
0 REPLIES 0
