Sign inSign up

beetaone/fields-selector

By beetaone

Updated almost 2 years ago

Image
0

176

beetaone/fields-selector repository overview

Fields Selector

NameFields Selector
Versionv1.0.1
DockerHubbeetaone/fields-selector
authorsJakub Grzelak

Description

This module allows to select data fields (labels) to keep or remove from received data.

Environment Variables

Module Specific

The following module configurations can be provided in a data service designer section on beetaone platform:

NameEnvironment VariablestypeDescription
ActionACTIONstringAction to apply on the data fields: keep or remove.
FieldsFIELDSstringList of comma (,) separated data fields (labels) names to apply action on.
Set by the beetaone Agent on the edge-node

Other features required for establishing the inter-container communication between modules in a data service are set by beetaone agent.

Environment VariablestypeDescription
MODULE_NAMEstringName of the module
MODULE_TYPEstringType of the module (Input, Processing, Output)
EGRESS_URLSstringHTTP ReST endpoints for the next module
INGRESS_HOSTstringHost to which data will be received
INGRESS_PORTstringPort to which data will be received

Dependencies

bottle
requests

Input

Input to this module is:

  • JSON body single object, example:
{
    "name": "Ram",
    "email": "[email protected]",
    "age": 23
}
  • array of JSON body objects, example:
[
    {
        "name": "Ram",
        "email": "[email protected]",
        "age": 23
    },
    {
        "name": "Shyam",
        "email": "[email protected]",
        "age": 28
    },
    {
        "name": "John",
        "email": "[email protected]",
        "age": 33
    },
    {
        "name": "Bob",
        "email": "[email protected]",
        "age": 41
    }
]

Output

If the module settings are ACTION = keep and FIELDS = name, email then output of this module is

  • JSON body single object, example:
{
    "name": "Ram",
    "email": "[email protected]",
}
  • array of JSON body objects, example:
[
    {
        "name": "Ram",
        "email": "[email protected]"
    },
    {
        "name": "Shyam",
        "email": "[email protected]"
    },
    {
        "name": "John",
        "email": "[email protected]"
    },
    {
        "name": "Bob",
        "email": "[email protected]"
    }
]

Tag summary

Content type

Image

Digest

sha256:146b327fe

Size

49.1 MB

Last updated

almost 2 years ago

docker pull beetaone/fields-selector:v1.0.1