Product Features
Digital Twins
Create and Import Models
28 min
notes the digital twins feature is available for litmus edge version 3 3 1 and later to access the digital twins feature, you need a scale or growth litmus license you can create digital twins models by navigating to digital twins > models see use digital twins to contextualize data docid\ qtojjkm sj2wj4jlqv ku 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 a 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 note this feature is available for litmus edge version 3 11 0 and later when you create a model, the model version starts at v 0 when you make changes to the model, the version number is updated for litmus edge version 3 11 0 and later, the version number is displayed in the model tile for litmus edge version 3 11 1 and later, the version number is also displayed in the model and instance configuration 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 important for litmus edge version 3 5 6 and earlier, no changes are allowed to a model after creating an instance for the model for litmus edge version 3 11 0 and later, you have the option to update models with instances and select which instances to update as well 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 supported file types include jpeg and png static attributes manage the metadata for the model from the static attributes tab notes for litmus edge versions 3 3 1 to 3 5 6, there is a limit of 100 static attributes for versions 3 11 0 and later, the limit is 2000 the ability to export and import dynamic attributes is available for litmus edge version 3 11 0 and later 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 for litmus edge versions 3 5 6 and earlier, save individual attributes by clicking the save icon in each attribute row if you need to filter existing attributes, you can use the search field import static attributes to import static attributes (litmus edge version 3 11 0 and later), create a csv file with the following headers required headers modelname key value optional headers instancename 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 (litmus edge version 3 11 0 and later), 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 use digital twins to contextualize data docid\ qtojjkm sj2wj4jlqv ku 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 has the transformation selected for the schema id arrays as of litmus edge version 3 11 3, 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 schema 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 for litmus edge versions 3 5 6 and earlier, transformations are automatically saved 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 notes for litmus edge versions 3 3 1 to 3 5 6, there is a limit of 100 dynamic attributes for versions 3 11 0 and later, the limit is 2000 the ability to export and import dynamic attributes is available for litmus edge version 3 11 0 and later manually add 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 for litmus edge version 3 11 0 and later, you have the option of selecting the data type from the drop down menu (optional) if you've created data transformation schemas, select one from the schemaid field when done adding attributes, click save model for litmus edge versions 3 5 6 and earlier, save individual attributes by clicking the save icon in each attribute row if you need to filter existing attributes, you can use the search field import dynamic attributes to import dynamic attributes (litmus edge version 3 11 0 and later), create a csv file with the following headers required headers modelname schemaid optional headers instancename topic name unit datatype 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 (litmus edge version 3 11 0 and later), click the export attributes icon hierarchy use the hierarchy tab to create a custom data structure for the model notes the save button is available for litmus edge version 3 5 2 and later the ability to rename nodes/items and import/export hierarchies is available for litmus edge version 3 11 0 and later clicking the save model button will increment the version number, even if no changes are made 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 for litmus edge versions 3 5 6 and earlier, click the save icon rename nodes to rename nodes and attributes added to nodes (for litmus edge version 3 11 0 and later), click the rename node and rename item icons import hierarchies to import a csv file of a hierarchy (litmus edge version 3 11 0 and later), 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 (litmus edge version 3 11 0 and later), click the export hierarchy icon