Transformer Pipeline Module API Reference  7.1.19.190859-2c068f14
Data Dictionary

Detailed Description

This datadictionary object provides routines to add and retrieve fields from dsdata packets using the DataDictionary to obtain fieldnames and formats.

Input fields are obtained from the pipeline configuration, and output fields from the DataDictionary.

Functions

 datadict.get_datadict.config_item (var symbol_name, var required_item)
 Get the value of a config item. More...
 
 datadict.getconfigitem (var symbolname, var requireditem, var pipeline_id)
 Get the value of a config item. More...
 
 datadict.getfield (var update, var fieldkey, var formatkey, var pipeline_id)
 Get the value of a field and apply a format. More...
 
 datadict.getoutputfield (var packet, var fieldkey)
 Get an output field from a normalised packet. More...
 
 datadict.addfield (var packet, var fieldkey, var value, var pipeline_id)
 Add a field to the update packet. More...
 
 datadict.addformattedfield (var packet, var fieldkey, var fmtname, var value)
 Add a formatted field to the update packet. More...
 
 datadict.format (var fmtname, var value)
 Return a formatted value according to the data dictionary. More...
 
 datadict.copyfield (var incoming, var normal, var source, var dest)
 Copy the contents of one field to another. More...
 

Function Documentation

datadict.addfield ( var  packet,
var  fieldkey,
var  value,
var  pipeline_id 
)

Add a field to the update packet.

Parameters
packet- Packet to add field to
fieldkey- Secondary key of the field to add
value- Field value to add
pipeline_id- pipeline definition to search for config - defaults to the current pipeline (optional)
Returns
Nothing
Note
This function references the outgoing datadictionary
datadict.addformattedfield ( var  packet,
var  fieldkey,
var  fmtname,
var  value 
)

Add a formatted field to the update packet.

Parameters
packet- Packet to add field to
fieldkey- Secondary key of the field to add
fmtname- Name of the format
value- Field value to add
Returns
Nothing
datadict.copyfield ( var  incoming,
var  normal,
var  source,
var  dest 
)

Copy the contents of one field to another.

Parameters
incoming- Update packet that we have received
normal- Normalised packet the we can add updates to
source- Source fieldname/fieldnumber
dest- Destination fieldname/fieldnumber
Returns
The field we have just copied
Return values
nil- Field wasn't available in incoming
datadict.format ( var  fmtname,
var  value 
)

Return a formatted value according to the data dictionary.

Parameters
fmtname- Name of the format
value- Field value to format
Returns
datadict.get_datadict.config_item ( var  symbol_name,
var  required_item 
)

Get the value of a config item.

Parameters
symbol_name- Incoming symbol name
required_item- Item that we require
Returns
Item that we required
Return values
nil- Item not defined

We initially look under the symbol_name in case any items have been overridden, if that fails, we look under /DataDictionary for a default value.

datadict.getconfigitem ( var  symbolname,
var  requireditem,
var  pipeline_id 
)

Get the value of a config item.

Parameters
symbolname- Incoming symbol name
requireditem- Item that we require
pipeline_id- pipeline definition to search for config - defaults to the current pipeline (optional)
Returns
Item name that we required
Return values
nil- Item not defined

We initially look under the symbolname in case any items have been overridden, if that fails, we look under the pipeline this symbol is associated with.

datadict.getfield ( var  update,
var  fieldkey,
var  formatkey,
var  pipeline_id 
)

Get the value of a field and apply a format.

Parameters
update- Incoming update
fieldkey- Fieldkey to obtain
formatkey- Format key to apply to the field data (optional)
pipeline_id- Pipeline to get configuration from, defaults to the current pipeline (optional)
Returns
Field value
Return values
nil- No field present in update

This function should be used on the incoming data packet from feed - it references the individual pipeline configuration to determine what field a fieldkey maps to

datadict.getoutputfield ( var  packet,
var  fieldkey 
)

Get an output field from a normalised packet.

Parameters
packet- Packet to add field to
fieldkey- Secondary key of the field to get
Returns
Field value
Return values
nil- No field present in update

This function should be used on the outgoing data packet - it references the datadictionary to determine what field a fieldkey maps to


Generated on Fri Jan 12 2024 14:49:15 for Transformer Pipeline Module API Reference