Documentation Index

Fetch the complete documentation index at: https://kb.vastdata.com/llms.txt

Use this file to discover all available pages before exploring further.

Implementing a VAST DataEngine Pipeline

Prev Next

VAST DataEngine enables you to assemble pipelines to implement your business logic through an interplay of runtime features, function code and invocation flows.

Implementing pipeline capabilities with VAST DataEngine is a shared process split between your function code and the platform interface. Awareness of both the platform capabilities and the developer ergonomics will help you decide how you want to construct your pipeline and save you time authoring your code.

DataEngine handles orchestration, routing, and visualization through platform features that rely on what your code explicitly exposes—such as structured return flags, custom metrics, and formatted logs. The runtime SDK provides built-in conveniences that help you author your code to support and enable the platform features.   

You will want to author your function code with awareness of downstream platform capabilities as well as the runtime SDK's built-in conveniences. These cross-domain features save you work in the authoring of the code as well as the building of the end to end data pipeline.

Basic Event Processing in a DataEngine Pipeline

A DataEngine pipeline watches for and consumes events, and then routes and processes those events through a flow of functions that you design according to your business logic.

A configurable resource called a trigger watches for the initial events. Each consumed event is wrapped in a `VastEvent` object, formatted according to the CloudEvents v1.0 specification standard. The object format provides convenient access to event properties.  

Functions at all stages of a pipeline receive events in this format. Functions are invoked according to how you route them in the pipeline. Any given function in the pipeline may be invoked directly by a trigger, receiving the initial events, or it may be invoked by another function that has already received triggered events, processed them, and returned them for further processing.

Implementation of basic event processing is split across domains as follows:

Domain

Tasks

Tool(s)

Useful Links

Platform

Build, test, and push the function image.

DataEngine CLI

Prepare the Function Image in the Container Registry

Code

Author the function code

  • Author the code for each function you want to deploy in your pipeline. Follow the SDK runtime structure for valid DataEngine code. Use runtime functions, helpers and decorators to support and enable platform features.

  • Implement event handling using event attributes from the CloudEvent structure.

DataEngine Runtime SDK

Event Handling

Event Class References

Platform

  • Create triggers. These define the way events are created before they are processed by the pipeline. A trigger is a construction element that you can use and reuse in pipeline construction.

  • Create a resource for each function you want to deploy. The manageable function resource references the function image in the container registry, references assets such as secrets to be accessed by the function, and tracks revisions. A function is another construction element that you can use and reuse in pipeline construction.

  • Create a resource for the pipeline. The manageable resource contains the pipeline you build, which you can save in draft form, modify and deploy and otherwise manage.

DataEngine GUI/CLI/API

Creating a Trigger

Creating a DataEngine Function

Create the Pipeline Resource

Platform

Build the pipeline.

A visual builder helps you easily:

  • Construct flows that route events from triggers to functions and from functions to functions.

  • Configure environmental deployment conditions for the entire pipeline and for each function invocation.

DataEngine GUI (Visual Builder + Yaml)

DataEngine API/ CLI - Yaml only.

Build the Pipeline

Triggering Events

In order to capture events for processing through your pipeline, you use triggers. A trigger is a resource that watches for a defined type of event and sends structured events, formatted as cloud events, to an event broker topic. VAST DataEngine enables you to create two types of triggers:

  • Element triggers. These triggers watch for events where elements are added or removed from a view or where tags are added or removed from elements in a view. An element is a unit of data. A view is an access point to a storage path which can be exposed to several protocols. In this case, the view can be exposed as an S3 bucket or an NFSv4 export. Elements can be accessed as S3 objects or as NFSv4 files. For S3 bucket-views, an element trigger can also watch for the adding and/or removal of metadata tags.

  • Schedule triggers. These triggers issue events on a schedule.

The CloudEvent structure has generic attributes and attributes that vary depending on the type of trigger or the function from which the event is received. You can access these attributes from your function code.

Each trigger type inserts some specific attributes into the event structure.

Implementation of triggers is split across domains as follows:

Domain

Tasks

Tool(s)

Useful Links

Code

Implement event handling in your code based on trigger type and associated event attributes.

DataEngine Runtime SDK

Event Handling

Class Reference

Platform

Create, configure and manage triggers.

DataEngine GUI/CLI/API

Creating a Trigger

Managing Triggers

Platform

Add triggers to your pipeline in the visual builder. Route triggers to functions.

DataEngine GUI (Visual Builder + Yaml)

DataEngine API/ CLI - Yaml only.

Build the Pipeline

Example CloudEvent Objects

A CloudEvent with standard attributes:

Note

In raw CloudEvent JSON payloads, the partition key extension attribute is named "partitionkey" (without underscores, per CloudEvent specification conventions). When accessing this field in Python code using the DataEngine SDK, use the property event.partition_key.

{
  "specversion": "1.0",
  "id": "unique-event-id",
  "source": "vastdata.com:TriggerType.trigger-id",
  "type": "vastdata.com:TriggerType.SubType",
  "subject": "broker-name.topic-name",
  "time": "2026-03-22T10:30:00.123Z",
  "datacontenttype": "application/json",
  "partitionkey": "partition-value",
  "data": {
    "message": "event payload"
  }
}

A CloudEvent produced by an element trigger:

{
  "specversion": "1.0",
  "id": "abc123def456",
  "source": "vastdata.com:Element.my-trigger-id",
  "type": "vastdata.com:Element.ObjectCreated",
  "subject": "kafka-broker.my-topic",
  "time": "2026-03-22T10:30:00.123Z",
  "datacontenttype": "application/json",
  "elementpath": "my-bucket/path/to/object.txt",
  "partitionkey": "my-bucket/path/to/object.txt",
  "data": {
    "bucket": "my-bucket",
    "key": "path/to/object.txt"
  }
}

A CloudEvent produced by a schedule trigger:

{
  "specversion": "1.0",
  "id": "def456ghi789",
  "source": "vastdata.com:Schedule.my-schedule-trigger",
  "type": "vastdata.com:Schedule.TimerElapsed",
  "subject": "kafka-broker.schedule-topic",
  "time": "2026-03-22T10:30:00.123Z",
  "datacontenttype": "application/json",
  "cronschedule": "0 * * * *",
  "timerelapsedtimestamp": "2026-03-22T10:00:00.000Z",
  "partitionkey": "schedule-key",
  "data": {
    "message": "Scheduled execution"
  }
}

A CloudEvent returned by a function:

{
  "specversion": "1.0",
  "id": "ghi789jkl012",
  "source": "vastdata.com:upstream-function-name",
  "type": "vastdata.com:Function",
  "subject": "kafka-broker.function-topic",
  "time": "2026-03-22T10:30:00.123Z",
  "datacontenttype": "application/json",
  "partitionkey": "partition-value",
  "data": {
    "result": "output from upstream function",
    "processed_count": 42
  }
}

Event Logging

The runtime provides an embedded OpenTelemetry logger that you can use in your function code to log events attributes and define their severity.Logs and Traces

Logs generated by the embedded logger in deployed functions can be accessed by the DataEngine interfaces. Specifically, they are displayed in the VAST DataEngine GUI.

Event Tracing

The runtime provides an embedded OpenTelemetry tracer that you can use in your function code to generate telemetry traces. In your function code, you can explicitly wrap key operations that you want to monitor, and you can tag spans with metadata.Logs and Traces

Traces generated by the embedded tracer in your functions can be visualized by the DataEngine API.

The DataEngine GUI visualizes the traces as waterfall graphs and flame charts, and enables you to inspect nested spans. It also lets you inspect traces associated with specific logs and vice versa.

Secrets and Environment Variables

VAST DataEngine supports storing key-value pairs for functions to access at runtime. These are supported as secrets for sensitive credentials and environment variables for non sensitive configurations. Secrets are stored with encryption and made available at runtime. They can be entered or uploaded when you configure the pipeline or per function deployment when you build the pipeline. Environment variables can be stored in the configuration of the pipeline or per function deployment when you build a pipeline.

Both secrets and environment variables can be made available to all functions in a pipeline or to specific function deployments within a pipeline.

The VAST DataEngine GUI accepts YAML file uploads to bulk-import environment variables and secrets into pipeline configurations or into specific function deployments. Alternatively, the GUI enables you to enter each key-value pair. If you are reusing common variables for multiple pipelines and functions, you will find the file upload option more practical.

implementation is split across domains as follows:

Domain

Tasks

Tool(s)

Useful Links

Code

Author your function code to access secrets inside init(ctx) or handler(ctx, event). Secrets are available as a nested dictionary on ctx.secrets.

Your function can read environment variables from `os.environ`.

DataEngine Runtime SDK

Accessing Secrets and Environment Variables

ctx Class Reference

Platform

Configure or upload specific secrets and environment variables that you want the runtime to provide to a specific function deployment and/or to the entire pipeline for all function deployments.

DataEngine GUI/CLI/API

Working with Secrets and Environment Variables

Batch Event Processing

Batch event processing allows your DataEngine functions to aggregate incoming events and process them in a single execution instance. Batch event processing can help you control the pace of invocations and reduce the resources required to process events. This pattern is ideal for reducing high-overhead operations—such as bulk database writes, vector database indexing, or external multi-payload HTTP requests (e.g., LLM batch inference).

Batch event processing is configurable for each function deployment in each pipeline. When it is enabled for a given function deployment, incoming events are accumulated based on an event count threshold or a time window, whichever occurs first. The runtime invokes the function, passing a batch object to the function containing all the events that were accumulated before one of the thresholds was reached.

The function must be coded to return a list of processed events, which DataEngine dispatches downstream individually. Subsequent functions in the pipeline can buffer and re-batch events according to their own batch settings.

Traces of event batches are visualized in the traces page of the DataEngine UI, as well as the individual events in the batch. Batches have their own trace IDs.

Implementation of batch event processing is split across domains as follows:

Domain

Tasks

Tool(s)

Useful Links

Function code

Author your function code to accept a batch of events, iterate through them and return a list of events. The returned events can then be routed to the next function in the pipeline.

DataEngine Runtime SDK

Event Handling

ctx Class Reference

Platform

Configure batch processing for each function deployment.

For each function deployment, you configure two thresholds for batch accumulation:

  • Batch Size. A number of events to accumulate. By default, this is 1, which means events are not batched.

  • Batch timeout. An amount of time to wait until invoking the function. By default, this is 0, which means that the function is invoked as soon as an event is produced by the previous trigger or function in the flow.

Whenever either of these thresholds is reached, the function is invoked.

DataEngine GUI/CLI/API

Note

When automating pipelines through the DataEngine CLI or API, use the following property names in the manifest yaml file: event_batching.batch_max_size, event_batching.batch_timeout_ms.

Configure Function Deployment

Conditional Routing

Data pipelines can require differentiated flows based on various event related criteria and complex logic. The VAST DataEngine runtime supports this complexity with a conditional function routing feature, where you can use event trigger labels to route events conditionally from function to function.

You do this by setting trigger labels on events in a function's code and applying labels to the connectors that route events to other functions in the pipeline for further processing.

Domain

Tasks

Tool(s)

Useful Links

Function code

Define and set trigger labels on events.

DataEngine Runtime SDK

Event Handling

ctx Class Reference

Platform

Apply defined trigger labels to function to function connectors in the pipeline.

DataEngine GUI/CLI/API

Apply Event Trigger Labels (Conditional Function Routing)

Custom Metrics

The custom metrics feature lets you emit custom metrics, retrieve them and visualize them. The runtime SDK wraps an OpenTelemetry metrics handler for four type of custom metrics.

Domain

Tasks

Tool(s)

Useful Links

Function code

Initialize each custom metric in the init() function. In the handler function, define how to measure the metrics.

DataEngine Runtime SDK

Collecting Custom Metrics

ctx Class Reference

Platform

Once the metrics are emitted in a deployed pipeline, you can choose how to visualize them and add custom metrics graphs to the dashboard.

DataEngine GUI/CLI/API

Dashboard Analytics