Overview
The Infinit.e platform supports scripting the transformation of source data using JavaScript via Rhino, Mozilla's open-source JavaScript implementation (http://www.mozilla.org/rhino/). The following document provides an introduction to specifying JavaScript based data transformation via the Structured Analysis Harvester object.
...
Code Block | ||
---|---|---|
| ||
"$SCRIPT( if (null == _doc.dedupMap) _doc.dedupMap = new Object(); /* ... */ if (_doc.dedupMap[val] == null) { _doc.dedupMap[val] = 1; return val; } else return null; )" |
Info |
---|
Note that "_doc.metadata.FIELDNAME[0].*" is equivalent to "$metadata.FIELDNAME.*" (the [0] disappears because the $ method just treats arrays as objects equal to the first element in the array - to access other elements, the "$SCRIPT" technique must be used) |
Basic Field Level Transformations
...