1

I m sure that this statement works in Esper:

/* query from table TableA when receive event PriceEvent */
ON PriceEvent p
SELECT a.SymbolA, p.price
FROM TableA a
WHERE a.Symbol = p.Symbol

But this statement throws error:

/* join table TableA with TableB */
ON PriceEvent p
SELECT a.SymbolA, p.price, b.SymbolB
FROM TableA a, TableB b
WHERE a.Key = b.Key and a.Symbol = p.Symbol

Error Message:

com.espertech.esper.client.EPStatementSyntaxException: Incorrect syntax near ',' expecting end-of-input but found a comma ','

Then I use JOIN but it still doesn't work:

/* join table TableA with TableB */
ON PriceEvent p
SELECT a.SymbolA, p.price, b.SymbolB
FROM TableA a inner join TableB b
ON a.Key = b.Key
WHERE a.Symbol = p.Symbol

Error Message:

Incorrect syntax near 'join' (a reserved keyword) expecting end-of-input but found 'join'

How to join two tables in Esper?

littlecodefarmer758
  • 968
  • 2
  • 10
  • 23

1 Answers1

1

The on-select only allows only a single named window or table and not multiple. Joins are just "select * from A, B, C...." and you can look into using "unidirectional".

user650839
  • 2,594
  • 1
  • 13
  • 9