Ingestion workflows
An ingestion workflow moves metadata from a connected service into OpenMetadata. It combines source extraction with optional record processing and staging before it publishes the result. A workflow can run from a local configuration or from a scheduled or manually triggered Airflow pipeline.
This page explains the workflow life cycle. See Metadata ingestion for the wider ingestion model, Ingestion connectors for source-specific behavior, and Airflow ingestion integration for the Airflow service boundary.
Workflow model
An ingestion workflow is a run of a configured pipeline. The pipeline identifies the source service, the kind of work to perform, the OpenMetadata server, and the execution policy. The run then turns source records into published OpenMetadata entities or other workflow results.
Pipeline roles
The workflow has one source and one publishing path. Optional processing and staging steps sit between them when the workflow needs to change records or collect data before a bulk write.
| Role | Purpose |
|---|---|
| Source | Connects to the named service and yields records for the run. |
| Processor | Changes or filters one record before the next step receives it. |
| Stage | Stores or prepares records for a later bulk operation. |
| Sink | Publishes one processed record at a time. |
| Bulk sink | Publishes the staged result after source iteration finishes. |
Metadata, lineage, usage, profiler, dbt, test suite, application, and related pipeline types use the same workflow shape where their work fits that model. The selected pipeline type chooses the workflow behavior while the source connector supplies service-specific extraction.
References: openmetadata-spec/…/workflow.json• L89-170 openmetadata-spec/…/ingestionPipeline.json• L10-15 openmetadata-airflow-apis/…/registry.py• L14-49
Execution context
Each run uses one OpenMetadata client and one run identifier. The client is the typed boundary between the workflow and the OpenMetadata server. It publishes entities, pipeline state, progress, operation metrics, and logs through the same authenticated connection. The run identifier links live progress, final status, logs, and run history to the same execution.
The workflow starts streamable logs before it emits the server-version message when a pipeline FQN, run ID, and log streaming setting are present. It also sets the operation-metric run context before it marks the pipeline as running. This gives status, logs, and metrics one shared identity from the start of execution. BaseWorkflow builds a stable ingestion user agent with the client version when available, while retaining a stable fallback when version lookup fails.
When the source configuration does not include a service connection, the workflow can load the connection from the named service in OpenMetadata. This lets deployed pipelines keep connection details with the service record instead of copying them into every run configuration.
References: ingestion/…/base.py• L100-161 ingestion/…/client.py• L178-209 ingestion/…/client.py• L214-245 ingestion/…/client.py• L247-418 ingestion/…/client.py• L420-517 ingestion/…/http_adapter.py• L12-94 ingestion/…/client_utils.py• L29-65 ingestion/…/ometa_api.py• L255-346 ingestion/…/ingestion_pipeline_mixin.py• L38-100
Workflow configuration
The workflow configuration describes both the work and the place where it reports results. The schema accepts YAML or JSON and rejects unknown fields so that a misspelled setting does not silently change the run.
Configuration layers
The configuration has three main layers. The source layer selects the connector and its extraction mode. The step layer selects record handling and publishing. The workflow layer controls the OpenMetadata server and run policy.
| Layer | Main concern | Typical values |
|---|---|---|
| Source | What service to read and what kind of ingestion to perform | Connector type, service name, source configuration |
| Steps | How records move to the result | Processor, stage, sink, or bulk sink |
| Workflow | How the run connects and reports | Server connection, log level, success threshold, run identity |
For a metadata run, MetadataWorkflow requires a service name, prepares the source, and creates the metadata REST sink. Other workflow types can add their own step choices while retaining the same workflow contract.
References: openmetadata-spec/…/workflow.json• L211-272 ingestion/…/metadata.py• L24-69 ingestion/…/bigquery.yaml• L1-34
Configuration validation
Validation happens before extraction. The parser first validates the full workflow and then checks the service connection, any nested connection, the source configuration, and the workflow settings when it needs to explain a validation failure. Initialization errors include a suitable example configuration and a link for the selected pipeline type.
This order matters because a workflow can fail before it has a source or a status record. A clear configuration error is then the main diagnostic output rather than a partial run report.
References: ingestion/…/parser.py• L382-470 ingestion/…/parser.py• L511-557 ingestion/…/workflow_init_error_handler.py• L54-78
Workflow execution
Execution prepares the source and steps before it reads any records. It then passes records through the configured path, closes each step to flush pending work, and records the final result.
Staged extraction and publishing
The normal record path is a streaming path. The source yields one record at a time, and each configured processor, stage, or sink receives the record that the prior step returned. A stage records work for a later bulk sink rather than passing its stored result to the next step. This supports workflows that must gather or transform data before one final publish operation.
The following diagram shows the two supported publishing paths.
flowchart LR
S[Source] --> P[Optional processor]
P --> T[Optional stage]
T --> K[Sink]
T --> B[Bulk sink]
K --> O[OpenMetadata result]
B --> O
The workflow closes its steps before it builds the final summary. This flushes buffered sink work before the run reports counts. Step closure is guarded so normal execution and stop handling do not flush the same step twice. A step close error is logged and does not prevent the workflow from attempting terminal status reporting.
References: ingestion/…/ingestion.py• L156-179 ingestion/…/steps.py• L34-115 ingestion/…/step.py• L196-243 ingestion/…/base.py• L171-223 ingestion/…/base.py• L337-369
Usage workflow
The usage workflow turns service usage records into usage data in OpenMetadata. It keeps the source separate from a processor, a stage, and a bulk sink so it can transform and collect usage records before publishing them as one batch.
The workflow requires a service name. It also passes the source service type to the processor and to the usage bulk sink. This lets the final sink resolve usage records against the correct table service. If the service connection does not identify its type, the workflow stops before publishing because table resolution would be unsafe.
References: ingestion/…/usage.py• L29-59 ingestion/…/usage.py• L61-98
Profiler workflow
The profiler workflow uses the common ingestion path to collect profiling data for an OpenMetadata source. Before it creates its source and steps, it tests the service connection and prepares SSL settings when needed. It then combines a profiler processor with the configured sink. Its success threshold is fixed at 80 percent so a run can complete with limited record errors while still failing when too much profiling work is unsuccessful.
References: ingestion/…/profiler.py• L30-63 ingestion/…/profiler.py• L65-92
Metadata lookups and usage publishing
Some ingestion work needs to match extracted records with entities that already exist in OpenMetadata. The client supports searches by fully qualified name, exact alias, container path, and filtered pages. It then resolves search hits to typed entities through the OpenMetadata API, so a search result can enrich lineage or other publishing work without becoming the stored entity by itself.
For a fully qualified name lookup, the resolver can request a bounded set of active candidates before it loads entity details. It rejects incomplete responses and candidate sets that exceed the configured limit. Its cached matches belong to one workflow run, so one run does not reuse entity resolution from another run.
Exact alias matching helps lineage use the intended table when names are similar. Page searches continue from stable sort values so a workflow can process large result sets without loading them all at once. Search failures can leave enrichment incomplete even when the source records publish successfully.
Usage ingestion follows the same boundary. A query is associated with its service and a stable query identity, then linked to the table or dashboard that used it. Query cost data is attached when the matching query exists.
References: ingestion/…/es_mixin.py• L124-371 ingestion/…/es_mixin.py• L387-515 ingestion/…/engine.py• L30-153 ingestion/…/query_mixin.py• L50-113 ingestion/…/query_mixin.py• L136-170
Run lifecycle
When a run starts, the workflow creates or finds the related ingestion pipeline when a pipeline FQN is present. It marks the run as running, starts progress reporting, and sends an initial discovery update before the first timer interval. During extraction it reports step counts and live progress at a fixed interval.
When the work ends, the workflow closes steps, determines a pipeline state, sends the step summary and terminal progress update, prints a local summary, and closes the client and reporting resources. An unexpected exception marks the run as failed while still attempting to persist the terminal status. The streamable log handler is cleaned up after the other terminal emitters so final messages remain captured.
References: ingestion/…/base.py• L293-369 ingestion/…/base.py• L460-538 ingestion/…/workflow_status_mixin.py• L83-147 ingestion/…/workflow_status_mixin.py• L188-232
Scheduling and invocation
A workflow can be started by a local command, by an Airflow schedule, or by an explicit trigger. The execution path is the same after the runner creates the workflow configuration.
Local invocation
The ingestion command loads a YAML or JSON file, builds a metadata workflow, and executes it. This path is useful for development, one-time runs, and external schedulers that call the ingestion process directly. It does not require an Airflow DAG to exist.
References: ingestion/…/ingest.py• L20-47 ingestion/…/common.py• L18-26
Airflow scheduling
An IngestionPipeline stores the schedule and run limits that Airflow uses. Deployment validates the pipeline, writes a protected configuration for the generated DAG, imports the DAG, and refreshes Airflow so the scheduler can see it. The DAG builder selects a builder for the pipeline type and creates a task that invokes the ingestion workflow.
Schedule settings control the cron interval, start and end dates, time zone, catch-up behavior, active runs, task concurrency, retries, retry delay, and workflow timeout. Pausing the pipeline prevents it from running after deployment until it is enabled again.
References: openmetadata-spec/…/ingestionPipeline.json• L58-130 openmetadata-airflow-apis/…/deploy.py• L76-104 openmetadata-airflow-apis/…/deploy.py• L176-187 openmetadata-airflow-apis/…/workflow_factory.py• L43-86 openmetadata-airflow-apis/…/workflow_builder.py• L25-56
Manual invocation
The UI or another caller can trigger a deployed DAG without waiting for its schedule. The trigger service passes an optional run ID and configuration to Airflow and assigns the current time as the logical execution time. The UI also exposes deploy, enable or disable, kill, and run-history actions through the ingestion pipeline API.
References: openmetadata-airflow-apis/…/trigger.py• L51-75 openmetadata-airflow-apis/…/trigger.py• L32-68 openmetadata-ui/…/ingestionPipelineAPI.ts• L90-127 openmetadata-ui/…/ingestionPipelineAPI.ts• L161-183
Status and failure reporting
The workflow reports both a live view and a durable run result. Live updates help an operator see that work is progressing. The final status stores the state, time range, run ID, step summaries, and selected run context on the ingestion pipeline.
Pipeline states
The pipeline state describes the result of the whole run. Step status provides the detail needed to explain that result.
| State | Meaning |
|---|---|
running | The workflow has started and is processing. |
success | The run completed within its success policy. |
partialSuccess | The run completed with some errors but met the configured threshold. |
failed | An unhandled failure occurred or a step fell below the success threshold. |
stopped | The run was stopped before normal completion. |
queued | The run is waiting for execution. |
The workflow creates a run ID from the supplied pipeline run ID or generates one when no ID was supplied. If no ingestion pipeline FQN is available, the workflow can still run, but it does not persist pipeline status or live progress for that run.
References: openmetadata-spec/…/ingestionPipeline.json• L16-56 ingestion/…/workflow_status_mixin.py• L83-147 ingestion/…/workflow_status_mixin.py• L188-232 ingestion/…/ingestion_pipeline_mixin.py• L38-100
Progress and summaries
During a run, the status timer reports records processed, records updated, filtered records, and errors for each step. When progress tracking is available, the server also receives counters, total assets, estimated time remaining, and operation metrics. These updates use the pipeline FQN and run ID so a viewer can follow one execution.
The final step summary includes counts, warnings, errors, filtered records, failures, progress data, operation metrics, and source or processing time when available. Local output prints the same step-level view. Status rendering limits each displayed list to 1,000 items and truncates each stored error or stack trace field to 1,000,000 characters, while preserving total-item information for large lists. A workflow can also write a JSON status file with source type, pipeline FQN, overall success, and per-step status for callers that need a local result artifact.
Progress and operation-metric delivery is best effort. A failed update is logged for diagnosis but does not replace the workflow result. Run logs use a separate server-backed stream that can send batches, retry delivery, compress large payloads, and close the stream when the run ends.
References: ingestion/…/base.py• L460-538 ingestion/…/status.py• L30-63 ingestion/…/status.py• L108-158 ingestion/…/workflow_status_mixin.py• L163-224 ingestion/…/step.py• L95-140 ingestion/…/workflow_output_handler.py• L78-152 ingestion/…/progress_mixin.py• L37-106 ingestion/…/logs_mixin.py• L35-183 ingestion/…/client.py• L489-517
Failure handling
Most record-level errors are captured in the status of the step that found them, so the workflow can continue and report a useful total. A fatal step error or an unhandled workflow exception stops normal processing. Airflow also has a failure callback that marks the related pipeline run as failed when a task fails or is killed outside the normal workflow path.
The success threshold separates tolerated record errors from a failed run. The raiseOnError setting then controls whether the runner raises after the run has reported its status. This means a caller can retain the status and logs while choosing whether the process itself should return an error.
References: ingestion/…/step.py• L34-40 ingestion/…/step.py• L149-193 ingestion/…/base.py• L247-285 ingestion/…/common.py• L21-26 openmetadata-airflow-apis/…/common.py• L318-360
Change checklist
When these files or sections are changed, remember to consider these:
- Keep the workflow schema, generated workflow types, and the parser's source-config map aligned. A new source-config type must be accepted by validation before a workflow can create it.
- Keep each
PipelineTyperegistered with an Airflow DAG builder. A valid pipeline entity without a builder cannot be deployed. - Preserve the relationship between
ingestionPipelineFQN,pipelineRunId, progress updates, final status, logs, and run-history queries. Changing one identifier shape can split one run across several views. - Keep the workflow user-agent fallback stable and separate from workflow result handling. A version lookup failure must not prevent client creation or change the run outcome.
- Keep streamable logging setup before startup messages and cleanup after terminal emitters. Changing that order can lose the first or last lines of a run.
- Keep step closure before status construction and keep closure idempotent. Otherwise buffered records can be omitted or written twice.
- Keep status list and stack-trace bounds compatible with the status schema and local summary output. A change can reintroduce oversized payloads or hide the total size of a result.
- Keep progress and operation-metric calls non-blocking for the workflow result. These reports improve observation but must not turn a completed extraction into a false ingestion failure.
- Keep log batch, retry, compression, and close behavior compatible with the server log stream contract. A mismatch can leave logs partial even when entity publishing succeeds.
- Keep FQN candidate, alias, container-path, index, result-count, active-entity, and pagination contracts aligned with entity lookup. A change to these contracts can skip, misidentify, or reject entities used by lineage enrichment.
- Keep query identity, masking, usage links, and cost records aligned. A change to one part can create duplicate query entities or stop cost data from attaching to the right query.
- Keep the Airflow task's failure callback and kill path able to build a client without starting the full workflow. This path covers failures before workflow initialization.
- Keep profiler connection testing ahead of profiler source creation. A connection or SSL change can otherwise move a service failure into the extraction phase.
- Keep the usage workflow's service-name and service-connection-type requirements aligned with its processor and bulk sink. A change can stop usage table resolution or publish usage against the wrong service type.
Important failure modes
| Trigger | Consequence | Guard |
|---|---|---|
| Missing or invalid source or service connection settings | The workflow does not initialize and cannot extract records. | Validate the source and connection sections before deployment or local execution. |
| The profiler connection test or SSL setup fails | The profiler workflow stops before it creates its source and processing steps. | Check service reachability and SSL settings from the execution host. |
| The usage source has no service name | Usage workflow creation fails before extraction. | Set the source service name in the workflow configuration. |
| The usage service connection has no type | Usage publishing cannot resolve the target table service safely. | Provide a service connection with a defined connection type. |
| The OpenMetadata client cannot reach the configured API, receives an HTML page, or finds an invalid server version | Client setup fails before source extraction. | Check the API URL from the execution host, confirm authentication, and keep client and server versions compatible. |
| A step close fails before the final summary | Buffered work may not appear in the step counts, although terminal status reporting still runs. | Inspect close warnings and sink output before treating the summary as complete. |
| Status lists or stack traces exceed the status bounds | Local output or status payloads omit detail from the displayed result. | Use the preserved item totals and inspect the run logs or source-side diagnostics for the full detail. |
| Progress, operation metrics, or log delivery fails while entity work continues | The run may finish with incomplete live detail or stored logs. | Treat these channels as best effort, then use local output, the status file, and the final step summary to diagnose the run. |
| A search index is unavailable, a candidate response is incomplete, or a candidate limit is exceeded | Lineage, query, or other enrichment lookups can return no usable entity or stop before a related entity is published while the main workflow may continue. | Check search service health, index mappings, candidate limits, and sort or cursor fields when enrichment is incomplete. |
The pipeline has no ingestionPipelineFQN | The workflow can run without durable pipeline status or live progress. | Provide the pipeline FQN for managed runs. |
A step's success falls below successThreshold | The persisted pipeline state becomes failed even if some records were processed. | Set the threshold to match the accepted error rate and inspect step summaries. |
| A task is killed or fails outside normal workflow cleanup | The normal terminal update may not run. | The Airflow failure callback sends a failed status for the known pipeline run. |
| A pipeline type has no registered Airflow builder | Deployment fails while generating the DAG. | Add the pipeline type and its DAG builder to the Airflow registry together. |
Key files
| File | Why to read it |
|---|---|
| openmetadata-spec/…/workflow.json | Defines the workflow shape and its source, step, and run-policy contracts. |
| ingestion/…/base.py | Shows the common run lifecycle, user-agent identity, cleanup, state choice, progress timing, and local status artifact. |
| ingestion/…/status.py | Shows the status record, success calculation, failure bounds, and safe summary rendering. |
| ingestion/…/ingestion.py | Shows how a source and ordered steps process records. |
| ingestion/…/metadata.py | Shows the main metadata workflow from service source to REST publishing. |
| ingestion/…/usage.py | Shows the usage workflow's staged processing and service-aware bulk publishing. |
| ingestion/…/profiler.py | Shows profiler connection checks, source setup, profiler processing, sink selection, and its success policy. |
| ingestion/…/workflow_status_mixin.py | Shows how run status, summaries, and live progress reach OpenMetadata. |
| ingestion/…/ometa_api.py | Shows the typed OpenMetadata client boundary used by workflows and ingestion operations. |
| ingestion/…/client.py | Shows shared authentication, raw responses, retry, timeout, transport, and response handling for server calls. |
| ingestion/…/http_adapter.py | Shows the pooled HTTP transport, TCP keepalive, and safe-method transport retries used by the REST client. |
| ingestion/…/ingestion_pipeline_mixin.py | Shows how pipeline runs and status history are sent to and read from OpenMetadata. |
| ingestion/…/progress_mixin.py | Shows the live progress and operation-metric reporting boundary. |
| ingestion/…/logs_mixin.py | Shows the server-backed log stream and batch delivery boundary. |
| ingestion/…/es_mixin.py | Shows how ingestion searches for existing entities and resolves paged results for enrichment. |
| ingestion/…/engine.py | Shows how one execution scopes FQN matching and its resolution cache. |
| ingestion/…/query_mixin.py | Shows how query usage and query cost data attach to published entities. |
| openmetadata-spec/…/ingestionPipeline.json | Defines the durable pipeline record, Airflow schedule settings, and run states. |
| openmetadata-airflow-apis/…/common.py | Connects an ingestion pipeline record to an executable Airflow task and failure callback. |
| openmetadata-airflow-apis/…/workflow_builder.py | Maps a pipeline type to the Airflow DAG builder that executes it. |
| openmetadata-airflow-apis/…/deploy.py | Shows how a configured pipeline becomes a deployed and registered DAG. |
| openmetadata-ui/…/ingestionPipelineAPI.ts | Shows the control and observation actions exposed to the UI. |