Documentation

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:

  1. Optionally use line feeds without a carriage return as a row separator.
  2. 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.

Specifications:

  • 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]

 

Examples

CSV Comment
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.
“a
a”,b,c
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.
a,b,c
a,b,c
Multiple rows.
,, One row with three null values.
“”,””,”” One row with three empty string values.

 

 

Examples of Invalid CSV:

CSV Comment
a”,b,c Quote appearing in a non-escaped field.
“a”a”,b,c Unescaped quoted appearing in a non-escaped field.
a,
b,c
Line feed appearing in a non-escaped field. This could also be considered missing columns in row one and two.
a,b,c

a,b,c
Missing fields in the second row.

Next steps

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.