mapper

package
v0.2.1-develop.116 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 11, 2019 License: BSD-3-Clause Imports: 2 Imported by: 0

README


title: Mapper weight: 4603

Mapper

This activity performs generic mapping activity, also support array type switching, from primitive array, such as ["a", "b"] to object array [{"field": "a"}, {"field", "b"}], or vice versa, to overcome UI array mapping limitation.

Schema

Inputs and Outputs:

{
  "inputs": [
        {
            "name": "model",
            "type": "string"
        },
        {
            "name": "dataType",
            "type": "string",
            "required": true,
            "allowed": ["Boolean","Datetime", "Double", "Integer", "Long", "String"]
        },
        {
            "name": "isArray",
            "type": "boolean"
           },
           {
            "name": "inputArrayType",
            "type": "string",
            "allowed": ["Object Array", "Primitive Array"]
           },
           {
            "name": "outputArrayType",
            "type": "string",
            "allowed": ["Object Array", "Primitive Array"]
           },
        {
            "name": "input",
            "type": "complex_object"
        },
        {
            "name": "userInput",
            "type": "complex_object"
        }
    ],
  
    "outputs": [
        {
            "name": "output",
            "type": "complex_object",
            "required": true
        }
    ]
}

Settings

Setting Required Description
model False Select the common data model, must be the same as the one selected in Trigger
dataType True Data type, primitive data types plus types defined in common data model if a model is selected. "User Defined..." data type allows user defined json schema
isArray True True if input is an array
inputArrayType False Required if isArray is set to true, example of "Object Array": [{"field":"value"1},{"field", "value2"}], example of "Primitive Array": ["value1", "value2"]
outputArrayType False Required if isArray is set to true, see examples above

Input Schema

The json schema is automatically created based on settings

Ouput Schema

The json schema is automatically created based on settings

Documentation

Overview

* Copyright © 2018. TIBCO Software Inc. * This file is subject to the license terms contained * in the license file that is distributed with this file.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewActivity

func NewActivity(metadata *activity.Metadata) activity.Activity

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL