Object Mapping¶
You can configure field mapping for basic objects and the Resource Catalog, which only optimizes the display name on the frontend while keeping the original data unchanged.
Configuration¶
- Select the data source.
- Choose the object class.
- Edit the two attribute fields that need to be mapped.
- Save.
For example: Map container_id
to display as container_name
.
In the dashboard, the view variable value will be displayed as container_name (container_id)
, but when querying, the value of container_id
will still be passed. Additionally, if the field mapping feature is enabled in the chart settings, the legend of the chart will display the mapped field value.
For object mappings that have already been created, you can edit or delete them as needed.
Configuration Notes
- Object mapping only supports object class data.
- Before using object mapping, you need to define view variables based on object class fields.
- Query fields of the same object class do not support duplicate mapping settings, meaning that fields that have already been mapped will not appear in the query field dropdown.
- When field mapping is enabled, only the grouping fields and their corresponding mapped fields are displayed in the chart, and unmapped grouping fields are not shown.
- When field mapping is disabled, the mapped fields are not displayed in the chart, and the original fields are restored.
Use Cases¶
Object mapping can be applied in two scenarios:
Dropdown display in view variables
Applied to View Variables¶
When adding an object's attribute field to a view variable, if the field has been mapped, it will be displayed in the view variable as: mapped field (original field).
Example:
- Add the
container_id
variable to the view variable. - Set
container_id
to map tocontainer_name
in object mapping. - The variable will now be displayed in the view as:
container_name(container_id)
.
Applied to Charts¶
When querying an object's attribute field in a chart and enabling field mapping in the settings, if the field has been mapped, it will be displayed in the chart variable as: mapped field (original query field).
Example:
- Set
host
to map toname
in object mapping. - Enable field mapping in chart > advanced settings.
- The final display format in the chart will be
name(host)
.