Expected JSON file format
Ingested JSON files must represent an array of JSON
objects (each object representing one item). [
{
### content of first item
},
{
### content of second item
},
...
{
### content of last item
}
]
Each JSON object must provide:
- The properties of the item. Missing properties are assumed as null.
- An extra
class property, indicating the fully qualified name (package
name + "." + class name) of the item's class in the target Index Unit.
- Optionally, a
uri property. If it is not the case, Data Factory Studio generates the item URI automatically.
Note:
The order of the properties in the JSON object does not matter.
Example:
If the data model contains a People class in a
com.example package, with the following properties:
name type: String
age type: Integer
birthdate type: Date
relatives type: List of Reference
pets type: Map of Strings
The following json file content is valid: [
{
"uri": "people_1",
"class": "com.example.People",
"name": "Bob",
"age": 20,
"birthdate": "2000-12-25",
"relatives": ["people_4", "people_15"],
"pets": {
"Atlas": "dog",
"Bonnie": "cat"
}
},
{
"uri": "people_4",
"class": "com.example.People",
"birthdate": "1980-10-30",
"relatives": [],
"pets": {},
"age": 40,
"name": "Alice"
},
{
"name": "Camille",
"birthdate": null,
"pets": {},
"uri": "people_15",
"class": "com.example.People"
}
]
Property Type Support
Binary
Supports a json string containing data encoded in Base64 or a JSON null.
JSON Value |
Resulting Value (in the Index Unit) |
"YWJjZGVmZ2gxMjPDqcOgw6ckJsKnwr7jg4jjg4jjg60=" |
Binary.decodeBase64("YWJjZGVmZ2gxMjPDqcOgw6ckJsKnwr7jg4jjg4jjg60=")
|
null |
NULL |
Boolean
Supports the standard JSON boolean tokens true and
false , a json null value, or eventually a json string.
JSON Value |
Resulting Value (in the Index Unit) |
true |
true
|
false |
false |
True |
Not supported |
False |
Not supported |
null |
NULL |
"true" |
true |
"True" |
true |
"TRUE" |
true |
"TruE" |
true |
"false" |
false |
"False" |
false |
"FALSE" |
false |
"FasLE" |
false |
"abcdef" |
false |
"1" |
false |
0 |
Not supported |
Date
Supports a JSON string containing a date or a datetime with ISO 8601 format, or a JSON
null.
JSON Value |
Resulting Value (in the Index Unit) |
ISO 8601 |
"1970-01-25" (yyyy-MM-dd) |
Date.of(1970, 01, 25) |
"1234-05-06T07:08:09" (yyyy-MM-dd'T'HH:mm:ss) |
Date.of(1234, 5, 6) |
"2222-02-22T22:22:22Z" (yyyy-MM-dd'T'HH:mm:ssXXX) |
Date.of(2222, 2, 22) |
"1970-01-01T01:01:01+02:00" (yyyy-MM-dd'T'HH:mm:ssXXX) |
Date.of(1970, 1, 1) |
Other formats |
"30/05/1978 02:34:56" (dd/MM/yyyy HH:mm:ss) |
Not supported |
"2/4/2010 2:39:28 PM" (M/d/yyyy h:mm:ss tt) |
Not supported |
"6:05:12 a.m." (h:mm:ss tt) |
Not supported |
"23:31:18.345" (HH:mm:ss.s) |
Not supported |
"Tuesday, August 20, 2002" (dddd, MMMM dd, yyyy) |
Not supported |
"Wed, Aug 31 1994" (ddd, MMM dd yyyy) |
Not supported |
"03281999030456" (MMddyyyyHHmmss) |
Not supported |
"Im a random string" |
Not supported |
null |
NULL |
LocalDateTime
Supports a JSON string containing a datetime with ISO 8601 format, or a JSON null.
JSON Value |
Resulting Value (in the Index Unit) |
ISO 8601 |
"1970-01-25" (yyyy-MM-dd) |
Not supported |
"1234-05-06T07:08:09" (yyyy-MM-dd'T'HH:mm:ss) |
LocalDateTime.of(1245, 5, 6, 7, 8, 9) |
"2222-02-22T22:22:22Z" (yyyy-MM-dd'T'HH:mm:ssXXX) |
LocalDateTime.of(2222, 2, 22, 22, 22, 22)
|
"1970-01-01T01:01:01+02:00" (yyyy-MM-dd'T'HH:mm:ssXXX) |
LocalDateTime.of(1970, 1, 1, 1, 1, 1) |
Other formats |
"30/05/1978 02:34:56" (dd/MM/yyyy HH:mm:ss) |
Not supported |
"2/4/2010 2:39:28 PM" (M/d/yyyy h:mm:ss tt) |
Not supported |
"6:05:12 a.m." (h:mm:ss tt) |
Not supported |
"23:31:18.345" (HH:mm:ss.s) |
Not supported |
"Tuesday, August 20, 2002" (dddd, MMMM dd, yyyy) |
Not supported |
"Wed, Aug 31 1994" (ddd, MMM dd yyyy) |
Not supported |
"03281999030456" (MMddyyyyHHmmss) |
Not supported |
"Im a random string" |
Not supported |
null |
NULL |
DateTime
Supports a JSON string containing a datetime (specifying timezone) with ISO 8601 format,
or a JSON null.
JSON Value |
Resulting Value (in the Index Unit) |
ISO 8601 |
"1970-01-25" (yyyy-MM-dd) |
Not supported |
"1234-05-06T07:08:09" (yyyy-MM-dd'T'HH:mm:ss) |
Not supported |
"2222-02-22T22:22:22Z" (yyyy-MM-dd'T'HH:mm:ssXXX) |
DateTime.of(2222, 2, 22, 22, 22, 22, 0, ZoneOffset.utc())
|
"1970-01-01T01:01:01+02:00" (yyyy-MM-dd'T'HH:mm:ssXXX) |
DateTime.of(1970, 1, 1, 1, 1, 1, 0, ZoneOffset.ofHours(2))
|
Other formats |
"30/05/1978 02:34:56" (dd/MM/yyyy HH:mm:ss) |
Not supported |
"2/4/2010 2:39:28 PM" (M/d/yyyy h:mm:ss tt) |
Not supported |
"6:05:12 a.m." (h:mm:ss tt) |
Not supported |
"23:31:18.345" (HH:mm:ss.s) |
Not supported |
"Tuesday, August 20, 2002" (dddd, MMMM dd, yyyy) |
Not supported |
"Wed, Aug 31 1994" (ddd, MMM dd yyyy) |
Not supported |
"03281999030456" (MMddyyyyHHmmss) |
Not supported |
"Im a random string" |
Not supported |
null |
NULL |
Float and Decimal
Support a JSON number, a JSON null, or a JSON string that can be parsed into a number.
JSON Value |
Resulting Value (in the Index Unit) |
42
|
42. |
42L
|
Not supported |
42.3 |
42.3 |
42. |
42. |
42.3f |
Not supported |
42.3d |
Not supported |
4.23e3 |
4230. |
0x2A |
Not supported |
0x2A.5p-0 |
Not supported |
null |
NULL |
"42" |
42. |
"42L" |
Not supported |
"42.3" |
42.3
|
"42." |
42.
|
"42.3f" |
42.3 |
"42.3d" |
42.3
|
"4.23e3" |
4230.
|
"0x2A" |
Not supported |
"0x2A.5p-0" |
42.3125 |
"" |
Not supported |
"foobar" |
Not supported |
Integer
Supports a JSON integer, a JSON null, or a JSON string that can be parsed into an
integer.
JSON Value |
Resulting Value (in the Index Unit) |
42 |
42. |
42L |
Not supported |
42.3 |
Not supported |
42. |
Not supported |
42.3f |
Not supported |
42.3d |
Not supported |
4.23e3 |
Not supported |
0x2A |
Not supported |
null |
NULL |
"42" |
42 |
"42L" |
Not supported |
"42.3" |
Not supported |
"42.3f" |
Not supported |
"42.3d" |
Not supported |
"4.23e3" |
Not supported |
"0x2A" |
Not supported |
"0x2A.5p-0" |
Not supported |
"" |
Not supported |
"foobar" |
Not supported |
Geo
Support a JSON string containing WKT data, or a JSON null.
JSON Value |
Resulting Value (in the Index Unit) |
"POINT(6 10)" |
Geo.ofWkt("POINT(6 10)")
|
"LINESTRING(3 4,10 50,20 25)" |
Geo.ofWkt("LINESTRING(3 4,10 50,20 25)") |
"POLYGON((1 1,5 1,5 5,1 5,1 1))" |
Geo.ofWkt("POLYGON((1 1,5 1,5 5,1 5,1 1))")
|
"POINT EMPTY" |
Geo.ofWkt("POINT EMPTY") |
"foobar" |
Not supported |
null |
NULL |
Reference
Support a JSON string containing the uri of a referenced item, or a JSON null.
JSON Value |
Resulting Value (in the Index Unit) |
"FDJSKFDGSFLGKFL" (item uri) |
A reference to that item |
Text, String, and FullTextSearch
Supports a JSON string, or JSON null.
JSON Value |
Resulting Value (in the Index Unit) |
"Any value" |
"Any value" |
"" |
"" |
null |
NULL |
Property Data Structures
Singleton
Mono-valuated value.
List
An ordered collection of items (which may contain duplicates).
Support a JSON array or a JSON null.
JSON Value |
Resulting Value (in the Index Unit) |
["Any", "value"] |
["Any", "value"] |
[1, 2, 3, 4] |
[1, 2, 3, 4] |
[] |
an empty list or collection |
null |
NULL |
Collection
An unordered collection of items (which may contain duplicates). Collection parsing is
identical to list parsing.
Map
An unordered key-value mapping.
Supports a Parquet map or a null.
JSON Value |
Resulting Value (in the Index Unit) |
{"Any key": "Any value"} |
[ "Any key": "Any value" ] |
{"a": 1, "b":2, "c":3, "d":4}
|
["a": 1, "b":2, "c":3, "d":4] |
{} |
an empty map |
null |
NULL |
{123: "abc"} |
not supported |
"foobar" |
not supported |
|