Smart View¶
A Smart View is the representation of manufacturing entities along with their properties and relations, according to a system of categories. In many fields it can be created to limit complexity and help organize manufacturing information. At data warehouse level, a Smart View is a constellation schema, that is a collection of star schemas.
Smart Views:
- Aim at simplifying the complexity of relationships among entities.
- Translate the system data vision into one that is more comprehensible to data analysts.
- Simplify the data warehouse model by producing a usable format for data analysts and their tools.
- Provide the formal naming and definition of properties and relationships within each specific industry domain.
In our context, given the manufacturing data warehouse provided out of the box, a Smart View is a part or a projection of the data warehouse content specified to facilitate a particular purpose or user activity. It is, basically, a partial and/or redefined visualization of the logical schema of the data warehouse.
Smart View Concepts¶
To properly configure Smart Views, you need to know the following concepts:
Smart View Types¶
A Smart View can be of type:
- Physical: data warehouse tables are physically created in columnstore mode and the schema has the same name as the view.
- Virtual: the information is managed by creating SQL views on top of the data warehouse. This mode involves transformations each time the user makes a query, and is therefore demanding in terms of resources and possible system slowdowns. It should therefore be used responsibly, in particular when prototyping scenarios are involved or if the data warehouse does not contain a huge amount of data.
If you want to change the Smart View type, the structures that have already been created do not change. This means that the model remains the same for the user and if any reports or dashboards have been created using one type or the other, they are still available after the change. If you change the type from virtual to physical, an initial load is necessary: this operation requires a long time.
Smart View Measures and Attributes¶
The Smart View reflects the star schema concept in common business intelligence scenarios. This means that to simplify the analysis and the usage of market BI tools, data is organized in fact tables, where there are all the aggregable numbers and typically contain a large amount of data (numbers can be called measures) and dimensions or contexts where you can find all the filtering or grouping labels and typically contain less data (labels are called attributes). To produce a set of star schemas, where every star schema is useful to calculate a set of KPIs or to display related data in a dashboard, we provide the creation of the Smart View, a simplified way to select meaningful information that the user needs to calculate KPIs or display in dashboards. The first step is to choose the required measures. This means that all the numbers he wants to aggregate, display, or use in KPI formulas need to be selected. This selection leads to the creation of fact tables (one for each card) in the star schema, which includes all the selected measures in columns. However, to create a complete star schema contexts (dimensions) are also required. To do so, the user has to perform a selection on the Attributes tab, where the system automatically displays all the available contexts (dimensions) related to the selected measures. Not all the contexts (dimensions) are available for every fact table and this is not so evident in the page, because all the contexts (dimensions) are shown together and when measures that belong to different cards are selected, in the selection of attributes no hint is given to understand which measures those contexts (dimensions) can be associated with. To understand which fact tables are linked to the contexts, the use of the Contexts functionality is recommended (Contexts tab between the Measures and Attributes tabs). After you have selected the attributes, the system can create the “beam” of the star schema, where the name of the context (dimension) is the name of the card and the columns are the selected attributes. The result is a “constellation schema” (smart view), i.e. a set of star schemas where measures are used to perform aggregations and attributes are used to filter or group information. The names of the single measures, attributes, fact tables and contexts (dimensions) can be customized by the user.
Smart View Contexts¶
The Contexts tab is located between the Measures and the Attributes tabs on the Smart View page. In the Contexts tab you can add contexts (dimensions) that the system cannot automatically relate to the fact table. A context is the selection of the dimension a customer wants into the star schema, either provided out of the box or with a customization, while attributes are information the customer wants on each specific dimension (listed in the Contexts page). Every card is made up of two sections:
- Standard: includes all the contexts (dimensions) automatically related by the system.
- Custom: include the context (dimension) that you can manually relate to the fact table. “Manually relate" means that you need to customize the scripts in the Scenario >Database page to link the information to the fact table. This is an advanced operation and must be performed by users with a good knowledge of the data warehouse structure.