Product Features
Digital Twins

Create and Import Models

28min
note 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\ jfth4hofygqacaimxlodu 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 (optional) if applicable, select the uns enabled checkbox and select a uns connector from the drop down menu 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 when you create a model, the model version starts at v 0 when you save the model, the version number is updated note you can identify models sourced from litmus edge manager with a flag 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 note y ou have the option to update models with instances and select which instances to update as well step 2 configure model after creating the model, you can configure it appropriately for instances 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 note you can create up to 2000 static attributes 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 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, 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\ jfth4hofygqacaimxlodu to review how to format transformations note litmus edge versions 3 16 1 and above use jsonpath and jsonata syntax incorrect syntax will return null values you can see examples of nested keys in use digital twins to contextualize data docid\ jfth4hofygqacaimxlodu 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 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 select from json or jsonata from schema type drop down menu in the code window, copy and paste the json based or jsonata schema (optional) you can use the system variables in the code drawer 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 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 a value for unit and select a data type the skip key option is only available when the data type is set to json (optional) if you've created data transformation schemas, select one from the schemaid field when done adding attributes, click save model if you need to filter existing attributes, you can use the search field import/export dynamic attributes to import dynamic attributes, 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 to export a csv file of existing dynamic attributes, click the export attributes icon note check the sample csv here https //archbee doc uploads s3 amazonaws com/q116wjtar1sefevnvmcf9 v qxvcrithqa yf2hjbmw 20250505 190948 csv schema use the schema tab to create a custom data structure for the model note clicking the save model button will increment the version number, even if no changes are made to create a category for the schema, click the action menu icon for root and select add node to add attributes to the schema, 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 schema, click save model import schemas to import a csv file of a schema, create a csv file with the following headers id modelid position enter the position of the attribute in the schema 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 schema, 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 schemas to export a csv file of an existing schema, click the export schema icon sync attributes to sync the existing schema, click the sync attributes icon all attributes will be appended to the current hierarchy if they exist, the static attributes and dynamic attributes nodes will be recreated if you wish to proceed, then click yes clear schema to clear the schema builder tree, click the clear schema icon the model must be saved for the changes to take effect