Types versioning

This guide describes how to create a new type version for an existing Type in Manufacturing Data Engine (MDE).

Before you begin

Before you begin creating a new type version for an existing type, you need to create a type.

Versioning restrictions

When creating new versions of a type, consider the following limitations:

New versions may:

  • Add new optional fields to the data schema.
  • Mark a required field optional in the data schema.
  • Add new metadata bucket references.

New versions may not:

  • Remove fields from the data schema.
  • Change data type of existing fields in the data schema.
  • Mark an an optional attribute required in the data schema.
  • Remove metadata bucket references.

Create a new type version

You can create a new type version that associates a new metadata bucket to an existing type that already has an existing metadata bucket association and applies typical storage specifications using the API or the Console.

REST

Execute the following REST API request:

POST /configuration/v1/types/TYPE_NAME/versions

{
  "metadataBuckets": [
    {
      "bucketName": "EXISTING_BUCKET_NAME",
      "version": "EXISTING_BUCKET_VERSION"
    },
    {
      "bucketName": "NEW_BUCKET_NAME",
      "version": "NEW_BUCKET_VERSION"
    }
  ],
  "storageSpecs": [
    {
      "sink": "BIG_QUERY",
      "disabled": "false",
      "materializeCloudMetadata": "true"
    },
    {
      "sink": "BIG_TABLE",
      "disabled": "false",
      "materializeCloudMetadata": "false"
    },
    {
      "sink": "GCS",
      "disabled": "false",
      "materializeCloudMetadata": "false"
    },
    {
      "sink": "PUBSUB_PROTO",
      "disabled": "false",
      "materializeCloudMetadata": "false"
    },
    {
      "sink": "PUBSUB_JSON",
      "disabled": "false",
      "materializeCloudMetadata": "false"
    }
  ]
}

Replace the following:

  • TYPE_NAME: the name of the type for which a new version is created
  • EXISTING_BUCKET_NAME: name of the existing bucket already associated to this type
  • EXISTING_BUCKET_VERSION: the version of the existing bucket already associated to this type
  • NEW_BUCKET_NAME: name of the new bucket
  • NEW_BUCKET_VERSION: the version of the new bucket

Console

  1. To create a new Type Version using the Console open the 'Types' section Tab.

    Types section - list of Types

  2. All available Types in the MDE instance are listed in this section. The list exposes the basic configuration of each Type, including:

  • Name: unique name of the Type. All Types must have different unique names.
  • Storage: displays the current Storage Specs associated to the Type.
  • Archetype: show the name of the Archetype defining the Type. Each Type is associated to a unique Archetype. The Archetype association can't be modified after the type is created.
  • Version: the version number of the Type. A Type can be versioned. The default view in this list only displays the latest version available for the Type. It is possible to show earlier versions by un-checking the 'Show Latest' check-box.
  • Metadata: renders a color-coded badge for each Metadata Bucket associated to the Type. Tag Metadata Buckets are differentiated from Record Metadata Buckets using a specific icon inside the badge.
    • Transformations: displays a badge for each transformation type associated to the Type.
  • Enabled: displays a true value if the Type is enabled and a false value if it is not. Users can enable or disable Types at any time.
  • Active: when Types are created take a certain time to provision. While Types are being provisioned, their active status is false. When they are ready they show as true.
  1. To create a new Type Version in this UI, click 'Actions' Icon and select the option 'Create New Version'. The following form will appear:

    Types section - list of Types

  2. The 'Create New Type Version' opens displaying a form where to modify the setting of the selected Type:

    Types section - list of Types

The top section of the form displays the name and Archetype of the Type. Those attributes can't me modified. Only changing the Metadata Specification or modifying the Data Schema will trigger a new Type Version. Modifying the rest of the Type parameters will update the Type but won't require a new version.

Both Metadata Specification and Data Schema can be modified by adding new elements. However all new Type versions need to be backward compatible. It isn't possible to remove Metadata Buckets to create a new version of the Type. It is possible to add new Metadata Buckets by opening the 'Metadata Bucket' section.