User Defined Attributes

User-Defined Attributes (UDAs) are used to add additional custom information to the tables of TDE DB.

Adding a UDA to a TDE table is conceptually similar to add a field, except that the data is not stored into a new column but is contained in a suitable JSON field with the name metadata.

For example, in the table tsys you can add an UDA in the field tsys.metadata.

Some tables support double-type UDAs only (generally because they are used in cost functions).

In other tablesypu can find other types.

TDE tables supporting UDAs and associated data types are listed here:

Table Double Int32 Boolean String

tsys

x

x

x

x

pref

x

x

x

x

mnod

x

x

x

x

zone

x

x

x

x

link

x

 

 

 

turn

x

 

 

 

snod

x

x

x

x

stur

x

 

 

 

tstp

x

x

x

x

line

x

x

x

x

line_route

x

x

x

x

stop_area

x

x

x

x

The DB layer UDAS contains all the listed tables and the additional table udas.

The table udas contains the information associated to all UDAs stored in Optima.

The main fields are:

Example

What does it mean?

In the table link, you define a custom parameter named CustomParam_001, of type integer, with default value 23.

In the column link.metadata, you can define a JSON object like:

{"CustomParam_001":"3"}

A specific software procedure that needs to use this UDA, find the parameter set to 3; if this value is not present in the JSON object, the considered default value is 23, as specified in udas.default.

Topics in this section