Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

The Ara Import file can be used to feed a Ara SaaS referential via the Ara Import API.

Table of Contents

File structure

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.

Special syntax items

  • Comments are

...

  • #

...

  • .

  • Separators are

...

  • ,

...

  • Leading spaces are trimed

  • Quotes are escaped with another quote ex:

...

  • [""1234"",""5678""]

...

General constraints

All uuids must respect the postgresql uuid data type constraints.

...

For all models, only the Type, Id, and ModelName attributes must be present. Other attributes can be left empty.

Operator

...

Attribute

Format

Type

operator

Id

UUID

ModelName

YYYY-MM-DD

Name

String

ObjectIDs

Hash

Example

Code Block
breakoutModewide
operator,a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a11,2017-01-01,Name,{"objectidKind":"operatorObjectid"}

Stop Area

Attribute

Format

Type

operator

stop_area

Id

UUID

ParentId

UUID

ReferentId

UUID

ModelName

YYYY-MM-DD

Name

String

ObjectIDs

Hash

LineIds

Array of UUID

Attributes

Hash

Stop Area

...

References

Hash

CollectedAlways

boolean

CollectChildren

boolean

CollectGeneralMessages

boolean

Example

Code Block
breakoutModewide
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

Lines

Attribute

Format

Type

stop_area

line

Id

UUID

ParentId

UUID

ReferentId

UUID

ModelName

YYYY-MM-DD

Name

String

ObjectIDs

Hash

LineIds

Array of UUID

Attributes

Hash

References

Hash

CollectedAlways

CollectGeneralMessages

boolean

CollectChildren

Example

...

Code Block

...

breakoutMode

...

boolean

...

wide

...

line,f0eebc99-9c0b-4ef8-bb6d-6bb9bd380a11,2017-01-01,Name,{"objectidKind":"lineObjectid"},"{""AttributeKey"":""abcd""}","{""ReferenceType"":{""ObjectId"":{""objectidKind"":""5678""},""Id"":""42""}}",true

Vehicle Journeys

Attribute

Format

Type

line

vehicle_journey

Id

UUID

ModelName

YYYY-MM-DD

Name

String

ObjectIDs

Hash

LineId

UUID

OriginName

String

DestinationName

String

Attributes

Hash

References

Hash

Example

...

Code Block

...

breakoutMode

...

wide

...

 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""}}"

Stop Visits

A stop visit schedule is a hash with the following keys:

Attribute

Format

Type

vehicle_journey

Id

UUID

ModelName

YYYY-MM-DD

Name

ObjectIDs

String

Hash

ObjectIDs

StopAreaId

Hash

UUID

LineId

VehicleJourneyId

UUID

OriginName

PassageOrder

String

Int

DestinationName

Schedules

String

Array of Hash

Attributes

Hash

References

Hash

Stop Visits

...

Example

Code Block
breakoutModewide
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""}}"

...

A stop visit schedule is a hash with the following keys:

...

Attribute

...

Format

...

Type

...

vehicle_journey

...

Id

...

UUID

...

ModelName

...

YYYY-MM-DD

...

ObjectIDs

...

Hash

...

StopAreaId

...

UUID

...

VehicleJourneyId

...

UUID

...

PassageOrder

...

Int

...

Schedules

...

Array of Hash

...

Attributes

...

Hash

...

References

...

Example

This file defines a Stop Area and a Line for two days:

Code Block
breakoutModewide
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