Mapping UUIDs to Display Names with Infinity Data Source
A Step-by-step guide on how to exchange UUIDs with human-readable names
Last updated
A Step-by-step guide on how to exchange UUIDs with human-readable names
Last updated
When querying data from the ENLYZE Platform API using the Infinity data source in Grafana, entities such as Sites, Machines, or Products are returned with their UUIDs instead of display names. For visualizations, human-readable names are more useful than raw UUIDs.
This tutorial walks you through the process of mapping Machine UUIDs to their corresponding names to create a clear and readable production run table.
Start by creating a new visualization and querying the production-runs
endpoint to retrieve production orders along with their start and end times and machine information.
Select the Infinity data source.
Create a UQL query with the following configuration:
Type: JSON
URL: production-runs
In the query editor, build the following UQL Query to extract relevant fields:
Click Refresh dashboard and enable Table view to inspect the results.
At this point, the table displays machine UUIDs rather than machine names
To map UUIDs to names, add a second query that fetches machine metadata.
Inside the same panel, add a new UQL query pointing to the machines
endpoint.
Use the following UQL query to retrieve UUID-name pairs:
Click Refresh dashboard to load the second query (Query B).
The way to show the machine names is to join both queries over the machine UUID columns. A single join operation can be performed using the Grafana Transform Join by Field. This transformation can only work if both columns have the same name.
Open the tab Transform data
Add a Join by Field transformation:
Mode: INNER
Field: machine (base field name)
This results in a joined table containing both the production run data and the corresponding machine names.
If you would like to polish your results, we recommend using the transform Organise fields by name to rename, sort and deactivate columns.