Manage Logical Models
| This feature is available only in Enterprise Edition. |
Manage logical models in script by using the :logicalmodel or equivalent :lm command. See Create a Logical Model for information about logical models in the User Portal.
Optional parameters should be provided in a key-value pair with a preceding double-hyphen (--). For example: --organizationid organization0.
|
List Model Attributes
The list-columns action lists the attributes of a model. Note: You must first connect to a repository. See Connect to a Repository.
Parameters
- datasource
-
Data source for which to list views
- physicalmodel
-
Physical view for logical model
- logicalmodel
-
Logical model wor which to list attributes
- parentmodel
-
Base logical model for an extended model. (See Extend a Logical Model for more information about extended models.) (optional)
- connection
-
Connection for multi-tenant environment. (See Enable Multi-Tenancy.) (optional)
- organizationid
-
Organization ID for multi-tenant environment. (See Enable Multi-Tenancy.) (optional)
List Available Logical Models
The list-models action lists the available logical models. Note: You must first connect to a repository. See Connect to a Repository.
Parameters
- datasource
-
Data source for which to list logical model (optional)
- physicalmodel
-
Physical view for which to list extended physical views (optional)
- logicalmodel
-
Logical model to list (optional)
- organizationid
-
Organization ID for multi-tenant environment. (See Enable Multi-Tenancy.) (optional)
Examples
// List all logical models in environment
:lm list-models
// List logical model named Order Model
:lm list-models 'Order Model'
// List all logical models in organization0
:lm list-models --organizationid=organization0
// List extended views for physical view pv_org1 in organization1
:pm list-models --physicalmodel=pv_org1 --organizationid organization1
// List logical models for Orders data source
:lm list-models 'Examples/Orders'
// List logical models for Order View physical view on Orders data source
:lm list-models 'Examples/Orders' 'Order View'
// List logical models for default connection of Order View physical view on Orders data source
:lm list-models 'Examples/Orders' 'Order View' '(Default Connection)'
Get Logical Model
The get-model action returns a handle to the logical model. Note: You must first connect to a repository. See Connect to a Repository.
Parameters
- datasource
-
The datasource name for logical model
- physicalmodel
-
Physical view for on which logical model is based (optional)
- logicalmodel
-
Logical model to get (optional)
- parentmodel
-
Base logical model for an extended model. (See Extend a Logical Model for more information about extended models.) (optional)
- organizationid
-
Organization ID for multi-tenant environment. (See Enable Multi-Tenancy.) (optional)
Examples
// Get a handle to Order Model, defined on physical view Order View for Orders data source
:lm get-model 'Examples/Orders' 'Order View' 'Order Model'
// Get extended model for base model lm for organization0
:lm get-model 'Oracle' 'pv' '(Default Connection)' --parentmodel lm --organizationid organization0
Create Logical Model
The create-model action creates a physical view. Note: You must first connect to a repository. See Connect to a Repository.
Parameters
- datasource
-
Data source on which new logical model should be defined
- physicalmodel
-
Physical view on which logical model is based (optional)
- model
-
Name of logical model
- parentModel
-
Name of base logical model that is being extended.
- folder
-
Folder to contain logical model (optional)
- description
-
Description for logical model (optional)
- organizationid
-
Organization ID for multi-tenant environment. (See Enable Multi-Tenancy.) (optional)
Examples
import inetsoft.shell.dsl.LogicalModelBuilder
def model= new LogicalModelBuilder().with {
name("(Default Connection)")
physicalModel("Order View")
parent("lm")
connection(null)
description("des")
logicalModel
}
// Create new logical model named Default Connection extending base model lm
:lm create-model "Examples/Orders" "Order View" model --parentmodel "lm"
Rename Logical Model
The rename-model action renames a logical model. Note: You must first connect to a repository. See Connect to a Repository.
Parameters
- datasource
-
Data source on which logical model is defined
- oldname
-
Name of logical model
- newname
-
New name of logical model
- folder
-
Folder to contain logical model (optional)
- description
-
Description for logical mmodel (optional)
- organizationid
-
Organization ID for multi-tenant environment. (See Enable Multi-Tenancy.) (optional)
Update Logical Model
The update-model action changes properties the logical model. Note: You must first connect to a repository. See Connect to a Repository.
Parameters
- datasource
-
Data source on which logical model is defined
- name
-
Name of logical model
- model
-
New name of logical model
- folder
-
Folder to contain logical model (optional)
- parentmodel
-
Name of for base logical model (optional)
- organizationid
-
Organization ID for multi-tenant environment. (See Enable Multi-Tenancy.) (optional)
Remove Logical Model
The remove-model action deletes a physical view. Note: You must first connect to a repository. See Connect to a Repository.
Parameters
- datasource
-
Data source on which physical view is defined
- logicalmodel
-
Name of physical view
- folder
-
Folder containing physical view (optional)
- parentModel
-
Name of base physical view for extended physical view. (optional)
- organizationid
-
Organization ID for multi-tenant environment. (See Enable Multi-Tenancy.) (optional)