Search code examples
esper

Esper nested event representation


I want to process the following JSON message using Esper:

{
    "firstname":"John",
    "lastname":"Do",
    "address":[{"street":"Maplestreet","number":100,"city":"New York"}]
}

What is the correct way to declare the event type schema? Can someone help me construct the right: create schema (); statement for EPL online? Thanks!


Solution

  • create schema Address (street string, number int, city string);
    create schema Person (name string, address Address[]);