Skip to content

Siddhi Execution Map

Jenkins Build Status GitHub Release GitHub Release Date GitHub Open Issues GitHub Last Commit License

The siddhi-execution-map extension is a Siddhi extension that provides capability to generate and manipulate map (key-value) data objects.

For information on Siddhi and it's features refer Siddhi Documentation.

Download

  • Versions 5.x and above with group id io.siddhi.extension.* from here.
  • Versions 4.x and lower with group id org.wso2.extension.siddhi.* from here.

Latest API Docs

Latest API Docs is 5.0.7.

Features

  • collect (Aggregate Function)

    Collect multiple key-value pairs to construct a map. Only distinct keys are collected, if a duplicate key arrives, it overrides the old value

  • merge (Aggregate Function)

    Collect multiple maps to merge as a single map. Only distinct keys are collected, if a duplicate key arrives, it overrides the old value.

  • clear (Function)

    Function returns the cleared map.

  • clone (Function)

    Function returns the cloned map.

  • combineByKey (Function)

    Function returns the map after combining all the maps given as parameters, such that the keys, of all the maps will be matched with an Array list of values from each map respectively.

  • containsKey (Function)

    Function checks if the map contains the key.

  • containsValue (Function)

    Function checks if the map contains the value.

  • create (Function)

    Function creates a map pairing the keys and their corresponding values.

  • createFromJSON (Function)

    Function returns the map created by pairing the keys with their corresponding values given in the JSON string.

  • createFromXML (Function)

    Function returns the map created by pairing the keys with their corresponding values,given as an XML string.

  • get (Function)

    Function returns the value corresponding to the given key from the map.

  • isEmpty (Function)

    Function checks if the map is empty.

  • isMap (Function)

    Function checks if the object is type of a map.

  • keys (Function)

    Function to return the keys of the map as a list.

  • put (Function)

    Function returns the updated map after adding the given key-value pair. If the key already exist in the map the key is updated with the new value.

  • putAll (Function)

    Function returns the updated map after adding all the key-value pairs from another map. If there are duplicate keys, the key will be assigned new values from the map that's being copied.

  • putIfAbsent (Function)

    Function returns the updated map after adding the given key-value pair if key is absent.

  • remove (Function)

    Function returns the updated map after removing the element with the specified key.

  • replace (Function)

    Function returns the updated map after replacing the given key-value pair only if key is present.

  • replaceAll (Function)

    Function returns the updated map after replacing all the key-value pairs from another map, if keys are present.

  • size (Function)

    Function to return the size of the map.

  • toJSON (Function)

    Function converts a map into a JSON object and returns the JSON as a string.

  • toXML (Function)

    Function returns the map as an XML string.

  • values (Function)

    Function to return the values of the map.

  • tokenize (Stream Processor)

    Tokenize the map and return each key, value as new attributes in events

Dependencies

There are no other dependencies needed for this extension.

Installation

For installing this extension on various siddhi execution environments refer Siddhi documentation section on adding extensions.

Support and Contribution

  • We encourage users to ask questions and get support via StackOverflow, make sure to add the siddhi tag to the issue for better response.

  • If you find any issues related to the extension please report them on the issue tracker.

  • For production support and other contribution related information refer Siddhi Community documentation.