Apache Veolcity

Submitted by code_admin on Thu, 08/09/2018 - 15:42

Enter your JSON-encoded data in this space. Note that this text is

treated as an Apache Velocity template, so you can substitute values

from input documents or the pipeline parameters. See the following

URL for more information about Velocity:

https://velocity.apache.org/engine/devel/user-guide.html

[
{
"number": [

foreach( $foo in [1..50] )

    $foo

if($foo != 50)

    ,

end

end

]
}
]

Tips:

* The sample data above will generate a single empty document, uncomment

the line in the middle to include the sample fields. Adding more

objects to the root array will cause the snap to generate more

than one document.

* Pipeline parameters can be referenced by prefixing the parameter

name with an underscore, like so:

${_pipelineParamName}

* If you add an input view to the snap, this template will be

evaluated for each input document.

* Fields in the input documents can be referenced by prefixing them

with a dollar-sign ($), like so:

$parent.child[0].value

* Any referenced document values and pipeline parameters will

automatically be JSON-encoded when they are inserted into the final

JSON document. You should not have to worry about escaping values

yourself.

* If you are having troubles getting a template to produce valid JSON,

you can add an error view to the snap to get a document that

contains the output of the template evaluation.

Tags

RJM Article Type
Work Notes