Defining Fields In a Delimited Output File

In the Write to File stage, the Fields tab defines the names, position, and, for some file types, lengths of the fields in the file. After you define an output file on the File Properties tab you can define the fields.

If the output file contains a header record, you can quickly define the fields by clicking Regenerate.

To define fields with default values for position, length, and data type, click Quick Add and select the fields to add.

If the input file does not contain a header record, or if you want to manually define the fields, follow these steps:

  1. Click Add.
  2. In the Name field, choose the field you want to add.
  3. In the Type field, select the data type of the field coming from the dataflow.

    Spectrum Technology Platform supports these data types:

    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 Spectrum 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.
  4. If you selected a date, time, or numeric data type, you can use the default date/time or number format or you can specify a different format for this specific field. The default format is either the system default format that has been set in the type conversion options in Spectrum Management Console, or it is the dataflow's default format specified in the type conversion options in Spectrum Enterprise Designer. The format that is in effect is displayed. To use the default format, leave Default selected. To specify a different format, choose Custom and follow these steps:
    1. In the Locale field, select the country whose formatting convention you want to use. Your selection will determine the default values in the Format field. For date data, your selection will also determine the language used when a month is spelled out. For example, if you specify English the first month of the year would be "January" but if you specify French it would be "Janvier."
    2. In the Format field, select the format for the data. The format depends on the data type of the field. A list of the most commonly used formats for the selected locale is provided.

      An example of the selected format is displayed to the right of the Format field.

      You can also specify your own date, time, and number formats if the ones available for selection do not meet your needs. To specify your own date or time format, type the format into the field using the notation described in Date and time patterns. To specify your own number format, type the format into the file using the notation described in Number Patterns.

  5. Click Add.

After defining the fields in your output file, you can edit its contents and layout.

Option Name

Description

Add

Adds a field to the output. You can append a field to the end of the existing layout, or you can insert a field into an existing position and the position of the remaining fields will be adjusted accordingly.

Modify

Modifies the field's name and type.

Remove

Removes the selected field from the output.

Move Up/Move Down

Reorders the selected field.