Building logical models for Insight Advisor with Business logic
Insight Advisor uses a logical model based on learned precedents to generate analyses based on your queries. You can define your own logical model for your apps with Business logic.
Insight Advisor relies on the Qlik cognitive engine and learned precedents to understand the relationships and uses of fields in your data model. Optionally, you can customize the logical model to improve Insight Advisor results. You can customize your logical model in Logical model under Business logic in the app navigation menu.
When business logic is enabled in an app, precedent-based learning is disabled for the app.
Understanding logical models
The logical model of an app is the conceptual model Insight Advisor uses when generating visualizations. It is built from the underlying data model of an app. Each app has a single logical model. Fields and master items are the core components of the logical model. They are organized into groups. Groups indicate a conceptual association or relationship between fields or master items. The logical model also contains information about possible relationships between groups.
The logical model directly influences how Insight Advisor functions. For example, when a user selects a field to show a trend analysis, Insight Advisor tries to find a date field that is part of a primary calendar group. If the field was Sales, Insight Advisor would prioritize a field like Order Date over the field Employee Birth Date.
Business logic also affects how the system chooses between fields in natural language questions. For example, the fields Product Name and Product Code are grouped as a single group. If 'what are sales by product' is used as a natural language question, Product Name would be used for 'product' as it is a better choice for that group.
The default logical model used for business logic is a star schema. Business logic enables you to construct different modeling for your app if a star schema is not optimal. Business logic can also help constrain aggregation in logical models containing semi-additive measures or very large measure tables. This improves the exploration of app data in Insight Advisor.
Customizing logical models
Logical model is divided into the following sections for customizing the logical model of an app:
- Overview: Overview provides a summary of your business logic. Clicking the cards for Fields & groups, Packages, Hierarchies, or Behaviors opens the corresponding section.
- Fields & groups: Fields & groups enables you to define the groups to which your fields and master items belong in the logical model.
- Packages: Packages enables you to create collections of related groups. This prevents groups from being used together that are not in the same package.
- Hierarchies: Hierarchies enables you to define drill-down relationships between groups.
- Behaviors: Behaviors enables you to specify prefer or deny relationships between fields. Behaviors can also enforce required selections.
- Calendar periods: Calendar periods enables you to create default periods of analysis for Insight Advisor.
To customize a logical model, do the following:
- Enable the customization of the business logic of your app.
-
Define your fields and groups.
-
Optionally, add your groups to packages.
-
Optionally, define hierarchies between groups
-
Optionally, apply behaviors.
-
Optionally, create calendar periods.
You can reset your logical model to the default. You can also disable business logic temporarily.
Enabling custom business logic
Do the following:
- In an app, open the app navigation menu and select Logical model.
- Click Continue.
Custom business logic is now enabled for your app. Precedent-based learning is now disabled.
Resetting business logic
You can reset your logical model to the default model. Resetting disables custom business logic and enables precedent-based learning in Insight Advisor.
Do the following:
- In Logical model, click Reset to default.
- Click Confirm.
Disabling business logic
You can disable custom logical models. Unlike resetting business logic, you can enable your custom business logic again later. While your business logic is disabled, it will use the default business logic for your app.
Do the following:
- In Logical model, click Disable logic.
- Click Confirm.