Configuring JSON Property Injector - Ironstream_Hub - 1.3.1

Ironstream Hub Administration

Product type
Software
Portfolio
Integrate
Product family
Ironstream
Product
Ironstream > Ironstream Hub
Version
1.3.1
Language
English
ContentType
Administration
Product name
Ironstream Hub
Title
Ironstream Hub Administration
Topic type
Administration
First publish date
2022

The JSON property injector process allows the creation of new key/value pairs in the output JSON record. You can inject one or more key/value pairs using this process as described here.

If this process is deployed then all JSON key names will be sorted into strict ascending Unicode character order. In general, this means numbers sort lowest followed by upper case letters which sort before lower case letters. New JSON key/value pairs are inserted into the re-ordered list of key/value pairs in the appropriate place.

When the ProcessType is set to JsonPropertyInjector, a parent field named JsonPropertyInjectorConfiguration must be populated with one or more pairs of Name and Value fields as shown below. You may have any number of Name and Value pairs as you wish.

If you enter items that are not correctly paired, the process will be invalid and the pipeline will not start.

Fields Description Valid Values
Name The JSON key name of the injected property. Any valid JSON name
Value The JSON value string for the injected property. Any valid JSON value
AnnotationName A special form of Value which can be used to insert dynamic information. The AnnotationName value must be exactly one of the supported names listed in the next column. HostName - this sets the name or IP address of the host system as set in the source configuration. This is currently the only valid value for AnnotationName.
Example JSON Property Injector File
{
 "Name": "Injector1",
 "Id": "b3f6eeae-5f9b-44a8-aacd-efe7dbc57f38",
 "JsonPropertyInjectorConfiguration":
{ "InjectedProperties": [ 
   { "Name":"status",  "Value":"critical" } ,  
   { "Name":"primary_property", "Value":"host" },  
   { "Name":"secondary_property", "Value":"JobNameJobId" },  
   { "Name":"host", "AnnotationName":"HostName" }  
  ]   
},
 "ProcessType": "JsonPropertyInjector"
}

Here we are injecting four new key/value pairs, three are fixed text and the fourth is dynamically replaced by the host name of the source system at the time the pipeline is started.

Given the example above and a JSON record from a system named prodserver7.bigcorp.com that contained this:
{"queryfield1":"success", "FIELD2":"shortsearch"}
Then the resulting JSON would be ordered as follows:
{"FIELD2":"shortsearch", "host":"prodserver7.bigcorp.com", 
"primary_property":"host", "queryfield1":"success", 
secondary_property":"JobNameJobId" }