x
Wyn Enterprise 3.6 is now available! See what’s new Wyn Enterprise 3.6 is now available! See what’s new Wyn Enterprise 3.6!

Wyn Enterprise: Create Semantic Model

A semantic model is an abstract model that organizes data into separate entities with defined relationships between entities. To create a new semantic model, follow these steps.

  1. On the Resource Portal, navigate to Create (+) > Create Semantic Model.

Specify a Data Source

  1. Select a data source from the available data source types, which are:
    • Oracle
    • SQL Server
    • Mysql
    • Postgres

Configure a Data Source

  1. Provide the connection details for a selected data source.

Note : You can enter a configuration string to connect directly to your data source, select the Use Configuration String checkbox.

Sample connection string for SQL Server:

Server=myServerAddress; Database=myDataBase; User ID=myUsername; Password=myPassword;

Sample connection string for Oracle:

USER ID=myUserId; Password=myPassword; Data Source="(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST= myOracleDBHost)(PORT=myOracleDBPort))(CONNECT_DATA=(SERVICE_NAME=myOracleDBServiceName)))";

Sample connection string for Mysql:

Server=myServerAddress; Port=mySeverPort; Database=myDataBase; Uid=myUsername; Pwd=myPassword;

Sample connection string for Postgres:

USER ID=myUserId; Password=myPassword; Host=myPostgresDBHost; Port=mySeverPort; Database=myDataBase;

  1. Click Test connection to test the connection string for the new model.

Select Tables and Views

  1. Click Next to proceed to the Select tables and views screen.

  2. Click check boxes to select items from the list of available tables and views.

    Filter items by name - if you have a lot of items, you can filter what is shown by entering a value in the Filter items by name box.

    Find additional relations - use this checkbox to determine whether to create relations between like-named columns (selected by default) or not. If this checkbox is not selected, a model is generated with predefined relations from the data source, which helps to avoid the generation of extra relations.

    Select or clear all items - you can select or clear all visible items at once by using this checkbox.

Note : If you do not select any items in this step, you can generate an empty model without any data, and later add data to the model manually.

  1. Click Done to finish the semantic model generation wizard. A new model is generated and appears in the Semantic Models list, available to users for creating reports in the Report Portal.
  2. In the model editor that opens next, you can edit the entities of the model by modifying its attributes and relations.

Add and Modify an Entity

To modify a model entity, select a semantic model from the list of available semantic model and click the Edit icon.

Caution : Modifying a model may break reports attached to it.

  1. In the model editor that appears, in the Entities list on the left, select the entity that you want to modify. The properties appear in the workspace and the Attributes and Relations lists populate with any associated attributes and relations.
  2. In the workspace, change properties as necessary. The table below gives details of the properties.
Property Name Type Description
Name String The name of the entity.
Description String A description of the entity that appears as tooltip text when a user hovers the pointer over the entity.
Collection Name String The name to be used for a collection of instances of the entity. Use this property to ensure that plural nouns are spelled correctly.
ID ID A unique identifier for the entity. Used internally by the system.
Binding ID The database object that the entity represents.
Hidden Boolean Indicates whether the entity is hidden from end users.
Collapse in Relations Boolean Indicates whether to collapse the entity when it is displayed within a relation.
Security Filter Expression Allows you to use custom security providers to filter the data displayed for the entity.
Default Aggregate Attributes Object Determines the attributes to display by default when the entity appears in an aggregate.
Default Detail Attributes Object Determines the attributes to display by default. For example, when you drag the entity onto the designer and create a table or chart, these attributes display by default.
Identifying Attributes Object The set of attributes to use to identify a unique instance of the entity.

Add and Modify a Relation

A relation item in a model describes the relationships between entities. To modify a model relation, select a semantic model from the list of available semantic model and click the Edit icon.

  1. In the workspace, change properties as necessary. The table below gives details of the properties.
Property Name Type Description
Name String The name of the relation.
Description String A description of the relation that appears as tooltip text when a user hovers the pointer over the relation.
ID ID A unique identifier for the relation. Used internally by the system.
Binding ID The database object that the relation represents.
Hidden Boolean Indicates whether the entity reached by the relation is hidden from end users.
Recursive Boolean Indicates whether the relation can be added more than once to the same path.
Include Self Boolean Indicates whether to allow the relation to be accessible to itself in the same recurring path. This applies only in the second level of an entity.
Cardinality Enum Defines the rules and restrictions for the relation's behavior in the entity tree and in semantic query building. Possible values are One, or OptionalOne.
This property determines whether the Recursive property has an effect on the relation.
Hidden Fields Object Defines the set of entity fields that is hidden from end users when they reach the entity through the relation.
Condition Boolean Indicates whether to base this relation on an existing logical relation from the list.

Caution : Modifying a model may break reports attached to it.

  1. In the Entities list on the left, select the entity whose relation you want to modify. The properties appear in the workspace and the Attributes and Relations lists populate with any associated attributes and relations.
  2. In the Relations list on the lower right, select the relation which properties you want to modify. The properties appear in the workspace.
  3. In the workspace, change properties as necessary.
  4. Save a draft of your model by using any of the following options:

  5. Clicking the Save Draft icon in the upper left corner of the model editor page. Clicking this icon saves modifications as a local draft copy is available only to you.

Note : We recommend using this option to save a draft of a model that does not pass validation.

  • Save changes and make them public by clicking the Save and Publish icon in the upper left corner of the model editor page. Clicking this icon validates and, if no errors are found, saves modifications as a new version of the model.
  • Check modified elements for errors by clicking the Validate icon in the upper left corner of the model editor page.