Creating Compound Metrics
A compound metric is generated by adding one or more derivative metrics. The dimensions and modifiers of a compound metric are the same as those of the derivative metrics. New dimensions and modifiers cannot be generated outside the scope of derivative metrics, dimensions, and modifiers.
Constraints
A maximum of 5,000 compound metrics can be created in a workspace.
Prerequisites
A derivative metric has been created and approved. For details, see Creating Derivative Metrics.
Creating a Compound Metric
- On the DataArts Studio console, locate a workspace and click DataArts Architecture.
- On the DataArts Architecture page, choose Compound Metrics tab. in the left navigation pane. On the displayed page, click the
- Select a subject from the subject tree on the left and click Create.
- On the page displayed, set the parameters.
Figure 1 Creating a compound metric
Table 1 Parameters for creating a compound metric Parameter
Description
*Metric Name
Newline characters and the following characters are not allowed: \ < > % " ' ;
*Metric Code
Metric code names must start with letters. Only letters, numbers, and underscores (_) are allowed.
*Subject
Subject information. Select a subject.
*Statistical Dimension
The available options are those configured on the Derivative Metrics page.
*Data Type
Select a data type for the compound metric.
*Compound Metric Type
The following options are available:
- Expression
- Growth compared with the same period last year
- Growth compared with the last period
Description
A description of the compound metric to create. Up to 600 characters are supported.
Expression
*Expression
Select the required derivative metrics or compound metrics and set the expression as required.
Growth compared with the same period last year
*Period Type
Select Year, Month, or Week.
*Derivative Metric
Select derivative metrics (only derivative metrics with time filters are displayed). The system automatically calculates the growth compared with the same period last year based on the time filter.
Growth compared with the last period
*Derivative Metric
Select derivative metrics (only derivative metrics with time filters are displayed). The system automatically calculates the growth compared with the last period based on the time filter.
- In the lower part of the page, click Trial Run. In the dialog box displayed, click Trial Run to check whether the compound metric can run properly.
If the trial run fails, locate the fault based on the error message, correct the configurations, and click Trial Run to try again.
- If the trial run is successful, click Publish.
- In the displayed dialog box, select a reviewer and click OK to submit a request.
If you have been added as a reviewer, you can select Auto-review and click OK. After the request is approved, the status changes to Published.
If you select multiple reviewers, the status changes to Published only after all reviewers have approved the publishing request. If any reviewer rejects the request, the status is Rejected.
- Wait for the reviewer to approve the application.
After the application is approved, the compound metric is created.
Click the name of a compound metric to view its details, relationship diagram, publishing history, and review history.
In the relationship diagram, you can view the lineage diagram of the compound metric.
In the release history, you can view the differences between historical versions.
Editing a Compound Metric
- On the DataArts Architecture page, choose Compound Metrics tab.
Figure 2 Compound metrics
in the left navigation pane. On the displayed page, click the - In the compound metric list, select the target metric and click Edit on the right.
- On the page displayed, set the parameters as prompted. For details, see Table 1.
- In the lower part of the page, click Trial Run. In the dialog box displayed, click Trial Run to check whether the compound metric can run properly.
If the trial run fails, locate the fault based on the error message, correct the configurations, and click Trial Run to try again.
- If the trial run is successful, click Publish.
- In the dialog box displayed, select a reviewer and click OK.
Publishing a Compound Metric
After creating or editing a compound metric, it takes effect only after it is published. Compound metrics in publishing review, published, or suspension review state cannot be published.
- On the DataArts Architecture page, choose Compound Metrics tab. in the left navigation pane. On the displayed page, click the
- In the compound metric list, select the target compound metric and click Publish.
- In the dialog box displayed, click OK.
Viewing the Publish History
- On the DataArts Architecture page, choose Compound Metrics tab. in the left navigation pane. On the displayed page, click the
- Select the target compound metric in the list and choose .
- On the page displayed, you can view the publish history and version comparison information of the metric.
Previewing an SQL Statement
- On the DataArts Architecture page, choose Compound Metrics tab. in the left navigation pane. On the displayed page, click the
- Locate the target compound metric and choose .
- In the dialog box displayed, you can view or copy the SQL statement.
Suspending a Compound Metric
You can bring a published compound metric offline if it is no longer used.
The prerequisite for suspending a compound metric is that the metric is not referenced to any summary table.
- On the DataArts Architecture page, choose Compound Metrics tab. in the left navigation pane. On the displayed page, click the
- In the compound metric list, select the target compound metrics and click Suspend above the list.
- In the dialog box displayed, click OK.
Deleting a Compound Metric
The prerequisite for deleting a compound metric is that the metric is not referenced to any summary table.
- On the DataArts Architecture page, choose Compound Metrics tab. in the left navigation pane. On the displayed page, click the
- Select the target compound metric and choose above the list.
- In the dialog box displayed, confirm the information and click Yes.
Importing Compound Metrics
You can import compound metrics to the system quickly.
- Above the compound metric list, choose More > Import.
Figure 3 Importing Compound Metrics
- Download the compound metric template, and edit and save it.
- Choose whether to update existing data.
If a code in the template already exists in the system, the data is considered duplicate.
- No: If the data to be imported already exists in the system, the existing data in the system will not be replaced.
- Yes: If the data to be imported already exists in the system:
- If the existing data in the system is in draft state, the data will be replaced and new draft data will be generated.
- If the existing data in the system is in published state, expanded data will be generated.
- Click Select File and select the edited template to import.
- Click Upload. When the template is uploaded, the Last Import page is displayed. You can view the imported data.
- Click Close.
Exporting Compound Metrics
You can export compound metrics to a local file.
- In the compound metric list, select the metric to be exported.
- Above the compound metric list, choose More > Export.
- You can export all the compound metrics of a subject by selecting the subject in the subject list on the left.
- You can export all the compound metrics of a workspace, as long as there are no more than 5,000 compound metrics in the workspace.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot