API Data Connection
Format Data to Import
To upload data in CSV format, the Domo specification used for representing data grids in CSV format closely follows the RFC standard for CSV (RFC-4180). We extend the RFC in the following ways:
- Optionally use line feeds without a carriage return as a row separator.
- Support of Unicode characters.
All data uploaded in this format must comply with a schema that is supplied separately from the upload. For example the CSV must comply with the correct number of columns and field types.
- file = [header CRLF] record *(CRLF record) [CRLF]
- header = name *(COMMA name)
- record = field *(COMMA field)
- name = field
- field = (escaped | +–escaped)
- escaped = DQUOTE *(TEXTDATA | COMMA | CR | LF | 2DQUOTE) DQUOTE
- non-escaped = *TEXTDATA
- COMMA = %x2C
- DQUOTE = %x22
- 2DQUOTE = DQUOTE DQUOTE
- CRLF = CR LF | LF
- CR = %x0D
- LF = %x0A
- TEXTDATA = ![COMMA | CR | LF | DQUOTE]
|a,b,c||One row with three columns|
|“a”,b,c||Escaped first column. Quotes do not count as part of the field|
|“a,a”,b,c||One row with three columns. The first field is escaped and contains a comma as part of its text.|
|One row with three columns. The first field is escaped and contains a line feed as part of its text.|
|“a””a”,b,c||The first field is escaped and contains an escaped quote as part of its text.|
|???,b,c||Unicode characters as part of the first field.|
|a,b,c||One row with the optional terminating line feed. It is recommended that all uploads to Domo include the optional terminating line feed.
If not supplied Domo may automatically include the linefeed.
|,,||One row with three null values.|
|“”,””,””||One row with three empty string values.|
Examples of Invalid CSV:
|a”,b,c||Quote appearing in a non-escaped field.|
|“a”a”,b,c||Unescaped quoted appearing in a non-escaped field.|
|Line feed appearing in a non-escaped field. This could also be considered missing columns in row one and two.|
|Missing fields in the second row.|
Now that you know how to format data to import, begin leveraging either of these APIs:
Need additional help?
No problem, we'd love to help. Explore our documentation, answers to frequently asked questions, or join other developers in Domo's Developer Forum. For further help, feel free to email us or contact our sales team.