Configuring an Output Schema

You can configure an output schema using Files for Unix and Windows Resource Configuration.

Procedure

  1. Configure attributes in the Output Record.
    For detailed information about these attributes, see Output Schema
  2. In the attributes panel, click Add to add some fields.

    The name of the field is generated automatically as field, field1, field2 and so on. You can edit the field names. With the Add, Remove, Up and Down buttons, you can add or remove attributes, move attributes up and down.

    Attributes are editable. You can change the fields of the attributes or change the number of attributes.
    • To edit an attribute, click the attribute.
    • To add an attribute, click Add.
    • To remove a field, click Remove.
    • To shuffle fields, click Up or Down.
    • To set default value for an attribute, right-click the attribute.
  3. Configure the Name, Type, Width, Alignment, Padding, Sign, Precision, Sc.Notation and Upper Case for the added fields.
    • Name

      By default the name of the first attribute is field. You can change the name of the attribute, according to your requirements.

    • Type

      The data type of the attribute.

      If the dateTime type is used, you must specify the pattern and locale: right-click the field name and select Set locale and pattern, and then select a supported Locale and Pattern from the list.

    • Width

      The number of characters used to represent the field. Zero (0) signifies that the field is not included in the output line. Negative one (-1) signifies that as many characters as needed (without padding) are used. Negative one (-1) is the default width selected for the field and it is also the default value for lines that use delimiters. Lines using the Positional method cannot specify -1.

    • Alignment

      Specifies whether the data is aligned to the left or the right.

    • Padding

      The character added to this field pads the field to the specified width.

    • Sign

      This attribute is used for numeric fields only. It is used to add a prefix to the positive sign before positive numbers in the output. If you want to display the sign in the output, set it to True; otherwise, set it to False.

    • Precision

      Specifies the number of digits after the decimal place.

      For example, with a precision of 3, the number 3.14159 is displayed as follows:
      • Scientific notation: 3.142e+1
      • Non-scientific notation: 3.142

      A value of -1 indicates that the entire precision provided by the operating system is used.

    • Sc.Notation

      For real numbers only, used to determine whether scientific notation is used for the output of this field. To use the scientific notation, set it to True.

    • Upper Case

      Valid only when the Sc. Notation is set to True. When this field is set to True, the E in the scientific notation is in uppercase. When this field is set to False, the e in the scientific notation is in lowercase.

  4. Modify the relationship of file records in an output schema.
    The output schema reflects the relationship of the file records. The relationship in the output schema determines the sequence of lines that are generated in the output file.
    For example, if the output schema is defined as follows:
    WriteSchema
    	FileRecord_Parent
    		FileRecord_Child_1
    			FileRecord_Child_2
    		...
    		...
    The sequence of the lines in the output file is:
    FileRecord_Parent
    	FileRecord_Child_1
    	FileRecord_Child_1
    	...
    		FileRecord_Child_2
    	...
    	...
    You can rearrange the order of the child records of a output schema. Select the child record you want to move and select Move Up or Move Down from the File Schemas panel or right-click the child record, and select Move Up or Move Down in the pop-up menu to change the order.

    Once you change the order of the child records of a output schema, the child records are written to a file in the exact same order as you have configured for the output schema at design time.