Transformer Pipeline Module API Reference
8.0.3.342099-79b6f512
|
The standard library supplied with the pipeline module enforces the use of a Data Dictionary to store configuration such as fields and formatting information.
Using the data dictionary enables all field configuration to be located in a single configuration file rather than being present in many script files.
For a price field, the following configuration options define a field and format options:
These are then used by the datadict::addformattedfield function to produce an output field in the correct format:
Caplin also recommend the use of a data dictionary when handling incoming data, this again makes changing the field configuration a lot easier and allows reuse of scripts between different markets as can be seen in the following example which handles two markets which use different price fields:
In both case, the same update function is called, this may look similar to the following snippet: