Mapping UUIDs to Display Names with Infinity Data Source

A Step-by-step guide on how to exchange UUIDs with human-readable names

When querying data from the ENLYZE Platform APIarrow-up-right 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.

1

Getting a List of Production Runs

Start by creating a new visualization and querying the production-runsarrow-up-right endpoint to retrieve production orders along with their start and end times and machine information.

  1. Select the Infinity data source.

  2. Create a UQL query with the following configuration:

    • Type: JSON

    • URL: production-runs

  3. In the query editor, build the following UQL Query to extract relevant fields:

parse-json
| scope "data"
| project "production_order","end"=todatetime("end"), "start"=todatetime("start"), "machine"
  1. Click Refresh dashboard and enable Table view to inspect the results.

At this point, the table displays machine UUIDs rather than machine names

2

Query Machine Value Pairs

To map UUIDs to names, add a second query that fetches machine metadata.

  1. Inside the same panel, add a new UQL query pointing to the machinesarrow-up-right endpoint.

  1. Use the following UQL query to retrieve UUID-name pairs:

parse-json
| scope "data"
| project "machine"="uuid", "name"
circle-info

Note: The UUID is renamed to machine to match the column in the first query. This is required for the join operation in the next step.

  1. Click Refresh dashboard to load the second query (Query B).

Query B
3

Perform a JOIN operation on both queries

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 Fieldarrow-up-right. This transformation can only work if both columns have the same name.

  1. Open the tab Transform data

  2. 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 namearrow-up-right to rename, sort and deactivate columns.

Last updated