Versions Compared

Key

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

...

  • caching (Boolean): Should elements from the datebase be cached, i.e. instead of query the database for each input element, look inside the cache first.
  • removalStrategy: If the cache reaches its limit, what is the strategy that should be used, to remove elements from the cache.
  • expirationTime: How long should elements be cached, before they are removed automatically.
  • cacheSize: How many elements should be cached
  • uniqueKeys: To optimize processing, the attributes from the database that are prime (i.e. distinct each value from each other)

Beta-Options (use with care, may not work in any cases!):

  • noOfWorkers: Typically, this enrich operator will not use any worker, i.e. the source thread will be blocked, until there is a result. To allow concurrent accesses to the enrichment source, the number of workers can be raised. Because order is still kept, no enriched element will overtake another one.
  • keepOrder (Boolean, default: true): When set to false and in combination with noOfWorkers, the output order is no longer guaranteed and the worker that delivers the results first, will send there output directly.

Example

Code Block
languagepql
// 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))

...