flowbber.plugins.aggregators.expander

Expander

Takes a value on data and move its contents to the root

For example, consider a collected data that looks as following:

OrderedDict([
    ('loaded', OrderedDict([
        ('my_source', {
            'my_value1': 1000,
            'my_value2': 2000,
            'my_value3': 3000,
            'other_value': 'hello'
        }),
    ])),
    ('other_source', {
        'its_value1': 1999,
        'its_value2': 2999,
        'its_value3': 3999,
        'other_value': 'bye'
    }),
])

And you want data inside loaded to be in the top level. If using the configuration:

[[aggregators]]
type = "expander"
id = "expander"

    [aggregators.config]
    key = "loaded"

The data will be filtered to:

OrderedDict([
    ('my_source', {
        'my_value1': 1000,
        'my_value2': 2000,
        'my_value3': 3000,
        'other_value': 'hello'
    }),
    ('other_source', {
        'its_value1': 1999,
        'its_value2': 2999,
        'its_value3': 3999,
        'other_value': 'bye'
    }),
])

Dependencies:

pip3 install flowbber[expander]

Usage:

[[aggregators]]
type = "expander"
id = "..."

    [aggregators.config]
    key = "..."
{
    "aggregators": [
        {
            "type": "expander",
            "id": "...",
            "config": {
                "key": "..."
            }
        }
    ]
}

key

Item to expand to root

  • Optional: False

  • Schema:

    {
        'type': 'string',
        'empty': False,
    }
    
  • Secret: False

Classes

class flowbber.plugins.aggregators.expander.ExpanderAggregator(index, type_, id_, optional=False, timeout=None, config=None)

Inheritance

Inheritance diagram of ExpanderAggregator