Create an offline model
You can use the canvas to assemble and orchestrate business models by dragging elements and setting conditions. This topic describes how to create an offline model.
Prerequisites
The data required for the offline model is available. For more information, see Create a dataset by selecting an existing table and Create a dataset by uploading local data.
The script operators required for the offline model are created. For more information, see Create a script operator.
Procedure
Log on to the Data Resource Platform console.
In the upper-left corner of the page, click the
icon and select Explore.In the top menu bar, click the
icon, select the target workgroup, and click Model Hub.Add a model folder.
In the folder bar, select a folder, click the
icon, enter a folder name in the input box, and press Enter.A message is displayed to indicate that the folder is added. You can view the new folder in the folder bar.
System Folder: If you place a resource in this folder, users with tenant administrator permissions can use the resource. Other users can only view the resource.
Current Workgroup Folder: If you place a resource in this folder, all members of the workgroup can use the resource.
Personal Folder: If you place a resource in this folder, only the current user can use the resource.
(Optional) In the folder bar, select a manually added folder, click the
icon, and add a child folder.
NoteThe system provides the following three isolated folders:
Create an offline model.
In the upper-right corner of the Model Management page, click Create Model.
In the Create Model panel that appears on the right, configure the model parameters.
Parameter
Description
Model Name
A custom model name. There is no character limit.
Model Type
Select Offline Model.
Model Folder
Select a folder to classify the model.
Description
A custom description for the model.
After you complete the configuration, click OK to open the model canvas page.
NoteFor more information about the model canvas, see Introduction to the model canvas.
In the navigation pane on the left, drag the required resources, such as source table imports, uploaded data, system operators, script operators, or model operators, to the canvas. Then, connect the nodes based on your business logic.
NoteRight-click the line that connects two nodes to delete the line.
Hover over a node on the canvas to perform operations such as renaming, copying, or deleting the node.
Double-click a node on the canvas to configure its parameters.
NoteFor more information about how to use system operators, see Operator manual.
Click Model Parameters on the right to configure global parameters for the model. The configured global parameters can be referenced by expressions in node configurations or in the variable configurations of script operator nodes.
NoteThe name and code of each global parameter must be unique within the same model.
In the model parameter management window, you can perform operations such as creating, editing, and deleting model parameters.
A model can reference system parameters. The values of system parameters are dynamically generated by the platform at runtime.
When you debug and run a model or create a scheduling task, if the model has custom parameters, you must specify their runtime values.
After you complete the configuration, click Save Model in the upper-right corner of the canvas.
In the upper-right corner of the canvas, click Run. In the panel that appears, select a data source and click Run.
Click Publish Version. In the dialog box that appears, click OK.
A "Published successfully" message confirms the successful creation of the model.
Related operations
Operation |
Description |
Edit a model |
In the model list, find the model that you want to edit and click Edit in the Actions column. On the model canvas page, edit the model.
Note
You can edit only unpublished models. |
View a model |
In the model list, find the model that you want to view and click View in the Actions column. In the panel that appears on the right, view the basic information of the model. In the panel, click View Model to go to the model canvas page and view the model details.
Note
You can view only published models. |
Create a task |
In the model list, find the model and click Create Task in the Actions column to create a scheduling task from the model. For more information, see Create a scheduling task.
Note
You can create scheduling tasks only from published models. |
Copy a model |
In the Actions column of the model list, choose More > Copy. Enter a model name and click OK. |
Export a model |
You can export models from the current workgroup to your local computer. This lets you reuse them in other workgroups and helps you quickly initialize data governance tasks.
|
Import a model |
You can import exported models into other workgroups for reuse. In the lower-left corner of the Model Management page, choose Batch Operations > Batch Import. In the Batch Import panel, set a folder, upload the model file, and click Next. |