Property value data formats
All the property types defined in a schema specify a logical type that controls the kind of data that properties of that type contain. For example, some properties contain numerical data while others contain strings. Furthermore, of the properties that contain numerical data, some contain integers while others contain floating-point values.
To see the logical type of a particular property type, open the schema in i2 Analyze Schema Designer and select it in the left-hand pane. You'll see its logical type along as well as its identifier, name, and description.
When you specify default values during connector configuration, or you return entities and links to i2 Analyze from a connector, you must ensure that the property values you assign align with the logical types. The following descriptions provide examples of data that is valid for each of the supported logical types.
SINGLE_LINE_STRING
Single-line strings can be up to 250 bytes long, and can be further limited by the schema.
"This is a single-line string."
MULTIPLE_LINE_STRING
Multiple-line strings can be up to 32K bytes long, and can be further limited by the schema.
"This is a multiple-line string."
DATE
Date values must be in the ISO 6801 format "YYYY-MM-DD". Also, values must be in the range from 1753-01-01 to 9999-12-30.
"2021-11-30"
TIME
Time values must be in the ISO 6801 format "hh:mm:ss". Seconds are optional, but hours and minutes are not. Greater precision than seconds is not supported.
"23:59:59"
DATE_AND_TIME
Four pieces of information are required to specify a particular point in time:
- The date
- The time as it would appear on a clock
- The time zone in which the point in time is observed
- If the point in time occurs during the hour that is repeated when clocks are turned back to end Daylight Saving Time, whether to use the first or second occurrence of this time.
There are two ways to return values with the DATE_AND_TIME
logical type. You can use an ISO 8601 string without a time zone; or a date-and-time JSON object that explicitly defines the time zone.
When you use the ISO 8601 format, the value must be specified as a string with at least minute-precision and up to millisecond-precision. The time zone is taken from the timeZoneId
that's defined in defaultValues
in the connector configuration. (If no default is present, the time zone is set to UTC.)
"2021-12-30T23:59:59"
or
"2021-12-30T23:59:59.999"
Alternatively, a JSON object must contain three fields:
localDateAndTime
is a string that conforms to ISO 8601 as above, again with at least minute-precision and up to millisecond-precision.timeZoneId
specifies the time zone in which the moment of time is observed. For a list of valid time zone identifiers, see the IANA Time Zone Database.isDST
specifies which occurrence of the repeated hour to use if the point in time occurs when the clocks turn back at the end of Daylight Saving Time. To use the first, set it totrue
; to use the second, set it tofalse
.
{
"localDateAndTime": "2021-12-30T23:59:59.999",
"timeZoneId": "Europe/London",
"isDST": false
}
BOOLEAN
Boolean values must be be either true
or false
.
true
or
false
INTEGER
Integer values must be in the range from -2147483648 to 2147483647.
2147483647
DOUBLE
Double values must be in the range from 4.94065645841246544e-324d to 1.79769313486231570e+308d.
4.94065645841246544e-324d
DECIMAL
Decimal values are strings that contain up to 18 digits before the decimal separator, and up to 4 digits after it. There can be a leading minus sign, but no exponent (e) notation.
"-123456789012345678.1234"
SELECTED_FROM
Selected-from string values must match a permitted value that the schema or a form condition defines.
"This is a selected-from string."
SUGGESTED_FROM
Suggested-from string values must match a permitted value that a form condition defines when you use them as default values, but are otherwise unrestricted.
"This is a suggested-from string."
GEOSPATIAL
Geospatial values must be formatted as GeoJSON points, as described at https://datatracker.ietf.org/doc/html/rfc7946#section-3.1.2.
The first element in the coordinates
array is longitude, and must be a decimal between -180.0 and 180.0. The second element is latitude and must be a decimal between -90.0 and 90.0.
{
"type": "Point",
"coordinates": [1.0, 2.0]
}
GEOSPATIAL_AREA
Important: Values of type GEOSPATIAL_AREA
are valid for use in connector configuration, but not in the data that you return from a connector.
Geospatial area values must be formatted as GeoJSON feature collections, as described at https://datatracker.ietf.org/doc/html/rfc7946#section-3.3. Foreign members are allowed.
The geometry
must be of type Polygon
or MultiPolygon
, both of which must contain at least four coordinates, where the first coordinate matches the last.
{
"type": "FeatureCollection",
"features": [
{
"type": "Feature",
"geometry": {
"type": "MultiPolygon",
"coordinates": [
[
[
[1.0, 2.0],
[3.0, 4.0],
[5.0, 6.0],
[1.0, 2.0]
]
]
]
}
},
{
"type": "Feature",
"geometry": {
"type": "Polygon",
"coordinates": [
[
[1.0, 2.0],
[3.0, 4.0],
[5.0, 6.0],
[1.0, 2.0]
]
]
}
}
]
}