General chart data support is DWS and ADS

Naming principles

Dws_ Metric identifier _ Metric Description (Table description)_ Dimensions

For example: dws_gmv_month_compare_year_last_0_1_brand

DWS -> Surface level identifier: DWS_ GMV -> Measure identifier: sales month_compare_year_last_0_1-> Measure description: comparison between this year and a month last year brand-> Dimension: brandCopy the code

The chart data supports best practices

1. In order to make the table not too complex and avoid the calculation between measures of a certain dimension, you can add multiple measure fields appropriately.

2. Minimize the dimension category in a single table. If not necessary, one DWS only contains the time dimension and one other dimension, namely, two dimensions. Of course, to support retrieval necessary, you can add multiple query dimension fields, query dimension is independent of dimension.

3. As long as the dimensions of a table can support the display of one chart, there is no need to support more charts. If you want to support another diagram (different dimensions, not drill up and roll down), you can just compute a DWS. Since we didn’t know what the charts were at the beginning, it was obviously reasonable to support more charts for flexibility. This is similar to writing API interfaces, one interface one function, one DWS one chart.

4. Must include the DT field, which is the occurrence time of the data in the row.

Graphs correlate with data

1. The X-axis must be one-dimensional

2. Combine graphs and multi-line/bar charts, minimize the use of series, and use multiple measures

3, try to refine dt, such as DT to minutes, and even seconds, so that you can drill down and roll up

4. The chart has time dimension retrieval conditions, so not only DT, but also some time dimensions, such as Month, day, etc

demo

Table structure

Dimension tables and DWS

The chart

Chart Configuration Items