Define custom topology via OpenPipeline

  • Latest Dynatrace
  • Tutorial
  • 8-min read
  • Published Apr 30, 2026

OpenPipeline provides dedicated stages for Smartscape ID enrichment and topology definition. This tutorial shows how to use them together with processing stages in a single pipeline for the metric configuration scope to enrich records, update nodes, and record relationships between nodes.

This tutorial uses a logistics fleet example. The fleet is described by the following metrics:

truck.fuel.total,trucknr=0123456789ABCDEF,model=company-model_1 10234
truck.fuel.usage,trucknr=0123456789ABCDEF,model=company-model_1 17
truck.operation.hours,trucknr=0123456789ABCDEF,model=company-model_1 23766
truck.fuel.total,trucknr=9876543210XYZWMN,model=company-model_2 234
truck.fuel.usage,trucknr=9876543210XYZWMN,model=company-model_2 10
truck.operation.hours,trucknr=9876543210XYZWMN,model=company-model_2 13766
container.temperature,containernr=865412,trucknr=0123456789ABCDEF 40
container.temperature.dev,containernr=865412,trucknr=0123456789ABCDEF 0
container.temperature,containernr=791590,trucknr=9876543210XYZWMN 39
container.temperature.dev,containernr=791590,trucknr=9876543210XYZWMN 2.5

Each truck is an instance of a model and contains one or more containers. In this tutorial, you'll configure processors to define:

  • A node for each truck
  • A node for each container and a static edge linking each container to its truck
  • A node for each truck model
  • A node for each truck in the fleet, holding the truck number, the truck name, and a static edge linking each truck to its model
  • Dynamic edges linking each truck to the containers it carries

Who is this for?

This tutorial is intended for pipeline configuration users who want to define custom topology from ingested records.

What will you learn?

In this tutorial, you'll learn how to:

  • Enrich records.
  • Extract custom Smartscape entities from records.
  • Calculate a Smartscape ID to use it as an edge reference, without generating a node event.
  • Model static and dynamic edges.

Before you begin

Prior knowledge
Prerequisites
  • Dynatrace SaaS environment powered by Grail and AppEngine.
  • Dynatrace Platform Subscription (DPS) with metric capabilities.
  • OpenPipeline permissions: settings:objects:read and settings:objects:write with builtin:openpipeline.metrics.pipelines scope.
  • Smartscape permissions: storage:smartscape:read

How-to

1. Create a pipeline and route data

Requires administrator permissions (settings:objects:admin). Only administrators can enable or disable dynamic routes.

The entire configuration for trucks and containers resides in a single pipeline. Both truck and container metrics must reach the pipeline. Configure a single dynamic route for both truck.* and container.* metrics .

  1. Create a pipeline.

    1. Go to Settings Settings > Process and contextualize > OpenPipeline > Metrics > Pipelines.
    2. Select Pipeline and enter the name Truck example.
    3. Select Save and close.
  2. Create a dynamic route.

    1. Go to Dynamic routing > Dynamic route.
    2. Define the dynamic route:
      • Name: Truck example route
      • Matching condition: matchesValue(metric.key, "truck.*") OR matchesValue(metric.key, "container.*")
      • Pipeline: Truck example
    3. Select Save.
  3. Give read and edit access to the team.

All truck and container metrics are routed to the pipeline. The team has access to the pipeline and can start configuring processing.

2. Add processed display names to records

Before node extraction, add processed display names as new fields to the records. These names will be used later as node names.

  1. Go to Settings Settings > Process and contextualize > OpenPipeline > Metrics > Pipelines > Truck example.
  2. Go to Processing > Processor and create two DQL processors.
  3. Define the first processor. This processor enriches records with the truck name.
    • Name: Truck name enrichment
    • Matching condition: matchesValue(metric.key, "truck.*")
    • DQL processor definition: fieldsAdd truckName = concat("Truck ", trucknr)
  4. Define the second processor. This processor enriches records with the container name.
    • Name: Container name enrichment
    • Matching condition: matchesValue(metric.key, "container.*")
    • DQL processor definition: fieldsAdd containerName = concat("Container ", containernr)
  5. Select Save.

Truck metrics carry a truckName field with values such as Truck 0123456789ABCDEF or Truck 9876543210XYZWMN while container metrics carry a containerName field.

3. Calculate truck ID on container metrics

Container metrics carry a trucknr metric dimension, which identifies the truck each container belongs to. In later steps, you'll extract nodes for trucks and containers and record the truck-container relationship as a static edge on the container node. To do so, the container metric needs to carry a truck Smartscape ID—without updating the truck node.

  1. In the Truck example pipeline, go to Smartscape node > Processor.
  2. Enter the following values:
    • Name: Truck for relationship
    • Matching condition: matchesValue(metric.key, "container.*")
    • Node type: CUSTOM_TRUCK. The Node ID field name is automatically created (dt.smartscape.custom_truck).
    • ID component: nr
    • Referenced field name: trucknr
  3. Select Add.
  4. Make sure Extract node is turned off. The processor calculates the Smartscape ID and adds it to the metric, without generating a node event.
  5. Select Save.

Container metrics now carry dt.smartscape.custom_truck, ready to be referenced as a static edge in the next step.

4. Extract container nodes

Extract a container node from every container metric, using the containerName field derived in the Processing stage as the display name, and link it to its truck via a static edge using the dt.smartscape.custom_truck ID calculated in the previous step.

  1. Go to Smartscape node > Processor.
  2. Enter the following values:
    • Name: Container full
    • Matching condition: matchesValue(metric.key, "container.*")
    • Node type: CUSTOM_CONTAINER. The Node ID field name is automatically created (dt.smartscape.custom_container).
    • ID component: nr
    • Referenced field name: containernr
  3. Select Add.
  4. Turn on Extract node.
  5. Select Field name and define the fields to extract.
    • Node name: containerName
    • Fields name: nr
    • Referenced field name: containernr
  6. Select Add.
  7. Define the static edge.
    1. Select Pre-defined and choose belongs_to.
    2. Enter CUSTOM_TRUCK in the CUSTOM_NodeType field. The Referenced field name is automatically created (dt.smartscape.custom_truck).
  8. Select Save.
  9. Make sure this processor is placed after the Truck for relationship processor, which calculates the truck ID referenced by the container node static edge.

Each container node is extracted and linked to its truck via a static belongs_to.CUSTOM_TRUCK edge.

5. Extract truck-model nodes

Truck metrics include a model dimension. Extract each unique model as a CUSTOM_TRUCK_MODEL node. This step also makes dt.smartscape.custom_truck_model available on truck metrics, which the next step references as a static edge.

  1. Go to Smartscape node > Processor.
  2. Enter the following values:
    • Name: Truck model for relationship
    • Matching condition: matchesValue(metric.key, "truck.*")
    • Node type: CUSTOM_TRUCK_MODEL. The Node ID field name is automatically created (dt.smartscape.custom_truck_model).
    • ID component: model
    • Referenced field name: model
  3. Select Add.
  4. Turn on Extract node.
  5. Select Field name and enter model in the Node name field.
  6. Select Save.

A CUSTOM_TRUCK_MODEL node is created for each distinct model value, for example, company-model_1 and company-model_2.

6. Extract truck nodes

Extract a truck node from every truck metric, holding the truck number and name, and link it to its model via a static edge using the dt.smartscape.custom_truck_model ID calculated in the previous step.

  1. Go to Smartscape node > Processor.
  2. Enter the following values:
    • Name: Truck full
    • Matching condition: matchesValue(metric.key, "truck.*")
    • Node type: CUSTOM_TRUCK. The Node ID field name is automatically created (dt.smartscape.custom_truck).
    • ID component: nr
    • Referenced field name: trucknr
  3. Select Add.
  4. Turn on Extract node.
  5. Select Field name and enter truckName in the Node name field.
  6. Define two fields to extract.
    1. Enter the field name model and the referenced field name model.
    2. Select Add.
    3. Enter the field name nr and the referenced field name trucknr.
    4. Select Add.
  7. Define the static edge.
    1. Select Pre-defined > instance_of.
    2. Enter CUSTOM_TRUCK_MODEL in the CUSTOM_NodeType field. The Referenced field name is automatically created (dt.smartscape.custom_truck_model).
  8. Select Save.

Each truck node is extracted with its display name and custom fields, and linked to its model via a static instance_of.CUSTOM_TRUCK_MODEL edge.

7. Extract dynamic edges between trucks and containers

The previous processors calculated the Smartscape IDs, dt.smartscape.custom_truck and dt.smartscape.custom_container, and added them to all container records. Container metrics carry both container and truck information and so, both Smartscape IDs are present on the same record, allowing the edge processor to extract a dynamic edge between the two nodes.

  1. In the Truck example pipeline, go to Smartscape edge > Processor > Smartscape edge.
  2. Enter the following values:
    • Name: Truck and container from container metric
    • Matching condition: matchesValue(metric.key, "container.*")
    • Source type: CUSTOM_TRUCK. The Source ID field name is automatically created (dt.smartscape.custom_truck).
  3. Select Pre-defined and choose contains.
  4. Enter CUSTOM_CONTAINER in the Target type field. The Target ID field name is automatically created (dt.smartscape.custom_container).
  5. Select Save.

For every container metric, OpenPipeline records a dynamic CUSTOM_TRUCK contains CUSTOM_CONTAINER edge.

8. Verify your custom topology
  • Query nodes and relationships in Notebooks.

    1. Go to Notebooks Notebooks and open a new notebook.

    2. Select > DQL.

    3. Query all extracted truck nodes:

      smartscapeNodes CUSTOM_TRUCK
      | fields id, name, model
    4. Query truck model nodes:

      smartscapeNodes CUSTOM_TRUCK_MODEL
      | fields id, name
    5. Traverse from trucks to the containers they carry (dynamic edge):

      smartscapeNodes CUSTOM_TRUCK
      | traverse contains, CUSTOM_CONTAINER
      | fields truck = sourceName, container = targetName

      Smartscape edges can't be filtered or listed independently. You can only access them in the context of a source or target node using traverse.

    You can see your custom nodes and traverse both static and dynamic relationships.

  • Explore topology in Smartscape.

    1. Open the Smartscape app in Dynatrace.
    2. Use the Segment selector and choose Entity type.
    3. Select CUSTOM_TRUCK to view the truck instances and their connected containers and models.

Congratulations!

You've defined custom topology using a single pipeline. Here's what you accomplished:

  • Enriched metrics with display names in the Processing stage, before node extraction.
  • Extracted CUSTOM_TRUCK, CUSTOM_TRUCK_MODEL, and CUSTOM_CONTAINER nodes in the Smartscape node stage.
  • Calculated a truck Smartscape ID on container metrics without generating a node event, and used the ID as a static edge reference.
  • Stored stable node properties (truck model, truck number) and defined static edges (instance_of, belongs_to) directly from the node extraction processors.
  • Extracted a dynamic contains edge between trucks and containers in the Smartscape edge stage.
  • Routed metric streams to the same pipeline with a single dynamic route.
Related tags
Dynatrace PlatformOpenPipelineOpenPipeline