Skip to main content
In this section, we provide guides and references to use the Prefect connector. The connector ingests flows as Pipelines, each flow’s tasks (from its most recent run) as Tasks, and flow run history as Pipeline Status. It connects to either Prefect Cloud or a self-hosted Prefect Server over the Prefect REST API. Configure and schedule Prefect metadata workflows from the OpenMetadata UI:

How to Run the Connector Externally

To run the Ingestion via the UI you’ll need to use the OpenMetadata Ingestion Container, which comes shipped with custom Airflow plugins to handle the workflow deployment. If, instead, you want to manage your workflows externally on your preferred orchestrator, you can check the following docs to run the Ingestion Framework anywhere.

External Schedulers

Get more information about running the Ingestion Framework Externally

Requirements

The Prefect connector reads flows, deployments, and run history through the Prefect REST API. It requires no database-level grants, access is controlled entirely by the credentials used to call the API. On Prefect Cloud, the API key must belong to a service account or user with at least Viewer access to the workspace identified by the Account ID and Workspace ID. On a self-hosted Prefect Server, if PREFECT_SERVER_API_AUTH_STRING is set, provide the same user:password value as the Basic Auth String; if the server has no auth enabled, leave it empty.

Python Requirements

We have support for Python versions 3.9-3.11
Prefect only depends on the requests library, which already ships with the base package. To run the Prefect ingestion, you will need to install:

Metadata Ingestion

All connectors are defined as JSON Schemas. Here you can find the structure to create a connection to Prefect. In order to create and run a Metadata Ingestion workflow, we will follow the steps to create a YAML configuration able to connect to the source, process the Entities if needed, and reach the OpenMetadata server. The workflow is modeled around the following JSON Schema

1. Define the YAML Config

This is a sample config for Prefect:

2. Run with the CLI

First, we will need to save the YAML file. Afterward, and with all requirements installed, we can run:
Note that from connector to connector, this recipe will always be the same. By updating the YAML configuration, you will be able to extract metadata from different sources.