Object Mapping¶
For basic objects and the Resource Catalog, you can configure field mappings to optimize the display names on the frontend, while the original data remains unchanged.
Configuration¶
- Select the data source;
- Choose the object classification;
- 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 values will be displayed as container_name (container_id)
, but during queries, 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 values.
For already created object mappings, you can edit or delete them as needed.
Configuration Notes
- Object mapping only supports object-type data;
- Before using object mapping, you need to define view variables based on object-type fields;
- The same query field in the same object classification cannot be mapped repeatedly, meaning the query field dropdown will not show fields that have already been mapped;
- When field mapping is enabled, only the grouping fields and their corresponding mapped fields are displayed in the chart; unmapped grouping fields are not shown;
- When field mapping is disabled, the chart does not display the mapped fields and reverts to showing the original fields.
Use Cases¶
Object mapping can be applied in two scenarios:
Dropdown display in view variables
Display in charts
Applied to View Variables¶
When adding attribute fields of objects to view variables, if the field has field mapping set, it will be displayed as: mapped field (original field).
Example:
-
Add the
container_id
variable in View Variables; -
Set
container_id
to map tocontainer_name
in Object Mapping; -
The view variable will now display as:
container_name(container_id)
.
Applied to Charts¶
When querying attribute fields of objects in charts and enabling field mapping in the settings, if the field has field mapping set, it will be displayed 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)
.