The Ara Import file can be used to feed a Ara SaaS referential via the Ara Import API.
The file contains all element of the model repeated for each day we want to import. Each line starts with the element type.
As rows doesn’t have the same number of attributes, there are no headers.
Comments are #
.
Separators are ,
Leading spaces are trimed
Quotes are escaped with another quote ex: [""1234"",""5678""]
All uuids must respect the postgresql uuid data type constraints.
All Hashes and Arrays are parsed as JSON objects and must respect the JSON syntax.
For all models, only the Type, Id, and ModelName attributes must be present. Other attributes can be left empty.
Attribute | Format |
---|---|
Type |
|
Id | UUID |
ModelName | YYYY-MM-DD |
Name | String |
ObjectIDs | Hash |
Example
operator,a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a11,2017-01-01,Name,{"objectidKind":"operatorObjectid"} |
Attribute | Format |
---|---|
Type |
|
Id | UUID |
ParentId | UUID |
ReferentId | UUID |
ModelName | YYYY-MM-DD |
Name | String |
ObjectIDs | Hash |
LineIds | Array of UUID |
Attributes | Hash |
References | Hash |
CollectedAlways | boolean |
CollectChildren | boolean |
CollectSituations | boolean |
stop_area,a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a11,b0eebc99-9c0b-4ef8-bb6d-6bb9bd380a11,c0eebc99-9c0b-4ef8-bb6d-6bb9bd380a11,2017-01-01,Name,{"objectidKind":"stopAreaObjectid"},"[""d0eebc99-9c0b-4ef8-bb6d-6bb9bd380a11"",""e0eebc99-9c0b-4ef8-bb6d-6bb9bd380a11""]","{""AttributeKey"":""abcd""}","{""ReferenceType"":{""ObjectId"":{""objectidKind"":""5678""},""Id"":""42""}}",true,true,true |
The 3 last attributes are optionnal, but you need to define them in the correct order. IE, the 8th attribute will always be CollectSituations, the 9th Number, and the 10th ReferentId.
Attribute | Format |
---|---|
Type |
|
Id | UUID |
ModelName | YYYY-MM-DD |
Name | String |
ObjectIDs | Hash |
Attributes | Hash |
References | Hash |
CollectSituations | boolean |
Number | String |
ReferentId | UUID |
line,f0eebc99-9c0b-4ef8-bb6d-6bb9bd380a11,2017-01-01,Name,{"objectidKind":"lineObjectid"},"{""AttributeKey"":""abcd""}","{""ReferenceType"":{""ObjectId"":{""objectidKind"":""5678""},""Id"":""42""}}",true,L3,f0eebc99-9c0b-4ef8-bb6d-6bb9bd380a11 |
Attribute | Format |
---|---|
Type |
|
Id | UUID |
ModelName | YYYY-MM-DD |
Name | String |
ObjectIDs | Hash |
LineId | UUID |
OriginName | String |
DestinationName | String |
Attributes | Hash |
References | Hash |
DirectionType | String |
vehicle_journey,a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a11,2017-01-01,Name,{"objectidKind":"VJObjectid"},a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a12,Origin,Destination,"{""AttributeKey"":""abcd""}","{""ReferenceType"":{""ObjectId"":{""objectidKind"":""5678""},""Id"":""42""}}",outbound |
A stop visit schedule is a hash with the following keys:
Kind: aimed
, expected
, or actual
DepartureTime: Time in ISO 8601 standard as a string (optional)
ArrivalTime: Time in ISO 8601 standard as a string (optional)
Attribute | Format |
---|---|
Type |
|
Id | UUID |
ModelName | YYYY-MM-DD |
ObjectIDs | Hash |
StopAreaId | UUID |
VehicleJourneyId | UUID |
PassageOrder | Int |
Schedules | Array of Hash |
Attributes | Hash |
References | Hash |
Example
stop_visit,a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a11,2017-01-01,{"objectidKind":"VJObjectid"},a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a12,a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a13,1,"[{""Kind"":""expected"",""ArrivalTime"":""2017-08-17T10:45:50+02:00"",""DepartureTime"":""2017-08-17T10:45:55+02:00""}]","{""AttributeKey"":""abcd""}","{""ReferenceType"":{""ObjectId"":{""objectidKind"":""5678""},""Id"":""42""}}" |
This file defines a Stop Area and a Line for five days:
stop_area,5381c0d7-a479-4f6e-a5e8-36072200715c,"","",2021-11-04,First Stop Place,"{""external"":""ABC"",""internal"":""123""}",[],{},{},true,false,true line,904945be-6d66-4485-9744-489212506db4,2021-11-04,First Line,"{""external"":""A"",""internal"":""1""}",{},{},true stop_area,c521f40d-79fb-4a2c-90f7-ea89a527a65e,"","",2021-11-05,First Stop Place,"{""external"":""ABC"",""internal"":""123""}",[],{},{},true,false,true line,bfbfa8d5-9988-4452-9771-28cf6ab3706a,2021-11-05,First Line,"{""external"":""A"",""internal"":""1""}",{},{},true stop_area,53edbb8d-7270-4b8f-9ed8-e7836d57dac0,"","",2021-11-06,First Stop Place,"{""external"":""ABC"",""internal"":""123""}",[],{},{},true,false,true line,947a791b-7783-49a2-8b1e-189a8bab3e08,2021-11-06,First Line,"{""external"":""A"",""internal"":""1""}",{},{},true stop_area,e7778c32-50fd-4d6b-9997-b7d86fcc8502,"","",2021-11-07,First Stop Place,"{""external"":""ABC"",""internal"":""123""}",[],{},{},true,false,true line,f80420e6-43bd-48b6-9d65-d533a7af2aba,2021-11-07,First Line,"{""external"":""A"",""internal"":""1""}",{},{},true stop_area,c95dc83c-b610-4c4f-b3f9-c82d77714205,"","",2021-11-08,First Stop Place,"{""external"":""ABC"",""internal"":""123""}",[],{},{},true,false,true line,82d26509-dc89-4639-a682-f7ea981b8ed9,2021-11-08,First Line,"{""external"":""A"",""internal"":""1""}",{},{},true stop_area,b5ec7a62-0b5d-490b-a35c-8017e9b01996,"","",2021-11-09,First Stop Place,"{""external"":""ABC"",""internal"":""123""}",[],{},{},true,false,true line,9d862644-7dea-4a8b-8c0b-b962ce251291,2021-11-09,First Line,"{""external"":""A"",""internal"":""1""}",{},{},true |