General File Format
The file should be in CSV format, end with a
.csv
extension, and be UTF-8 encoded.Lines should be terminated with a newline (LF).
Lines beginning with
#
will be treated as a comment line. Comment lines can appear anywhere in the file.The first line that is not a comment must be the header row. The order of columns does not matter.
Any extra columns will be ignored.
All lines should have the same number of values and in the same order as the column header.
Missing values should be left empty. For example:
value 1,,value 3
Values containing a line-break, double-quote or commas must be surrounded by double-quote characters. For example:
value without comma,"value with a ,"
Embedded double-quote characters must be represented by a pair of double-quote characters. For example:
"Ada ""Enchantress of Numbers"" Lovelace",12-10-1815,11-27-1852
Metadata Comments
Metadata comments may optionally be included to describe the data and are used to validate that the actual data matches the expected data.
Metadata comments should be in the following format: #key:value
. Metadata comments are not required.
Metadata comments that are supported are:
row_count
: the number of data rows that should be present in the file. The row count should exclude the header line and any comment lines.
β
If row count validation is enabled, any file where the actual data row count is different than the specifiedrow_count
is considered invalid and will not be processed.
βgenerated_on
: an ISO 8601 date or datetime format indicating when the file was generated. Examples:2021-05-16T22:19:31Z
or2021-05-16
.
β
If validation ofgenerated_on
is enabled, any file where thegenerated_on
is older than 26 hours is considered invalid and will not be processed. If thegenerated_on
specifies a date without time, the file is considered to have been generated at the end-of-the day on the specified date. For example,2021-05-16
is the equivalent of2021-05-16T23:59:59
.
Sample File
Sample file with metadata comments.
#generated_on:2021-05-16T22:19:31Z
user_id,email,first_name,last_name,entitlement,territory_id
234,ada.lovelace@example.com,Ada,Lovelace,home office,"Springfield, IL"
234,ada.lovelace@example.com,Ada,Lovelace,admin,PNW
456,grace.hopper@example.com,Grace,Hopper,field,branch7
#row_count:3
Please contact us at Support@4uplatform.com for additional assistance.