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 to specify the encoding method applied to your source file. By default, UTF-8 is selected.
  2. In the Column Width 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 option 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 option to parse the specified line as the column header.

    By default, this option 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 option 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 option and enter the number of rows to be omitted from the end of data.
    Truncate line after characters Select this option 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 option to create a new column that stores the name or URL of the source file.
    Store blank cells as nulls Select this option to store blank cells as nulls.
    Store blank rows Select this option to store blank rows.
    A preview of parsed data is displayed in the Preview area.
  5. Click Next. Preview the source file information and click Done adding to add the source file.
  6. Optional: On the "Get data from" page, select a way to upload another source file. See Uploading Data for more details.

What to do next

Mapping Data