Apama Analytics Builder 10.7.0 | Using Apama Analytics Builder for Cumulocity IoT | Block Reference | Utility | Extract Property
 
Extract Property
apama.analyticskit.blocks.core.ExtractProperty
Extracts the specified property from the input value and converts it to the specified type.
The value in the Value input named by the Property Name parameter should be a string, number or boolean.
You can specify a period (.) as part of the Property Name parameter to extract nested values from a dictionary.
For example: If the input is { "location" : { "city" : "Cambridge" } } (in JSON form), then you can extract that value by specifying location.city as the Property Name parameter.
You can also specify square brackets as part of the Property Name parameter to extract a specific element from a sequence.
For example: If the input is { "users" : [ { "age" : 40.375 } ] } (in JSON form), then you can extract that value by specifying users[0].age as the Property Name parameter.
The block does not support extracting entries from a dictionary whose key contains special characters like the period (.) or square brackets. Also it does not support extracting entries from a sequence without using square brackets, for example, users.0.id must be written as users[0].id.
Parameters
Name
Description
Type
Notes
Property Name
The name or path of the property that is to be extracted from the input value.
string
Property Type
The type to which the property value is to be converted.
Option - one of:
*String
*Boolean
*Float
Default: string
Clear On Missing
If selected, the default value of the specified type is output if the Property Name parameter was not specified or if the value cannot be converted into the specified type.
boolean
Default: false
Input Port Details
Name
Description
Type
Value
The input value from which the property is to be extracted.
any
Output Port Details
Name
Description
Type
Extracted Value
The value that has been extracted from the input value.
any