Understanding the hierarchical dataset of the rundry set computing report

Source: Internet
Author: User

The rundry set computing report provides support for hierarchical data sources. After associating tables in the set computing tool, you can associate datasets with a master-slave structure (such as joined dimension tables and fact tables) you can directly use the data for reports without re-associating the data in the report. You can also use the group data set that has been completed in the Set compute in advance in the same set computing report, instead of grouping again.

What is a hierarchical data source?

A hierarchical data source uses the dataset type of the Set compute in the Set Computing report. It receives the result set returned by the Set Computing script and serves as the data source of the report.

650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M00/46/B8/wKioL1P0DxPhulXBAAF4eD50R-Y321.jpg "style =" float: none; "Title =" 2014-08-20_105158.jpg "alt =" wKioL1P0DxPhulXBAAF4eD50R-Y321.jpg "/>

For example, the result set A6 returned by the script includes the sales name, the order amount summarized by sales, and the Order details under the corresponding group. The Order details point to another set, this sales list contains the order ID, order date, order amount, and other information .. This method provides a result set with associations and group details for the report.

After receiving the result set, the dataset structure in the report is as follows:

650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M01/46/B8/wKioL1P0DxTx5cE5AAFY0_a01yc887.jpg "style =" float: none; "Title =" 2014-08-20_105210.jpg "alt =" wkiol1p0dxtx5ce5aafy0_a01yc887.jpg "/>

Dataset structure of result reports at various levels of the Set Calculator

In the right report dataset structure:

"Ds1" references the sales name and total order amount records;

"Ds1. order details" refers to the order details record for each sale, which is the second result set of ds1;

The basic information record of each customer referenced by "ds1. order details. Customer" is the third-level result set of ds1;

"Ds1. order details. employee ID" is similar to "ds1. order details. Customer". It refers to the basic sales information record and is also the third-level result set of ds1.

How to use hierarchical data sources?

The preceding data is used as an example to describe the total number of orders of each salesperson in a month grouped by sales personnel, and a report containing the Order details and customer information is provided. The report style is as follows:

650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M02/46/B7/wKiom1P0DfywZ1giAAGUvOp5Rag332.jpg "style =" float: none; "Title =" 2014-08-20_105218.jpg "alt =" wkiom1p0dfywz1giaaguvop5rag332.jpg "/>

You can design the following report:

650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M01/46/B8/wKioL1P0DxWRTFTGAACStATksDE922.jpg "style =" float: none; "Title =" 2014-08-20_105226.jpg "alt =" wkiol1p0dxwrtftgaacstatksde922.jpg "/>

A2-B2: for the sales staff group directly take the sales name in "ds1", using the set calculator has completed the grouping, do not need to for the sales again group;

C2-E2: Get order details for each group (order date, order amount, customer name) from Level 2 result set ds1 ), there is no need to associate the order table with the employee table.

You can use a simple list and value expression to complete grouping reports.

 

Let's look at an example.Lists order information and order details of each order according to the order and order list. The report style is as follows:

650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M00/46/B7/wKiom1P0Df6Ah-B5AAGKVXa8C3w108.jpg "style =" float: none; "Title =" 2014-08-20_105233.jpg "alt =" wKiom1P0Df6Ah-B5AAGKVXa8C3w108.jpg "/>

Generally, the report tool needs to filter all order details in the report based on the order number and order table, and the Set Computing report can be completed through hierarchical datasets.

Compile the set calculator script:

650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M02/46/B8/wKioL1P0DxegZ_noAAGvrM8h5sI447.jpg "style =" float: none; "Title =" 2014-08-20_105245.jpg "alt =" wkiol1p0dxegz_noaagvrm8h5si447.jpg "/>

In order information, the order number points to multiple order details records. The corresponding report data set is:

650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M01/46/B7/wKiom1P0DgHxxStwAAJnh-gQ_OU830.jpg "style =" float: none; "Title =" 2014-08-20_105252.jpg "alt =" wKiom1P0DgHxxStwAAJnh-gQ_OU830.jpg "/>

Use this level of dataset to complete the report:

650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M00/46/B8/wKioL1P0DxnBp-Z8AAECuZ54wsg741.jpg "style =" float: none; "Title =" 2014-08-20_105300.jpg "alt =" wKioL1P0DxnBp-Z8AAECuZ54wsg741.jpg "/>

In B1, the first-level data set ds1 is used to obtain the order ID. D1, F1, and B2 follow B1 to directly obtain all order information from ds1; b6 obtains the product ID in the order details and detailed data of all orders based on the second-level dataset ds1. Set the left primary cell of all cells to B1.

Using hierarchical datasets, you can avoid the need to associate a child strap with a report to achieve efficiency.

Advantages of hierarchical data sources

The value of a hierarchical data source for computing reports is reflected in both report development and performance.

Easy report development

Unlike traditional report tools that require group, sum, and multi-data source association in a report, a set computing report can be completed by using a simple list and value expressions of hierarchical data sources, such as grouping reports in this example.

Because the cube compute script supports step-by-step code writing, it makes it easier to complete many complex grouping and associated computations in the cube, the generated hierarchical data source can be easily used by reports.

Improve report Performance

When a report completes Association, grouping, and other calculations, it generally adopts the sorting and traversal scheme, and often carries a lot of presentation attributes (such as borders and colors) of the report together for calculation, the computing efficiency of the report is not high, while the set operator uses the hash algorithm in the join operation (the report end cannot directly use the hash algorithm for association ), in addition, it does not have any display attribute during computing, and it effectively supports set operations. It can also make full use of the data's orderliness, so that the computing efficiency is better than that on the report end. This means that using the cube to return a hierarchical data source can reduce the computing strength of the report end, significantly improving the report performance.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.