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


  1. Select Metric Library in the left navigation bar, which goes to the Atomic Metric tab by default.

  2. Go to the Query Mapping tab and select New.

  3. 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.

  4. 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, select ALL.


    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 by Data 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.

  5. Select Next to go to the Metric Configuration page.

  6. 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.

  7. Select Next to view and confirm the configuration information on the Preview page.

  8. 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


  1. Select Metric Library in the left navigation bar, and select the Query Mapping tab.

  2. Select Edit edit_icon at the end of the target group row to edit, and then save or publish after modification.

Deleting a Query Mapping Group


  1. Select Metric Library in the left navigation bar, and select the Query Mapping tab.

  2. Select Delete delete_icon at the end of the target group row to delete.

Publishing a Query Mapping Group


  1. Select Metric Library in the left navigation bar, and select the Query Mapping tab.

  2. Select a target query mapping group with a status of Draft of Unpublished, and then at the end of the row, click Publish publish_icon.

    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 publish_icon.

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


  1. Select Metric Library in the left navigation bar, and select the Query Mapping tab.

  2. Select Unpublish unpublish_icon 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


  1. Select Metric Library in the left navigation bar, and select the Query Mapping tab.

  2. 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 view_version_icon to view the query mapping group in its most recently modified version.

Reverting a Mapping Configuration Group to an Online Version


  1. Select Metric Library in the left navigation bar, and select the Query Mapping tab.

  2. 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 revert_version_icon 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.


  1. Select Metric Library in the left navigation bar, and select the Query Mapping tab.

  2. Check the published query mapping groups, select Export, and export a file in JSON format as a template.

  3. Select Import to import the local query mapping groups.