Parsing Fixed-width Text Files

TIBCO Clarity can parse the source data in a fixed-width file according to the configured parsing rules.

Data in a fixed-width text file is illustrated in rows and columns, with one entry per row. Each column has a fixed width, specified in characters, which determines the maximum amount of data it can contain.

Procedure

  1. Click Character encoding (comma separated) to specify the encoding method applied to your source file.
    By default, UTF-8 is selected.
  2. In the Column Width (comma separated) field, specify a fixed width for each column. Use comma as a delimiter.
    The width is specified in characters, which determines the maximum amount of data it can contain.
  3. In the Column Names field, enter a name for each column. Use comma as a delimiter.
  4. Define which data is parsed and how it is parsed with the following options:
    Option Description
    Ignore first line(s) at beginning of file Select this check box and enter the number of lines to be ignored at the beginning of the file when parsing the source data.

    Use this operation to omit the column header.

    Parse next line(s) as column headers Select this check box to parse the specified line as the column header.

    By default, this check box is selected, the value is 1, which means the first row in your raw data is parsed as the column header.

    Discard first row(s) of data Select this check box and enter the number of rows to be discarded.

    This operation does not discard the column header you have specified.

    Skip last rows from end of data Select this check box and enter the number of rows to be omitted from the end of data.
    Truncate line after characters Select this check box and enter the number of characters to be truncated. The default value is 5000, which the means that the lines that after 5000 characters are not parsed.
    Store file source (file names, URLs) in each row Select this check box to create a new column that stores the name or URL of the source file.
    Store blank cells as nulls Select this check box to store blank cells as nulls.

    This check box is selected by default.

    Store blank rows Select this check box to store blank rows.

    This check box is selected by default.

    A preview of parsed data is displayed in the Preview area.
  5. Click Next. Preview the source file information.
  6. Optional: On the "Get data from" page, select a way to upload another source file.
    See Uploading Data for more details.
  7. Click Done adding.

What to do next

Mapping Data