# Send OpenLineage Events

The **Send OpenLineage Events** action forwards data lineage events from your Data Platform project to an external lineage solution connected via the [OpenLineage consumer](/en/product/connectors/consumers/openlineage/index). It reads lineage events recorded by the platform and pushes them to your lineage backend using the [OpenLineage](https://openlineage.io/) standard.

![open-lineage-events](picts/send-open-lineage-action.png)

?> Before using this action, you must configure an [OpenLineage consumer](/en/product/connectors/consumers/openlineage/index) in the Connectors to define where events should be sent.

- [Prerequisites](#prerequisites)
- [Create a Send OpenLineage Events action](#create-a-send-openlineage-events-action)
- [Execution modes](#execution-modes)
  - [Cron job](#cron-job)
  - [Always-up](#always-up)

---

## Prerequisites

1. You have an external lineage solution with an OpenLineage-compatible HTTP API (e.g. [Marquez](https://marquezproject.ai/)).
2. You have configured an [OpenLineage consumer](/en/product/connectors/consumers/openlineage/index) with the endpoint URL and auth token of your lineage backend.

---

## Create a Send OpenLineage Events action

1. Navigate to the **Actions** tab in the Data Processing Engine.
2. Click **New action**.
3. Select **Send OpenLineage Events** from the action store.

This action requires no additional configuration. It automatically reads the endpoint and authentication token from your [OpenLineage Consumer](/en/product/connectors/consumers/openlineage/index.md) settings and uses them to forward events.

### How it works

Once triggered, the action processes all events stored in the `queued/` folder of the **DWH Bucket** and sends them to the configured OpenLineage endpoint.

### File handling

- **Successful sends**:  
  - If `keep events` is set to `true` in the [OpenLineage Consumer](/en/product/connectors/consumers/openlineage/index.md), successfully sent files are moved to the `success/` folder in the DWH Bucket.  
  - Additionally, a summary log file is created under `openlineage/events/success/log/`.

- **Errors**:  
  In case of failure, the events are moved to the `error/` folder, and a detailed log file is generated under `error/logs/` containing more information about the error.

---

## Execution modes

You can run the *Send OpenLineage Events* action in two ways depending on how frequently you want your lineage solution to be updated.

### Cron job

Schedule the action to run at a fixed interval using a cron expression. This is the recommended mode for most use cases where near-real-time lineage is not required.

To configure a cron schedule, open the action's **Settings** tab and set the trigger to **Cron**. Enter your desired cron expression (e.g. `0 * * * *` for every hour).

?> See [Time-Based Trigger configuration](/en/product/dpe/actions/settings/index?id=time-based-trigger) for more details on scheduling jobs.

### Always-up

Set the action to run continuously as a long-running process. In this mode the action stays active and forwards lineage events as soon as they are produced, keeping your lineage solution in near real time sync with Data Platform.

To enable always-up mode, open the action's **Settings** tab and set the trigger to **Always up**.

!> Always-up actions consume compute resources continuously. Use this mode only when near real-time lineage is a requirement.

---

### Need help? 🆘

> At any step, you can create a ticket to raise an incident or if you need support at the [OVHcloud Help Centre](https://help.ovhcloud.com/csm/fr-home?id=csm_index). Additionally, you can ask for support by reaching out to us on the Data Platform Channel within the [Discord Server](https://discord.com/channels/850031577277792286/1163465539981672559). There is a step-by-step guide in the [support](/en/support/index.md) section.
