To load data into the platform, you must supply CSV files containing the data you wish to upload. The platform will attempt to determine the following from the files:
- the character encoding
- the character used as the column delimiter
- the names of the columns
- the character used as the text-qualifier
There are limitations on what the platform can automatically determine, and sometimes you need to help the process along by supplying some of this information in a table definition file (TDF), as described in mapping structured CSV file data to a new data table. To get started, upload your CSV file and let the platform attempt to identify the contents. By modifying the contents of the TDF returned by the platform, you can quickly define a correct table definition file.
Please note that zero length files, that is, files that have a length or size of zero bytes, cannot be uploaded to a workspace via SFTP.
The rest of this section describes:
- the file name that should be used
- the contents of the CSV file
The file name
For a CSV file to be successfully uploaded, the file name must:
- start with an alphabetic character (a-z/A-Z)
- only contain alphanumeric characters (a-z/A-Z/0-9)
- have the extension .csv
Data from the CSV file is loaded into a table in your workspace. The name of the table is based on the name of the CSV file, with the following changes:
- the leading and trailing spaces are removed from the name
- the name is trimmed to a maximum of 60 characters
Alternatively, the name of the table can be specified in the TDF.
For best results, the table name and file name should:
- contain only lowercase letters
- not include any punctuation
- not include any special characters
Contents of the CSV file
The platform can automatically process CSV files with the following format characteristics:
- The first row is a header row defining the column names.
- Values are separated by the following common characters:
- comma (,)
- colon (:)
- pipe (|)
- space ( )
- tab ( )
- The text-qualifier character is either a double-quote (“) or a single-quote (‘).
- Line endings are either LF or CRLF (and the line endings are consistent throughout the file).
- Files are encoded using UTF-8 or ISO-8859-1.
If your file format does not match these characteristics, then you need to prepare and submit a TDF along with the CSV file, which allows detailed control over the format of your CSV files. See mapping structured CSV file data to a new data table for more details.