Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Example

Code Block
languagepql
// Using with attributes from the source to retrieve values from database
#PARSER PQL
#QUERY#RUNQUERY
out = dbenrich({connection='connectionName', query='SELECT *name, description FROM mytable categories WHERE id=?', attributes=['category']}, nexmark:personauction))


Another example uses a timer source as trigger to retrieve values from a database in a regular fashion:

Code Block
// Using a timer as trigger to retrieve values
#PARSER PQL
#RUNQUERY
timer = TIMER({PERIOD = 1000, SOURCE = 'source'})
out = dbenrich({connection='connectionName', query='SELECT name, description* FROM categories WHERE id=?mytable', attributes=['category']}, nexmark:auctiontimer))