This operator can be used to enrich stream objects with information from a database.
State of the operator is alpha. In case of error, please report.
// Using with attributes from the source to retrieve values from database #PARSER PQL #RUNQUERY out = dbenrich({connection='connectionName', query='SELECT name, description FROM categories WHERE id=?', attributes=['category']}, nexmark:auction)) |
Another example uses a timer source as trigger to retrieve values from a database in a regular fashion:
// Using a timer as trigger to retrieve values #PARSER PQL #RUNQUERY timer = TIMER({PERIOD = 1000, SOURCE = 'source'}) out = dbenrich({connection='connectionName', query='SELECT * FROM mytable', attributes=[]}, timer)) |