Representation of Data Types

The data types that you import are represented in the following way in the CSV files:

Data Type Values
boolean

The boolean data type is represented by one of the following value pairs:

  • true or false
  • 1 or 0
byte The byte data type is represented by the hexadecimal notation such as 0xFF or FF.
char

The char data type is optionally enclosed in single or double quotes, depending on the following conditions:

  • If the char data type is used to represent a comma or a newline character, then it is, preceded by a backslash, or enclosed in a single or double quotes
  • If the char data type is used to represent a quote, it is preceded by a backslash. Exceptions:
    • The char is enclosed in quotes
    • The enclosing quotes and the internal quote are not the same type; for example, if the enclosing quotes are double quotes and the internal quote is a single quote, or vice versa.
  • If the char data type is used to represent a backslash, it is preceded by another backslash.
primitive numbers (short, int, long, float, double) The primitive numbers are represented by the decimal notation.
number The number is represented by the decimal notation such as 123.456 or scientific notation such as 1.23456e2 .
string

The string data type is optionally enclosed in a single or double quotes, depending on the following conditions:

  • If the data type string contains a comma or a newline character, then the character is preceded by a backslash, or the string is enclosed in a single or double quotes
  • If the data type string contains a single or double quote, then the quote is preceded by a backslash. Exceptions:
    • The string is wrapped in quotes
    • The enclosing quotes and the internal quote aren't of the same type; for example, if the enclosing quotes are double quotes and the internal quote is a single quote.
  • If the data type string contains a backslash, it is preceded by another backslash.
time

The time data type can be represented in one of the following ways:

  • String, in the format: "HH:mm:ss.SSS"

    The variables are explained as follows:

    H - Hour in day (0-23)

    m - Minute in hour

    s - Second in minute

    S - Millisecond

  • as a long value which is unique to the internal representation, produced by export .
date

The date data type can be represented in one of the following ways:

  • as a string, which can be in the format of year-month-day ("yyyy-MM-dd","yyyy/MM/dd", or "yyyy MMM dd"), day-month-year, or month-day-year. For example, 2018 Mar 21 AD

    The variables are explained as follows:

    y - Year

    M - Month in year

    d - Day in month

    G - Era designator (AD or BC)

  • Long value which is unique to the internal representation, produced by export .
timestamp

The timestamp data type can be represented in one of the following ways:

  • String, in the format: "<date>T<time>", where date and time are string representations of date and time attributes
  • Long value which is unique to the internal representation, produced by export.
null Any null value for any of the above data types, can be represented as null .