Managing Query Mapping Groups¶
You can configure data sources for derived metrics and construct query mapping groups on the Query Mapping tab in Metric Library, and also edit and publish query mapping groups.
Prerequisites¶
Before you start, ensure the following:
The current account has been assigned a menu group containing Metric Library. If not assigned, contact the application administrator.
Derived metrics that require the configuration of data sources have been published.
Dimension tables are configured and published.
Creating a Query Mapping Group¶
Select Metric Library in the left navigation bar, which goes to the Atomic Metric tab by default.
Go to the Query Mapping tab and select New.
On the Group Basic Configuration page, enter the Basic Information of the query mapping group.
Group ID: Enter the ID for the query mapping group, which cannot be modified after creation.
Mapping Configuration Group Name: Enter the name of the query mapping group.
Description: Enter a description for the group.
Attributes: Select Add Attributes, enter the key-value pair of the attribute to add other attributes to marking or differentiation. For example, the field to which the group belongs.
Configure data sources for derived metrics on the Group Basic Configuration page.
When the Calculation Method is set to
API Pass-Through - Single Source
, you will need to further select the API Group, the API or API configuration information under the group, and one or more Dimensions that have been configured and published to define the aggregation dimension for the derived metric. If the derived metrics do not need to be counted by dimension, selectALL
.
API Group
API Selection
API Adapter
Group of
Internal API Source
Select an API in EnOS that has been integrated by Metric Management.
This item is not mandatory.
API Group of
APIM Source
Select the Open API that has been configured as EnOS Platform Exclusive Instance in the group in API Management.
Select Input Adapter to view related codes or select Edit Code.
A data source of
OPENAPI
type registered byData Source Registration
Select an Open API that has been registered in Registering an Open API Data Source.
Select Input Adapter to view the related codes or select Edit Code.
When the Calculation Method is set as
Fact Table Pass-Through
:In Fact Table, select a configured and published fact table.
In Time Field, select the Fact Attribute of the selected fact table to define the time range to ensure data accuracy at a certain point of time.
In Dimension, select one or more dimension tables associated with the current fact table to define the aggregation dimension of the derived metrics. If the derived metrics do not need to be counted by dimension, select
ALL
.
Select Next to go to the Metric Configuration page.
Select Add Metric to map the data in the data source to the derived metrics you created.
In the Metric ID column, select the derived metrics linked to the selected dimension table.
Select or fill in the fields of the data source in Fact Table Field or Associated API Field to create the mapping relationship between derived metrics and data source fields.
In the Restrictive Conditions column, fill in the conditions used to filter the fact table fields. For specifics on how to enter restrictive conditions, see Restrictive Condition Expression Specifications.
Select Next to view and confirm the configuration information on the Preview page.
Select Publish to save and publish the query mapping group.
If you don’t want to publish for the moment, you can Save it as a draft. To publish it later, see Publishing a Query Mapping Group.
Editing a Query Mapping Group¶
Select Metric Library in the left navigation bar, and select the Query Mapping tab.
Select Edit at the end of the target group row to edit, and then save or publish after modification.
Deleting a Query Mapping Group¶
Select Metric Library in the left navigation bar, and select the Query Mapping tab.
Select Delete at the end of the target group row to delete.
Publishing a Query Mapping Group¶
Select Metric Library in the left navigation bar, and select the Query Mapping tab.
Select a target query mapping group with a status of
Draft
ofUnpublished
, and then at the end of the row, click Publish .You can also select the ellipsis (…) at the end of the target query mapping group row with a status of
Updated for Publish
, and then click Publish .
After the query mapping group for the derived metric is published, you can view the value of the derived metrics on the Metric Insights page.
Unpublishing a Query Mapping Group¶
Select Metric Library in the left navigation bar, and select the Query Mapping tab.
Select Unpublish at the end of the target query mapping group row to unpublish the query mapping group.
Viewing an Online Version of a Query Mapping Group¶
Select Metric Library in the left navigation bar, and select the Query Mapping tab.
Hover the mouse over the ellipsis (…) at the end of the target query mapping group for which the status is Updated for Publish, and then select View Online Version to view the query mapping group in its most recently modified version.
Reverting a Mapping Configuration Group to an Online Version¶
Select Metric Library in the left navigation bar, and select the Query Mapping tab.
Hover the mouse over the ellipsis (…) at the end of the target query mapping group for which the status is Updated for Publish, and then select Revert to Online Version to republish the previous query mapping group.
Exporting/Importing Mapping Configuration Groups¶
Export/import operations are available to share and migrate query mapping groups between different OUs.
Select Metric Library in the left navigation bar, and select the Query Mapping tab.
Check the published query mapping groups, select Export, and export a file in JSON format as a template.
Select Import to import the local query mapping groups.