CSV Format Files

In this type of file, each data element is surrounded with a separator, a delimiter, or both. You can use file record IDs to determine the source table and the target table; however, in most cases this type of file contains homogenous records.

In the following example, the qualifier is a double quote (") and the delimiter is a comma (,):

"NAME","ADDRESS","PHONE" 

File layout definitions store the file record ID (when used) and the relative sequence number of the field. In the preceding example, "PHONE" is sequence number 3.

The following table describes the properties of CSV format files:

Property Description EDI Manager Equivalent

File Format

File format (CSV).

None.

File Record ID

A group of numbers that can be used to identify the file record.

RowID.

ID Sequence Number

The sequence number of the field that contains the file record ID.

Treated as a field within each map.

Qualifier

The character that surrounds a field to mark its extent. This character can be set at the file layout, file record, or file field level.

Delimiter.

Delimiter

The character used to separate fields from each other. This character can be set at the file layout or file record level.

Separator.

File Record Name

A user-specified name for the file record.

None.

File Record Field

A user-specified name for the file field.

None.

Field Format

The formatting options for both inbound and outbound field processing.

Based on the field type.

Considerations for CSV Format Files

Consider the following points when working with CSV format files:

  • Both the qualifier and the delimiter accept a blank as a valid value.

  • If a field is null, you do not have to use qualifiers.

    In the following example, Field2 is null:

    Field1,,Field3,Field4. . .
  • The system automatically pads the decimal places with zeros when amounts do not have values beyond the decimal point.

    For example, 100 is automatically written as 100.00.

Parsing Support for CSV Format Files

The following list summarizes parsing support in preview and runtime for all CSV file types:

  • All blank lines are ignored.

    In the past, blank lines came in as empty records.

  • All empty fields are returned as empty strings or zeros.

  • Fields, including commas or new lines, are surrounded in quotes.

  • When a field is in quotes, any embedded quotes must be escaped by two quotes.

  • When non-Microsoft Excel format backslashes are embedded within a string, they must be double backslashes to be interpreted as a backslash; otherwise, they are interpreted as an escape character.

Parsing Support for Microsoft Excel CSV Format

The following table summarizes the differences between Microsoft Excel CSV parsing and non-Microsoft Excel CSV parsing:

Item Microsoft Excel CSV Parsing Non-Microsoft Excel CSV Parsing

White space

Leading and trailing white space is significant for strings.

Leading and trailing whites paces are ignored, including converted tabs.

Backslash

Not interpreted as special characters except for new lines.

Interpreted.

Quotes inside quoted string

Double quoted.

Escaped.

Tab

Converted to a single space.

Interpreted as tabs and ignored.