Product Features
Digital Twins
Create and Import Models
22 min
you can create digital twins models by navigating to digital twins > models see docid\ dyhyentln2q96plg7lgbp to review how to leverage digital twins step 1 create model you have two options for creating the model you can create a new model or import a model as a json file create a new model to create a new model navigate to digital twins the models pane appears from the models pane, click the create a model tile the create a model dialog box appears click the type drop down list and select select model type enter the name of the model in the name field (optional) enter a short description of the model in the description field click add a new model tile appears in the models pane import an existing model you can import a model as a json file to import an existing model, click the import model icon, select the \<model name> json file, and click open model versions after creating the model, it is tagged as version 1, and any changes to the model update the model version implement model updates to instances if there are changes to the model that need to be implemented in associated instances, click upgrade instances then, select the instances to upgrade and click upgrade step 2 configure model after creating the model, you can configure it appropriately for instances note you have the option to update models with instances and select which instances to update as well if an instance is updated based on changes made to the model, then it will be automatically disabled you will need to manually enable the instance after updating it click the model tile (grid view) or model name (table view) to view the model details model image click the upload image icon to select an image for the model the image will display for the model tile on the models pane static attributes manage the metadata for the model from the static attributes tab manually add static attributes to add static attributes click the model tile (grid view) or model name (table view) to open the model details from the static attributes tab, click the add item icon in the attribute name field, either select an item from the drop down list or enter a custom attribute name in the attribute value field, enter a value for the model when done adding attributes, click save model if you need to filter existing attributes, you can use the search field import static attributes to import static attributes, create a csv file with the following headers modelname instancename key value after creating the file, click the model tile, navigate to static attributes , and click the import attributes icon export static attributes to export a csv file of existing static attributes, click the export attributes icon transformations use the transformation tab to transform the data collected in instances by converting raw json data to a desired format by defining the json based schema you can define schema ids, which can be used to manipulate the payload and define a structure for the payload as the model inherits data see docid\ dyhyentln2q96plg7lgbp to review how to format transformations note if you update a transformation and remove all elements from the schema, the entire nats message will be included in any dynamic attribute that have the transformation selected for the schema id arrays you can configure arrays in transformations for example { "key" \[ "$timestamp", "$value", "$metadata", { "key2" "$timestamp", "key3" "$value", "key4" "$metadata" } ], "key5 new" "$timestamp" } configure transformations to add a transformation schema click the model tile (grid view) or model name (table view) to open the model details click the transformation tab click the add a schem a icon the add dialog box appears enter a name for the schema in the code window, copy and paste the json based schema click add when done adding attributes, click save model to edit or delete a schema, click the action menu for the schema and select an option dynamic attributes manage variable data in the model from the dynamic attributes tab you have the option of adding a schema id, which can be used to map dynamic attributes one to one for data transformation note you can create up to 2000 dynamic attributes to add a dynamic attribute click the add item icon in the name field, enter a name for the attribute (optional) enter values for unit and datatype (optional) if you've created data transformation schemas, select one from the schemaid field if you need to filter existing attributes, you can use the search field import dynamic attributes to import dynamic attributes, create a csv file with the following headers modelname instancename (optional) topic (optional) name (optional) unit (optional) datatype (optional) schemaid (optional) after creating the file, click the model tile, navigate to dynamic attributes , and click the import attributes icon export dynamic attributes to export a csv file of existing dynamic attributes, click the export attributes icon hierarchy use the hierarchy tab to create a custom data structure for the model to create a category for the hierarchy, click the action menu icon for root and select add node to add attributes to the hierarchy, do one of the following drag and drop attributes from the left hand list to the canvas under the appropriate category click the action menu for a category and select add item to node then, select the attribute to add when done configuring the hierarchy, click save model rename nodes to rename nodes and attributes added to nodes, click the rename node and rename item icons import hierarchies to import a csv file of a hierarchy, create a csv file with the following headers id modelid position enter the position of the attribute in the hierarchy parentid if the attribute is under a node/category, enter the parentid of the node to get the parentid, create a new node, export the hierarchy, and then refer to the parentid column name the name of the attribute isfolder if it is an attribute, the value is false if it is a node, the value is true attributeid attributetype export hierarchies to export a csv file of an existing hierarchy, click the export hierarchy icon