Element Unify

Element Unify is a platform for data governance. It defines templates which can be imported as Models, and graphs which can be imported as Instances. The connector uses the Element Unify REST API.

Connection Settings

URL

Specifies the base URL for the Element Unify. For example, https://app001-aws.elementanalytics.com/

Email

Specifies the email used to login to Element Unify.

Password

Specifies the password used to login to Element Unify.

Org ID

Specifies the organization ID to access. This can be taken from the URL when logging into Element Unify via the browser. For example, in this url https://app001-aws.elementanalytics.com/?#/org/358/pipelines 358 is the Org ID

Input Settings

Below are the configuration options for inputs.

Read Type

Used to specify Element unify input type.

Template

The Template type reads all templates defined for the Org. The template definitions are returned in JSON format.

Graph

The Graph type queries an Element Unify graph. Graphs must be created in Element Unify by the user and are queried by name and a graph query. The read always queries the latest version of the graph. The name is the name of the graph as seen in the Element Unify UI. Below are examples of Graph Queries.

This graph query returns all Regions that have Sites that have Areas, etc, ultimately retuning the Motors and their OPC Tag mappings. See below for more details on graph requirements for importing Instances.

graphql
{
  Region {
    Site {
      Area {
        Line {
          Conveyor {
            Motor {
              OPCTag
            }
          }
        }
      }
    }
  }
}

Importing Templates as Models

See model imports for importing models from templates. This section describes requirements around the template format. The JSON example provided below can be copy/pasted into the importer for testing. The template example below includes Area, Line, Zone, and Cell models.

Importing this template as Model uses the following fields.

  • template.name is the name of the Model. This is sanitized to meet internal naming requirements
  • template.description is the Model description (optional)
  • template.attributes is iterated to add attributes to the model
    • name is the name of the attribute. This is sanitized to meet internal naming requirements
    • If type.templateUuid is present, this is treated as a child model. The uuid must link to another template.uuid in the import. If it does, the attribute is created with a data type of the child model. Otherwise, `type.primitiveType`` is used to set the attribute’s data type. Supported attribute data types include boolean, doubles, strings, and integers.
json
{
  "templates": [{
    "template": {
      "id": 8980,
      "organizationId": 358,
      "name": "Zone",
      "sanitizedName": "Zone",
      "description": "null",
      "standardId": "null",
      "version": 0,
      "baseTemplateId": "null",
      "uuid": "acc15283-ea2a-11ed-a666-9b5c27cc6e53"
    },
    "attributes": [{
      "id": 98255,
      "templateId": 8980,
      "name": "hasCell",
      "sanitizedName": "hasCell",
      "description": "null",
      "dataType": {
        "value": "String",
        "display": "String"
      },
      "interpolationMethod": {
        "value": "Linear",
        "display": "Linear"
      },
      "attributeType": {
        "value": "continuousValue",
        "display": "Continuous Value"
      },
      "uom": "null",
      "isImportant": false,
      "isDisabled": false,
      "formula": "null",
      "uuid": "c300aa57-ea2a-11ed-a666-7ddfe4e58272",
      "type": {
        "templateUuid": "f80cc779-e9b6-11ed-a666-d133b6c28364"
      },
      "updated": "2023-05-04T03:21:29.0000000Z",
      "updatedBy": 1,
      "overridingAttribute": false,
      "multiplicity": "null"
    },
      {
        "id": 98256,
        "templateId": 8980,
        "name": "hasLine",
        "sanitizedName": "hasLine",
        "description": "null",
        "dataType": {
          "value": "String",
          "display": "String"
        },
        "interpolationMethod": {
          "value": "Linear",
          "display": "Linear"
        },
        "attributeType": {
          "value": "continuousValue",
          "display": "Continuous Value"
        },
        "uom": "null",
        "isImportant": false,
        "isDisabled": false,
        "formula": "null",
        "uuid": "de1dbc69-ea2a-11ed-a666-652322462c77",
        "type": {
          "templateUuid": "a82e4e7e-e9b6-11ed-a666-915b700c8306"
        },
        "updated": "2023-05-04T03:36:01.0000000Z",
        "updatedBy": 1,
        "metadataCollection": [{
          "id": 127584,
          "key": "unify:inverse_of",
          "value": "Line.hasZone"
        },
          {
            "id": 127585,
            "key": "unify:suppress_graph_gen",
            "value": "true"
          }
        ],
        "overridingAttribute": false,
        "multiplicity": "null"
      },
      {
        "id": 98254,
        "templateId": 8980,
        "name": "Name",
        "sanitizedName": "Name",
        "description": "null",
        "dataType": {
          "value": "String",
          "display": "String"
        },
        "interpolationMethod": {
          "value": "Linear",
          "display": "Linear"
        },
        "attributeType": {
          "value": "static",
          "display": "Static"
        },
        "uom": "null",
        "isImportant": false,
        "isDisabled": false,
        "formula": "null",
        "uuid": "b8346215-ea2a-11ed-a666-75675ceff926",
        "type": {
          "primitiveType": "String"
        },
        "updated": "2023-05-04T03:21:11.0000000Z",
        "updatedBy": 1,
        "overridingAttribute": false,
        "multiplicity": "null"
      }
    ]
  },
    {
      "template": {
        "id": 8951,
        "organizationId": 358,
        "name": "Line",
        "sanitizedName": "Line",
        "description": "null",
        "standardId": "null",
        "version": 0,
        "baseTemplateId": "null",
        "uuid": "a82e4e7e-e9b6-11ed-a666-915b700c8306"
      },
      "attributes": [{
        "id": 98215,
        "templateId": 8951,
        "name": "hasArea",
        "sanitizedName": "hasArea",
        "description": "null",
        "dataType": {
          "value": "String",
          "display": "String"
        },
        "interpolationMethod": {
          "value": "Linear",
          "display": "Linear"
        },
        "attributeType": {
          "value": "continuousValue",
          "display": "Continuous Value"
        },
        "uom": "null",
        "isImportant": false,
        "isDisabled": false,
        "formula": "null",
        "uuid": "98364721-e9c0-11ed-a666-496af5fe44d7",
        "type": {
          "templateUuid": "2e1a1d8d-ea2b-11ed-a666-45d160d3d178"
        },
        "updated": "2023-05-04T04:00:23.0000000Z",
        "updatedBy": 1,
        "metadataCollection": [{
          "id": 127576,
          "key": "unify:inverse_of",
          "value": "Area.hasLine"
        },
          {
            "id": 127577,
            "key": "unify:suppress_graph_gen",
            "value": "true"
          }
        ],
        "overridingAttribute": false,
        "multiplicity": "null"
      },
        {
          "id": 98216,
          "templateId": 8951,
          "name": "hasZone",
          "sanitizedName": "hasZone",
          "description": "null",
          "dataType": {
            "value": "String",
            "display": "String"
          },
          "interpolationMethod": {
            "value": "Linear",
            "display": "Linear"
          },
          "attributeType": {
            "value": "continuousValue",
            "display": "Continuous Value"
          },
          "uom": "null",
          "isImportant": false,
          "isDisabled": false,
          "formula": "null",
          "uuid": "9fe5bf03-e9c0-11ed-a666-c3b38a8ae030",
          "type": {
            "templateUuid": "acc15283-ea2a-11ed-a666-9b5c27cc6e53"
          },
          "updated": "2023-05-04T03:24:14.0000000Z",
          "updatedBy": 1,
          "overridingAttribute": false,
          "multiplicity": "null"
        },
        {
          "id": 98175,
          "templateId": 8951,
          "name": "Name",
          "sanitizedName": "Name",
          "description": "null",
          "dataType": {
            "value": "String",
            "display": "String"
          },
          "interpolationMethod": {
            "value": "Linear",
            "display": "Linear"
          },
          "attributeType": {
            "value": "static",
            "display": "Static"
          },
          "uom": "null",
          "isImportant": false,
          "isDisabled": false,
          "formula": "null",
          "uuid": "b7c62890-e9b6-11ed-a666-6b7f5d74628e",
          "type": {
            "primitiveType": "String"
          },
          "updated": "2023-05-03T13:49:37.0000000Z",
          "updatedBy": 1,
          "overridingAttribute": false,
          "multiplicity": "null"
        }
      ]
    },
    {
      "template": {
        "id": 8981,
        "organizationId": 358,
        "name": "Area",
        "sanitizedName": "Area",
        "description": "null",
        "standardId": "null",
        "version": 0,
        "baseTemplateId": "null",
        "uuid": "2e1a1d8d-ea2b-11ed-a666-45d160d3d178"
      },
      "attributes": [{
        "id": 98258,
        "templateId": 8981,
        "name": "hasLine",
        "sanitizedName": "hasLine",
        "description": "null",
        "dataType": {
          "value": "String",
          "display": "String"
        },
        "interpolationMethod": {
          "value": "Linear",
          "display": "Linear"
        },
        "attributeType": {
          "value": "continuousValue",
          "display": "Continuous Value"
        },
        "uom": "null",
        "isImportant": false,
        "isDisabled": false,
        "formula": "null",
        "uuid": "410d57a1-ea2b-11ed-a666-13e646230448",
        "type": {
          "templateUuid": "a82e4e7e-e9b6-11ed-a666-915b700c8306"
        },
        "updated": "2023-05-04T03:25:01.0000000Z",
        "updatedBy": 1,
        "overridingAttribute": false,
        "multiplicity": "null"
      },
        {
          "id": 98257,
          "templateId": 8981,
          "name": "Name",
          "sanitizedName": "Name",
          "description": "null",
          "dataType": {
            "value": "String",
            "display": "String"
          },
          "interpolationMethod": {
            "value": "Linear",
            "display": "Linear"
          },
          "attributeType": {
            "value": "static",
            "display": "Static"
          },
          "uom": "null",
          "isImportant": false,
          "isDisabled": false,
          "formula": "null",
          "uuid": "3793a70f-ea2b-11ed-a666-0f8151c45338",
          "type": {
            "primitiveType": "String"
          },
          "updated": "2023-05-04T03:24:45.0000000Z",
          "updatedBy": 1,
          "overridingAttribute": false,
          "multiplicity": "null"
        }
      ]
    },
    {
      "template": {
        "id": 8956,
        "organizationId": 358,
        "name": "Cell",
        "sanitizedName": "Cell",
        "description": "null",
        "standardId": "null",
        "version": 0,
        "baseTemplateId": "null",
        "uuid": "f80cc779-e9b6-11ed-a666-d133b6c28364"
      },
      "attributes": [{
        "id": 98240,
        "templateId": 8956,
        "name": "Active Shift",
        "sanitizedName": "Active_Shift",
        "description": "null",
        "dataType": {
          "value": "String",
          "display": "String"
        },
        "interpolationMethod": {
          "value": "Linear",
          "display": "Linear"
        },
        "attributeType": {
          "value": "continuousValue",
          "display": "Continuous Value"
        },
        "uom": "null",
        "isImportant": false,
        "isDisabled": false,
        "formula": "null",
        "uuid": "6f6a6e2c-e9e2-11ed-a666-c18e675bb16e",
        "type": {
          "primitiveType": "String"
        },
        "updated": "2023-05-03T20:25:06.0000000Z",
        "updatedBy": 1,
        "overridingAttribute": false,
        "multiplicity": "null"
      },
        {
          "id": 98239,
          "templateId": 8956,
          "name": "Fault Code",
          "sanitizedName": "Fault_Code",
          "description": "null",
          "dataType": {
            "value": "String",
            "display": "String"
          },
          "interpolationMethod": {
            "value": "Linear",
            "display": "Linear"
          },
          "attributeType": {
            "value": "continuousValue",
            "display": "Continuous Value"
          },
          "uom": "null",
          "isImportant": false,
          "isDisabled": false,
          "formula": "null",
          "uuid": "679b876a-e9e2-11ed-a666-8bcd8f7336b5",
          "type": {
            "primitiveType": "String"
          },
          "updated": "2023-05-03T20:25:11.0000000Z",
          "updatedBy": 1,
          "overridingAttribute": false,
          "multiplicity": "null"
        },
        {
          "id": 98238,
          "templateId": 8956,
          "name": "Fault State",
          "sanitizedName": "Fault_State",
          "description": "null",
          "dataType": {
            "value": "String",
            "display": "String"
          },
          "interpolationMethod": {
            "value": "Linear",
            "display": "Linear"
          },
          "attributeType": {
            "value": "continuousValue",
            "display": "Continuous Value"
          },
          "uom": "null",
          "isImportant": false,
          "isDisabled": false,
          "formula": "null",
          "uuid": "35982f28-e9e2-11ed-a666-b7bdacf66e67",
          "type": {
            "primitiveType": "String"
          },
          "updated": "2023-05-03T20:25:15.0000000Z",
          "updatedBy": 1,
          "overridingAttribute": false,
          "multiplicity": "null"
        },
        {
          "id": 98236,
          "templateId": 8956,
          "name": "Good Count",
          "sanitizedName": "Good_Count",
          "description": "null",
          "dataType": {
            "value": "String",
            "display": "String"
          },
          "interpolationMethod": {
            "value": "Linear",
            "display": "Linear"
          },
          "attributeType": {
            "value": "continuousValue",
            "display": "Continuous Value"
          },
          "uom": "null",
          "isImportant": false,
          "isDisabled": false,
          "formula": "null",
          "uuid": "26e780c4-e9e2-11ed-a666-3530461cc848",
          "type": {
            "primitiveType": "String"
          },
          "updated": "2023-05-03T20:25:21.0000000Z",
          "updatedBy": 1,
          "overridingAttribute": false,
          "multiplicity": "null"
        },
        {
          "id": 98253,
          "templateId": 8956,
          "name": "hasTag",
          "sanitizedName": "hasTag",
          "description": "null",
          "dataType": {
            "value": "String",
            "display": "String"
          },
          "interpolationMethod": {
            "value": "Linear",
            "display": "Linear"
          },
          "attributeType": {
            "value": "continuousValue",
            "display": "Continuous Value"
          },
          "uom": "null",
          "isImportant": false,
          "isDisabled": false,
          "formula": "null",
          "uuid": "678d9021-ea2a-11ed-a666-739019ded6bf",
          "type": {
            "primitiveType": "String"
          },
          "updated": "2023-05-04T03:18:56.0000000Z",
          "updatedBy": 1,
          "overridingAttribute": false,
          "multiplicity": "null"
        },
        {
          "id": 98232,
          "templateId": 8956,
          "name": "hasZone",
          "sanitizedName": "hasZone",
          "description": "null",
          "dataType": {
            "value": "String",
            "display": "String"
          },
          "interpolationMethod": {
            "value": "Linear",
            "display": "Linear"
          },
          "attributeType": {
            "value": "continuousValue",
            "display": "Continuous Value"
          },
          "uom": "null",
          "isImportant": false,
          "isDisabled": false,
          "formula": "null",
          "uuid": "004af973-e9d6-11ed-a666-71d4082e57d2",
          "type": {
            "templateUuid": "acc15283-ea2a-11ed-a666-9b5c27cc6e53"
          },
          "updated": "2023-05-04T03:22:27.0000000Z",
          "updatedBy": 1,
          "metadataCollection": [{
            "id": 127580,
            "key": "unify:inverse_of",
            "value": "Zone.hasCell"
          },
            {
              "id": 127581,
              "key": "unify:suppress_graph_gen",
              "value": "true"
            }
          ],
          "overridingAttribute": false,
          "multiplicity": "null"
        },
        {
          "id": 98182,
          "templateId": 8956,
          "name": "Name",
          "sanitizedName": "Name",
          "description": "null",
          "dataType": {
            "value": "String",
            "display": "String"
          },
          "interpolationMethod": {
            "value": "Linear",
            "display": "Linear"
          },
          "attributeType": {
            "value": "static",
            "display": "Static"
          },
          "uom": "null",
          "isImportant": false,
          "isDisabled": false,
          "formula": "null",
          "uuid": "ff8d8e3d-e9b6-11ed-a666-9f07173a3ac8",
          "type": {
            "primitiveType": "String"
          },
          "updated": "2023-05-03T13:49:18.0000000Z",
          "updatedBy": 1,
          "overridingAttribute": false,
          "multiplicity": "null"
        },
        {
          "id": 98235,
          "templateId": 8956,
          "name": "Run",
          "sanitizedName": "Run",
          "description": "null",
          "dataType": {
            "value": "String",
            "display": "String"
          },
          "interpolationMethod": {
            "value": "Linear",
            "display": "Linear"
          },
          "attributeType": {
            "value": "continuousValue",
            "display": "Continuous Value"
          },
          "uom": "null",
          "isImportant": false,
          "isDisabled": false,
          "formula": "null",
          "uuid": "1afafb72-e9e2-11ed-a666-993112daac50",
          "type": {
            "primitiveType": "String"
          },
          "updated": "2023-05-03T20:25:25.0000000Z",
          "updatedBy": 1,
          "overridingAttribute": false,
          "multiplicity": "null"
        },
        {
          "id": 98237,
          "templateId": 8956,
          "name": "Total Count",
          "sanitizedName": "Total_Count",
          "description": "null",
          "dataType": {
            "value": "String",
            "display": "String"
          },
          "interpolationMethod": {
            "value": "Linear",
            "display": "Linear"
          },
          "attributeType": {
            "value": "continuousValue",
            "display": "Continuous Value"
          },
          "uom": "null",
          "isImportant": false,
          "isDisabled": false,
          "formula": "null",
          "uuid": "2de64646-e9e2-11ed-a666-f58148d26737",
          "type": {
            "primitiveType": "String"
          },
          "updated": "2023-05-03T20:25:31.0000000Z",
          "updatedBy": 1,
          "overridingAttribute": false,
          "multiplicity": "null"
        }
      ]
    }
  ]
}

Importing Graphs as Instances

See instance imports for importing instances from a graph. This section describes requirements around the graph format. An example JSON payload is provided below that corresponds to the above template import example. This JSON can be copied into the import for testing.

The example graph query to create this payload is {Area{Line{Zone{Cell{OPCTag}}}}}. The JSON includes the hierarchy Area->Line->Zone->Cell. OPCTag is a special template type used by Element Unify to link an instance attribute to an OPCTag path.

The Instances are built from the bottom up. In this case Cell is built first. In the Cell definition, first the dataProperties.template is read and the import checks to see if there is a model with the template name. If there is not, the import fails. The backing model for all instances must be imported before importing the instances. The instance name is taken from the dataProperties.originalId field. In this case it’s C102.

Each key/name in the dataProperties is then checked against the Cell model definition. If there is a match, the instance attribute is filled in with a default value. For example if the Cell model had a Total_Count attribute, the default value for the instance would be AR1/L1/Z1/C102/A011/SA001/System_Total_Run_Time.

Next the relatedEntities are scanned. Anything that is type OPCTag is treated as an OPC tag path. In this case the dataProperties.attributeName, which is Total_Count tells the importer to assign this to the Total_Count attribute of the instance. The dataProperties.opcPath field is the OPC Server tag path. The importer sets the Total_Count attribute expression of the C102 instance to {{Connection.opc.default(path=Tags/NA_COMSIT09766.PV)}}. The user is responsible for creating an OPC connection named opc with an input named default, and an identifier set to {{this.path}} for this reference to resolved when the Instance is read.

All other relatedEntities that are not type OPCTag are treated as child instances references. For example Zone Z1 has a single Cell C102 as a relatedEntity. The Cell 102 dataProperties.relationshipType property tells the importer what attribute in Z1 to assign the child instance to. In this case it’s the hasCell attribute. The hasCell attribute in Z1 is set to {{Instance.C102}}. If Z1 had multiple relatedEntities of type Cell that linked back to the hasCell attribute, the hasCell attribute of Z1 would be set to [{{Instance.C102}}, {{Instance.C103}}].

Note in the below example, Line dataProperties.hasArea points to it’s parent Area AR1. This reference is ignored by the imported because it creates a cyclic reference where Line references an Area and the Area references the Line.

json
[{
  "label": "Area",
  "dataProperties": {
    "Name": "Molding and Conversion",
    "id": "8949:AR1",
    "templateId": "8949",
    "template": "Area",
    "originalId": "AR1"
  },
  "relatedEntities": [{
    "label": "Line",
    "dataProperties": {
      "Name": "Production Line",
      "hasArea": "AR1",
      "id": "8951:L1",
      "templateId": "8951",
      "template": "Line",
      "originalId": "L1"
    },
    "relatedEntities": [{
      "label": "Zone",
      "dataProperties": {
        "Name": "Molding",
        "hasLine": "L1",
        "id": "8953:Z1",
        "templateId": "8953",
        "template": "Zone",
        "originalId": "Z1"
      },
      "relatedEntities": [{
        "label": "Cell",
        "dataProperties": {
          "Fault State": "AR1/L1/Z1/C102/A011/SA001/System_Fault",
          "Total Count": "AR1/L1/Z1/C102/A011/SA001/System_Total_Run_Time",
          "Run": "AR1/L1/Z1/C102/A011/SA001/System_Run",
          "id": "8956:C102",
          "templateId": "8956",
          "template": "Cell",
          "originalId": "C102"
        },
        "relatedEntities": [{
          "label": "OPCTag",
          "additionalLabels": [
            "Tag"
          ],
          "dataProperties": {
            "tagName": "NA_COMSIT09766.PV",
            "source": "OPC",
            "opcPath": "Tags/NA_COMSIT09766.PV",
            "attributeName": "Engine_RPM",
            "id": "9086:C9Tags/NA_COMSIT09766.PV",
            "templateId": "9086",
            "template": "OPCTag",
            "originalId": "C9Tags/NA_COMSIT09766.PV"
          },
          "modelQualityMetrics": "null"
        }],
        "modelQualityMetrics": "null"
      }],
      "modelQualityMetrics": "null"
    }],
    "modelQualityMetrics": "null"
  }],
  "modelQualityMetrics": "null"
}]

Example Graph Queries

The following query filters for an SML_Cell named “CNC” and includes OPCTag relationships for the SMP_Cell and SML_Asset. Note that the quotes are required.

graphql
{
  SMP_Area {
    SMP_Line {
      SMP_Zone {
      SMP_Cell("Cell_Name":"CNC") {
        "OPCTag"
        SMP_Asset {OPCTag}
        }
      }
    }
  }
}