Opencsv file standards

When configuring ingest jobs and Secure FTP (SFTP) file transfers, keep in mind the following standards for CSV files when using the Opencsv parser. For more information on the Opencsv specification, see https://opencsv.sourceforge.net/.

In this topic:

Ingesting Single-line CSV data

The Opencsv parser enables you to ingest single-line data within your .csv files. Refer to the Oracle Unity Help Center for guidelines to prepare your files for ingestion.

Enabling the Opencsv parser

In the source instances object, use the "csv": "true" or "csv": "false" flags to specify whether the file is a delimited file, or a csv file. The default is false, meaning the file will be treated as a delimited file if the csv parameter is not set.

  • If false, the file will be treated as a delimited file. Quotes in the file will be parsed as input contents. This is the default.
  • If true , the file will be treated as an optionally quoted CSV file.

Enable the Opencsv parser the source instance API.

Example source instances SFTP object

  {
    "tenantId": "100",
    "name": sourceinstance_name,
    "description": Sample SFTP SourceInstance for you to copy,
    "active": true,
    "componentDefinitionId": "FTPCustom",
    "uniqueInstanceId": unique_sourceinstance_ID,
    "parameters": {
      "path": "sftp://ftp_path/*[0-9]{1,}.csv",
      "csv": "true"
      "pem": ---BEGIN RSA PRIVATE KEY-----your_FTP_pemkey----END RSA PRIVATE KEY---
    }
  }

Example of a True CSV file

Quotes and delimiters are used to separate items.

ID,"First name(s)","Last name"

5,"John James","Smith"

Example of a False CSV file

Delimiters are used to separate items. Quotes are parsed as input contents.

ID,First Name(s),Last name

5,John James "JJ",Smith

Special characters

Keep in mind the following for using special characters:

  • For strings without special characters, quotes are optional.
  • For strings with special characters, quotes are mandatory. For example, if a string has a comma, then you will need to quote the string: "Abc, 123".
  • Escapes (backslash character) are optional.
  • Backslash characters should always be escaped. For example, if there is a backslash in your data, use the following format: “\\ abc".
  • To manage quotes inside a quoted string, use a backslash inside the quotes: “Asd \” asd".

Supported delimiters

When configuring a source instance, the Opencsv parser allows you to select one of the available characters as a delimiter: comma (,), semi-colon (;), pipe (|), or tab ( ).

You can also enter a custom delimiter.

When entering a custom delimiter, keep the following in mind:

  • You cannot use the backslash or double quote characters.

  • You must use a single character. You cannot enter multiple characters for the delimiter.

Learn more

RFC 4180 file standards

Sources API

csv file, csv, csv file standards, comma separated files