|
View:
New views
4 Messages
—
Rating Filter:
Alert me
|
|
|
Esper correlation based on dynamic eventsHello all, My query is as summarized below. I have an java object(say A). A has a property (say ID) which would get filled at runtime. Now , I want the events having the same ID to be distinguished. Problem is that we don't know the value of ID at compile time.So we cannot include ID in 'where' clauses of the EPL query. Can anyone please help me in resolving the above issue. Best Regards, Anoop |
|
|
Re: Esper correlation based on dynamic eventsDo you know what the value is before you submit the query? If so, you
could write something like this: public class MyClass { private String filterValue; public void submitQuery() { EPServiceProvider epService = EPServiceProviderManager .getDefaultProvider(); epService.getEPAdministrator().createEPL( "Select * from A where ID = " + filterValue); } public void setFilterValue(String filterValue) { this.filterValue = filterValue; } } Anoop_123 wrote: > > Hello all, > > My query is as summarized below. > > I have an java object(say A). A has a property (say ID) which would get > filled at runtime. > > Now , I want the events having the same ID to be distinguished. > Problem is that we don't know the value of ID at compile time.So we cannot > include > ID in 'where' clauses of the EPL query. > > Can anyone please help me in resolving the above issue. > > Best Regards, > Anoop > --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email |
|
|
Re: Esper correlation based on dynamic eventsHi Kyle, please clarify, you don't know the value of the ID property or your don't know if the property is called ID? Depending on the answer the ideas are: use a variable, use the statement object model to compose a statement dynamically, use a mapped property, write a UDF to filter or return the property value, use a named window or subquery or join. Best regards, Tom From: Kyle Neumeier <kyle@...> To: user@... Sent: Mon, November 2, 2009 11:02:20 PM Subject: Re: [esper-user] Esper correlation based on dynamic events Do you know what the value is before you submit the query? If so, you could write something like this: public class MyClass { private String filterValue; public void submitQuery() { EPServiceProvider epService = EPServiceProviderManager .getDefaultProvider(); epService.getEPAdministrator().createEPL( "Select * from A where ID = " + filterValue); } public void setFilterValue(String filterValue) { this.filterValue = filterValue; } } Anoop_123 wrote: > > Hello all, > > My query is as summarized below. > > I have an java object(say A). A has a property (say ID) which would get > filled at runtime. > > Now , I want the events having the same ID to be distinguished. > Problem is that we don't know the value of ID at compile time.So we cannot > include ID in 'where' clauses of the EPL query. > Can anyone please help me in resolving the above issue. > > Best Regards, > Anoop > --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email |
|
|
Re: Esper correlation based on dynamic eventsHi Kyle, please clarify, you don't know the value of the ID property or your don't know if the property is called ID? Depending on the answer the ideas are: use a variable, use the statement object model to compose a statement dynamically, use a mapped property, write a UDF to filter or return the property value, use a named window or subquery or join. Best regards, Tom From: Kyle Neumeier <kyle@...> To: user@... Sent: Mon, November 2, 2009 11:02:20 PM Subject: Re: [esper-user] Esper correlation based on dynamic events Do you know what the value is before you submit the query? If so, you could write something like this: public class MyClass { private String filterValue; public void submitQuery() { EPServiceProvider epService = EPServiceProviderManager .getDefaultProvider(); epService.getEPAdministrator().createEPL( "Select * from A where ID = " + filterValue); } public void setFilterValue(String filterValue) { this.filterValue = filterValue; } } Anoop_123 wrote: > > Hello all, > > My query is as summarized below. > > I have an java object(say A). A has a property (say ID) which would get > filled at runtime. > > Now , I want the events having the same ID to be distinguished. > Problem is that we don't know the value of ID at compile time.So we cannot > include ID in 'where' clauses of the EPL query. > Can anyone please help me in resolving the above issue. > > Best Regards, > Anoop > --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email |
| Free embeddable forum powered by Nabble | Forum Help |