You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Current »

Typically, the output is send to a single file name. With this punctation the output can be send to different output files.

Parameter

  • predicate: If evaluated to true, a NewFilenamePunctuation will be created.
  • filename: An expression that constructs the new filename. Return value will be interpreted as string.

Example

#PARSER PQL
#ADDQUERY
heart = TIMER({PERIOD = 1000, SOURCE = 'source'})
 
prep = MAP({
 expressions = [['counter()','count']],
 evaluateonpunctuation = true
 },
 heart
 ) 
 
punc = CREATENEWFILENAMEPUNCTUATION({
 filename = '"${WORKSPACEPROJECT}/out/"+toString(count)+".csv"',
 predicate = 'count % 10 = 0 && count > 0'
 },
 prep
 )
 
out = CSVFILESINK({FILENAME = '${WORKSPACEPROJECT}/out/0.csv', SINK = 'sink'}, punc)
  • No labels