TL;DR: The goal is to support creating new STRUCTs in your queries.
KSQL already supports reading nested data (JSON, Avro) via the STRUCT type:
myStruct->myField syntax.However, KSQL does not yet support:
-- We start with a non-nested stream.
-- The goal is to turn the flat street and zip fields into a nested address STRUCT.
CREATE STREAM orders (item VARCHAR, quantity INTEGER, street VARCHAR, zip INTEGER) WITH (...);
-- The following is not yet supported!
-- Note: The syntax below is for illustrative purposes and does not preclude
-- the design discussion we need to have.
CREATE STREAM nested_orders AS
SELECT
item, quantity,
STRUCT(street, zip) AS address1,
STRUCT<renamedStreet VARCHAR, renamedZip INTEGER>(street, zip) AS address2,
STRUCT<VARCHAR, LONG>(street, zip) AS address3
FROM orders;
+1 from a user in an offline conversation
+2 from two separate user interactions this week at meetups
+1 https://stackoverflow.com/questions/1602934/check-if-a-given-key-already-exists-in-a-dictionary
Thanks for the response @rmoff
Looking forward for this support.
Upvoting...we need that too :)
+1
Looking forward for the support
+1
+1
Looking forward for the support
+1
+1
+1
Thanks everyone for upvoting this! I just merged this feature request and it should be available in the next release 馃槃
Most helpful comment
Thanks everyone for upvoting this! I just merged this feature request and it should be available in the next release 馃槃