Customisation

Tagged value support

Applicable to Professional edition only.

Customisation options are only available in the Professional edition that requires a license key to be purchased.

The Professional edition supports customisation of the generated Avro schema through Tagged Values.

Tagged values can be used to customise field data types (whether primitive or logical types) and other properties. These properties add Avro-format specific metadata to the model. The reason to use tags is because an Enterprise Architect data model does not support all features of Avro schemas, therefore additional metadata can be provided to enhance the quality of the Avro schema output.

You will be repeatedly add the same tag names (list below in Supported tags section) to many entites and fields in your data model. You can create a predefined list of Avro tag names that you can then select from a drop-down menu every time you want to add a tagged value. The Enterprise Architect Tagged Values guide explains how to set it up.

Watch an exaple of adding tagged value to a data model below. In the video, you can see how to add Avro UUID logical data type to an existing model.

Supported tags

You can either use kebab-case tag names, or simply replace the hyphens with spaces (so for example, avro namespace can be used instead of avro-namespace). This is to align with your existing tag naming conventions. Tag names are also case insensitive, so all these are valid tag names:

  • avro namespace
  • Avro Namespace
  • avro-namespace

and so on.

Tag name Supported values Applicable to Example Documentation
avro-aliases comma separated list of aliases Attributes Aliases
avro-default-value Attributes
avro-field-name Attributes Complex types
avro-field-name-transformation camelcase, kebabcase, snakecase Attributes
avro-field-order ascending, descending, ignore Attributes Sort Order
avro-fixed-type-size Attributes, Entities
avro-logical-type-decimal-precision integer value Attributes, Entities 5 Decimal type
avro-logical-type-decimal-scale integer value Attributes, Entities 3 Decimal type
avro-map-type-value-type Attributes long Map type
avro-namespace dot delimited namespace string Entities org.testing
avro-type record, error, enum, fixed, decimal and primite types Attributes, Entities long , enum Primitive and Logical types

Caveats

Entity not generated in Avro schema.

For top-level types (where none of the attributes of an entity are referenced from another entity) make sure you have no avro-type tag set. This would render the entity as a data type when referenced in an attribute of another entity. But because the entity is not referenced (since it is a top-level type), SchemaGens would not be able to generate a type on its own. Avro data types can only exist as an attribute type within a complex type, such as a Record.