Skip to main content

Striim Cloud 4.1.0 documentation

Converting JSONNodeEvent output to a user-defined type

Using the application and data from MongoDBReader example application and output, the following CQ would convert the JSONNodeEvent data array values to a Striim type, which could then be consumed by any other Striim component.

INSERT INTO EmployeeStream
SELECT data.get("_id").toString() AS id,
  data.get("firstname").toString() AS firstname,
  data.get("lastname").toString() AS lastname,
  data.get("age").toString() AS age
FROM MongoDBStream;