Defining Input Fields for a Service or Subflow

To define the input fields for a service or subflow, use the Input stage.

Note: If you define hierarchical data in the input fields, you will not be able to import data or view the data vertically.
  1. Drag an Input stage to the canvas.
  2. Connect the Input stage to the following stage in the dataflow.
  3. Double-click the Input stage.
  4. Select the fields you want to use for input. The list of fields shown depends on the stage that the Input stage is connected to.
  5. To add a new field to the field list, click Add. The Add Custom Field window appears.
  6. Click Add again.
  7. In the Field name field, enter the name you want to use for this field.
  8. Select the data type.

    The following data types are supported:

    bigdecimal
    A numeric data type that supports 38 decimal points of precision. Use this data type for data that will be used in mathematical calculations requiring a high degree of precision, especially those involving financial data. The bigdecimal data type supports more precise calculations than the double data type.
    boolean
    A logical type with two values: true and false.
    bytearray
    An array (list) of bytes.
    Note: Bytearray is not supported as an input for a REST service.
    date
    A data type that contains a month, day, and year. For example, 2012-01-30 or January 30, 2012. You can specify a default date format in Management Console.
    datetime
    A data type that contains a month, day, year, and hours, minutes, and seconds. For example, 2012/01/30 6:15:00 PM.
    double
    A numeric data type that contains both negative and positive double precision numbers between 2-1074 and (2-2-52)×21023. In E notation, the range of values is -1.79769313486232E+308 to 1.79769313486232E+308.
    float
    A numeric data type that contains both negative and positive single precision numbers between 2-149 and (2-223)×2127. In E notation, the range of values -3.402823E+38 to 3.402823E+38.
    integer
    A numeric data type that contains both negative and positive whole numbers between -231 (-2,147,483,648) and 231-1 (2,147,483,647).
    list
    Strictly speaking, a list is not a data type. However, when a field contains hierarchical data, it is treated as a "list" field. In Spectrum™ Technology Platform a list is a collection of data consisting of multiple values. For example, a field Names may contain a list of name values. This may be represented in an XML structure as:
    <Names>
        <Name>John Smith</Name>
        <Name>Ann Fowler</Name>
    </Names>
    It is important to note that the Spectrum™ Technology Platform list data type different from the XML schema list data type in that the XML list data type is a simple data type consisting of multiple values, whereas the Spectrum™ Technology Platform list data type is similar to an XML complex data type.
    long
    A numeric data type that contains both negative and positive whole numbers between -263 (-9,223,372,036,854,775,808) and 263-1 (9,223,372,036,854,775,807).
    string
    A sequence of characters.
    time
    A data type that contains the time of day. For example, 21:15:59 or 9:15:59 PM.

    You can also add a new, user-defined data type if necessary, and that new type can be a list of any defined data type. For example, you could define a list of names (string), or a new data type of addresses that includes AddressLine1 (string), City (string), StateProvince (string) and PostalCode (string). After you create the field, you can view the data type by accessing the Input Options dialog and pressing the button in the Data Type column. The Data Type Details dialog box will appear, showing the structure of the field.

  9. Press OK again.
  10. Click the Expose column check box to make the field available for stage operations. Clearing the check box and clicking OK deletes the field from the field list.
  11. The Data type name field displays the default element name to use for input records in SOAP and REST web service requests to this service. The default value is Row. If you want to use a different element name for input records, enter it here.

    For example, with the default value Row, a JSON web service request would use Row as the element name for the input record, as shown here:

    {
      "Input": 
      {
        "Row": [
          {
            "AddressLine1": "1825 Kramer Ln",
            "City": "Austin",
            "StateProvince": "TX"
          }
        ]
        
      }
    }

    If you were to change the value in the Data type name field to Address, the JSON request would need to use Address instead of Row as the element name for the record, as shown here:

    {
      "Input": 
      {
        "Address": [
          {
            "AddressLine1": "1825 Kramer Ln",
            "City": "Austin",
            "StateProvince": "TX"
          }
        ]
        
      }
    }