Skip to content

Model Definition

Manifest path: $.models[*]

You can think of a model as a MySQL table, an Elasticsearch Index, etc.

A model definition needs to specify details about attributes of the model, protocol specific properties for the model, and some additional information.

Example

Model Definition example
{
  "records": 100,
  "persistence": "FULL",
  "datastore": "a_datastore",
  "properties": {
      "tableName": "anoter_model_tbl"
  },
  "attributes": {
      // attribute definitions //
  }
}

Fields

  • attributes (object) [required]

    Manifest path: $.models[*].attributes

    Each model will generally have a set of attributes associated with it.

    Please view Attributes for further details.

  • persistence (string)

    Manifest path: $.models[*].persistence

    Dore allows you to specify various persistence levels for models.

    Please view Model Persistence for details.

  • datastore (string)

    Manifest path: $.models[*].datastore

    Datastore ID of the datastore associated with the model. This is a required field in cases of models that have FULL persistence levels.

  • records (integer)

    Manifest path: $.models[*].records

    Specify count of records to be generated for the model.

    Note: The actual count may vary

    The actual number of records that Dore generates for a model will depend on the value provided here as well as the --scale-factor value provided during invocation.

    For example, if a model has records as 10000, and we provide a --scale-factor value of 0.1 when invoking Dore, the actual number of records generated by Dore will be 10000 * 0.1 = 1000.

  • properties (object)

    Manifest path: $.models[*].properties

    This config is used to specify protocol specific properties for the model.

    Protocol specific properties of a model are required only when there is a need to persist the model and its records in any datastore. That is, the model is linked to a datastore and persistence on the model is set to "FULL" or is not explicitly mentioned in the manifest (as the Dore assumes the default persistence as "FULL" if it is not specified).

    Since each protocol has different requirements for configuring a model, this config varies from one protocol to the other. Please refer the protocol specific sections below for details: