Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

​ Quick BI fetch model

2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/03 Report--

The most critical point in the development of charts is to select accurate chart types to show accurate data, and accurate data often depends on a powerful fetching model, so designing a good fetching model can not only solve the problem of data security, but also help each visitor to access the data they want efficiently. Developers can build a multi-level and multi-granularity fetching model by using Quick BI.

Before building the fetch model, let's briefly introduce the concept of a dataset. Quick BI currently supports establishing connections for more than 20 kinds of databases. After establishing connections, we will generate a logical entity called data source for each connection in the system. By previewing the data source, you can view the physical table information under the corresponding database, and you can create data sets based on these physical tables, each data set is based on the standard OLAP model after physical table processing and modeling. In Quick BI, the reading and processing of user table data is generally based on the dataset model.

Currently, the fetch model in Quick BI consists of two layers, as shown in figure 1:

Fig. 1 the fetch model in Quick BI

The first floor:

Dataset filter, in Quick BI, a dataset can be referenced by multiple charts in multiple dashboards. By setting the filter on a dataset, data developers in the space can ensure that the data accessed by all chart analysts referencing that dataset is scoped.

According to the scope of the filter, it can be divided into global filter and row-level permission filter.

1. Global filter

As the name implies, it will affect all charts and users who reference the dataset. After setting, you can check the filtered data by refreshing the preview function, and you can set the global filter in the way shown in figure 2.

Figure 2 dataset global filter

2. Row-level permissions

Data developers can customize the range of data they can access according to the account number, label or user group to which they belong. The filter set at the user level will inherit the filter of the user group they belong to in the way of "or", and the row-level permission filter can be set on the dataset list in the way of figure 3. Note that the filters set on metrics in both ways are detail-level filters without any aggregation.

Figure 3 Rowset permission filter

The second floor:

Chart-level filters, which specify the range of charts that function when set, and are affected only when the selected chart displays data. On this basis, it can also be divided into setting type and trigger type according to the mode of action.

1. Set filter

Set by the dashboard developer in the edit mode, the user cannot change the filter settings in the preview mode, and the charts within the scope will always be limited by the filter, which includes internal filters and global parameters.

1.1 Internal filter

It only works on the current chart, and you can choose the aggregation method when it is set as a metric filter. The aggregation method supports sum, cnt, max, min, avg, cntd, which is set by dragging the dataset fields in dashboard edit mode as shown in figure 4.

Figure 4 built-in filter

1.2 Global parameters

The parameter name needs to be generated and the scope of action needs to be set. The mechanism is to complete the condition injection by stitching url parameters. The stitching format is as follows:

Param= [{"paramKey": "moci", "joinType": "and", "conditionList": [{"operate": "=", "value": "North China"}]}]

Users can directly modify the contents of url parameters to achieve data control, or they can quickly refer to them in mail subscriptions and chart jump functions, which can be set by selecting global parameters in the top menu to set as shown in figure 5.

Figure 5 built-in filter

2. Trigger filter

The initial value can be set in the edit mode, and the display data of the associated chart can also be changed through specific operations in the preview mode. Query conditions and linkage parameters belong to trigger filters.

2.1 query conditions are very powerful, allowing report developers to freely select fields, select aggregation methods, set action charts, set initial filtering values and set optional ranges, while previewers are free to switch filter conditions within the scope limited by the developer, as shown in figure 6.

Figure 6 query conditions

2.2 Linkage parameters are based on a relationship between charts. After configuring the linkage field and the action chart on the configurable linkage chart, the previewer can click on some blocks of the linkage chart to achieve the purpose of synchronously injecting filter conditions into the linked chart, which is set by first selecting the chart to be linked, and then configuring it in the advanced area, as shown in figure 7.

Fig. 7 Linkage parameters

The scenarios of the above filter applications are different. They are superimposed on each other through AND. There is a powerful SQL feature in the chart menu in dashboard editing mode. You can see the SQL statements generated by the current fetch model, making it convenient for developers to adjust the current fetch model. In real business scenarios, it is often necessary to combine one or more of them in order to establish a complete fetch model. Take a sales company as an example, by using global filters to filter out invalid data, by using row-level permissions to control that each sales team can only see the summary of sales results in its own jurisdiction, and by using global parameters to generate different links for each previewer to see the sales summary of the concerned products. Through the query conditions and filters to control and switch the sales data of different customers, through the linkage parameters to facilitate the previewer to directly associate with other charts to view the specific information of a customer.

Fig. 8 query conditions

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report