Wyn Enterprise User Guide

Wyn Enterprise: Create Data Model

A data model is an abstract model that organizes data into separate entities with defined relationships between entities. The data model creation involves a number of tasks as described in this article.

Create a Data Model

  1. On the Resource Portal, navigate to Create (+) > Create Data Model.
    Create a data model on Resource Portal
  1. Select a report (For Report) or a dashboard (For Dashboard) model type by clicking it.

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 the selected data source.

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

    Configure a data source on Resource Portal

    Sample connection string for SQL Server

    • For Dashboard -

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

    • For Report -

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

    Sample connection string for Oracle

    • For Dashboard -

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

    • For Report -

      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

    • For Dashboard -

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

    • For Report -

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

    Sample connection string for Postgres

    • For Dashboard -

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

    • For Report -

      USER ID=myUserId; Password=myPassword; Host=myPostgresDBHost; Port=myServerPort; 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.
    Select tables and views screen

    Note that if you are creating a model for a dashboard (see step 2 above), the Select tables and views screen looks different from the one for a report data model type, displaying tables and views.
    Select tables and views screen

    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.

  2. Click Done to complete the data model generation and close the wizard. A new model is generated and appears in the Data Models list available to users for creating reports in the Document Portal.

  3. In the model editor that opens next, you can edit the entities of the model by modifying its attributes and relations.

Modify an Entity

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

  1. In the model editor, 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 provides details regarding 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.

For more information, refer to the following articles-

Modify an Attribute

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

Each entity has a set of attributes and relations. You can add a new attribute or modify it in the model editor that displays attributes in the middle of the workspace once an entity is selected.

  1. In the model editor that appears, in the Entities list on the left, select the entity, which attributes you want to modify. 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 attribute.
Description String A description of the attribute that appears as tooltip text when a user hovers the pointer over the attribute.
ID ID A unique identifier for the attribute. Used internally by the system.
Binding ID The database object that the attribute represents.
Data Type Object The attribute data type. If there is an expression, the data type must match the data type of the expression.
Format String The .NET Framework format string used to format the field.
Hidden Boolean Indicates whether the attribute is hidden from end users. When the data model is used in the report, hidden attributes are not displayed.
Discourage Grouping Boolean Indicates whether the client application organizes users into groups by this attribute. It is recommended to set Grouping not encouraged for attributes with unique values ​​(e.g., phone numbers).
Is Aggregate Boolean Indicates whether the attribute is aggregated.
Nullable Boolean Sets whether the attribute can be nullable.
Support Blank Values Boolean Indicates whether the attribute value can be empty.
Support Null Values Boolean Sets whether the attribute supports null values.
Value Selection Object Determines how to display field values ​​in the filter and parameter editor. You can select from three options: None, Dropdown and List. The default value is None and it requires a user input. The Dropdown option displays data values ​​in a drop-down list. The List option allows displaying more values than the ones displayed in the Dropdown option. If Is Aggregate is set to Yes, then ignore this attribute.

For more information, refer to the following articles-

Modify a Relation

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

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

  1. In the model editor that appears, in the Entities list on the left, select the entity, which relations you want to modify. 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. 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.

For more information, refer to the following articles-

Save a Data Model

  1. Save a draft of your model by using any of the following options

    • 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.
      Save a Data Model

    • 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.

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

    Note: For the dashboard type data model, you can control permissions on the model's entity to have it shown or hidden in a dashboard, based on the user's permissions. For more information on how to set sharing permissions, visit this page.