View and stored procedure lineage in OpenMetadata

A practical guide to how OpenMetadata derives lineage from view definitions and stored procedures, what each database account needs, and where the parser stops and manual work begins.

On this page

How OpenMetadata derives lineage from views and stored procedures

When a warehouse holds many views and stored procedures that feed reports, the catalog cannot show those dependencies unless something reads the SQL behind them. OpenMetadata derives lineage from view definitions by parsing the SQL that its database connector extracts, so a team that needs to know which tables feed a view, and which dashboards depend on that view, should plan for this parsing step before relying on the lineage graph. The need is most acute before a schema change, a migration or an audit of which reports rely on which source tables.

The lineage that results is one input among several. OpenMetadata supports table, column, dashboard, pipeline and metric lineage, and it also accepts lineage events through its OpenLineage event integration. Parsed view lineage is a separate route from OpenLineage events: the first depends on the SQL the connector can read from the database, while the second depends on your pipelines emitting events. Teams should confirm which route covers each dependency they care about, because a view that is parsed correctly and a pipeline that emits events will both appear in the graph but come from different evidence.

Before you rely on the output, check three things in your own environment. Confirm that the database account used by the connector can read view definitions in each schema you plan to ingest, since the parser has nothing to work with otherwise. Run a sample of views with joins, subqueries and dialect-specific functions through the connector and compare the result with what your engineers know. Record which dependencies the parser misses, so they can be corrected through the lineage editor or the API rather than discovered later during an incident. Confirm the exact handling of stored procedures in the connector documentation for your database version, because support for procedure lineage varies by connector and should not be assumed.

Which lineage source fits which database object

This table compares the four ways lineage gets into OpenMetadata for database objects: view definitions, stored procedures, query logs and manual or API edits. Read each row for what the source captures, what it misses and who keeps it accurate. Confirm dialect-specific parsing behavior with your database and the connector documentation before relying on any automated source.

Lineage sourceWhat it capturesWhat it misses and who maintains it
View definitionsTable-to-view dependencies parsed from the view's SQL, usually at table and column level where the parser resolves namesDynamic SQL, unsupported syntax and objects outside the ingested scope are missed. The metadata connector maintains it on each ingestion run.
Stored proceduresLineage only where the connector and dialect support stored procedure parsing, which varies by database. Confirm this for your engineProcedure logic that writes through dynamic SQL, temporary objects or external calls may not appear. Your team must review unsupported procedures manually.
Query logsStatements actually executed against the database, including ad hoc and scheduled queries, when the connector reads query historyOnly what the database retains in its history, so older or truncated logs leave gaps. Access to query history depends on the permissions you grant.
Manual edits in the UIAny dependency a person can see, including procedures, scripts and tools that automated parsing cannot readNothing updates automatically, so edges drift when the source changes. The data owner or steward must maintain them.
Lineage API or Python SDKEdges pushed from in-house pipelines, schedulers or custom tools that run outside the databaseAccuracy depends on the code that emits the edges. Your platform or data engineering team owns the job and its failure alerts.

Database permissions each connector account needs

View and stored procedure lineage depends on what the ingestion account is allowed to read. Each category below is a set of read privileges that lets OpenMetadata parse definitions and metadata without gaining write or administrative access to the database.

Catalog metadata access

The ingestion account needs read access to the schemas, tables, views and columns it will catalog. Without this, OpenMetadata has no objects to attach lineage to, and view edges will point at nothing. Check that the account sees every schema in scope, not only the ones your team uses day to day, because a missing schema often shows up later as a lineage gap rather than an error. Grant read metadata access only, and confirm the exact list in the connector documentation for your database.

OpenMetadata security docs

View definition access

Lineage from views comes from the SQL that defines them, so the account must be able to read view definitions. Some databases expose these only to owners or to accounts with broader catalog rights. Test with a single known view before running a full extraction, and confirm that the definition text, not just the view name, is returned to the account.

Procedure source access

Stored procedure source is read through the database catalog, and access rules differ by engine. An account that can see a procedure's name may still be unable to read its body. Before you plan procedure lineage, confirm with your DBA which procedures the account can read, and whether any procedures are wrapped, encrypted or defined outside the database where OpenMetadata cannot parse them.

Query history access

Some lineage comes from logged queries rather than stored definitions, so the account may need read access to query history or audit views. This is often the broadest grant in the set. Ask whether query history can be limited to the databases in scope, and whether it contains personal data or sensitive literals that your governance team must approve before ingestion.

Dedicated service account

Create one service account per database connection, used only by OpenMetadata ingestion, and do not share it with BI tools, notebooks or people. This keeps audit logs attributable and lets you rotate or disable the account without affecting other workloads. Store its credentials in your secrets system, not in connector configuration files that others can read.

Broader grants add risk

Granting write, DDL or administrator rights to make lineage work is rarely needed and widens what a compromised ingestion host can change. Review each grant against the connector documentation, remove any that are not on the list, and record the approved grant set with your security team. Re-review it after each OpenMetadata upgrade, since connector requirements can change between releases.

Setting up view lineage ingestion step by step

This sequence takes a self-hosted OpenMetadata instance from a confirmed version and deployment to verified view-derived lineage edges, with a check at each stage so the team knows which edges came from parsed view definitions and which are missing.

  1. Confirm version and deployment baseline

    Confirm the OpenMetadata version, the deployment method (Kubernetes, bare metal or Docker for trials) and the ingestion image or environment your team will run. Check the release notes for your version, since ingestion image and dependency changes in 2.0 affect how connectors run. Record the server, database and search service versions against the bare metal prerequisites. The step is done when a written baseline exists and the ingestion environment starts without errors.

  2. Create a least-privilege database account

    Ask the database owner to create a read-only account that can see the schemas containing your views and stored procedures. Confirm with your database platform's documentation which privileges allow the connector to read view definitions and routine metadata, and grant only those. Keep the account separate from application and administrator accounts. The step is done when a test login succeeds and a query against the information schema of the target database returns the expected views.

  3. Configure the database service and connection

    In OpenMetadata, create a database service for the source system, enter the host, port, database name and the account from the previous step, and store the password through the secrets mechanism your deployment uses. Set the service name carefully, because it becomes part of the identifier used later when lineage is resolved across services. The step is done when the connection test passes in the UI or the ingestion workflow reports a successful connection.

  4. Run metadata ingestion including views

    Run the metadata ingestion workflow with view extraction enabled and confirm that the schema filters include the schemas holding your views. Open a sample view in the catalog and confirm its columns and definition text were captured. Compare the view's column list with the database's own catalog output for that view. The step is done when the sample view appears with the expected columns and the ingestion log shows no skipped views for permission reasons.

  5. Run the lineage ingestion workflow

    Run the lineage ingestion workflow for the same service so OpenMetadata parses the stored view definitions into table-level edges. Review the workflow log for parse warnings, especially for views that reference other views, schemas outside the filter or unsupported syntax. Note which views failed to parse so they can be handled through manual edits later. The step is done when the workflow completes and you have a list of views with parse warnings.

  6. Verify edges against the database's own dependencies

    Pick several views of different complexity and compare their upstream tables in OpenMetadata with the dependencies the database reports for each view, using the platform's own dependency or view definition queries. Check that every upstream table in the database appears in the lineage view and that no edge points to a table that the view does not read. The step is done when the sample views match the database's dependency output, and any mismatch is logged with its cause.

  7. Record gaps and confirm stored procedure coverage

    Document the views that failed to parse or produced incorrect edges, and decide whether each needs a manual lineage edit or a change to the view definition. Check the documentation for your version to confirm how stored procedure lineage is handled, since it may not be supported for your database. Write the result into your lineage runbook so the next ingestion run is compared against it. The step is done when the gap list is signed off by the data owner and stored with the ingestion configuration.

How view and procedure definitions flow into the lineage graph

The flow starts in the source database, where a service account with read access to views and procedure definitions is used by the OpenMetadata ingestion workflow. The workflow passes the SQL text through its query parser, which infers table-to-view and table-to-table edges, and stores the resulting entities and lineage in the metadata store. The lineage graph is then drawn from that store. A manual edit path can add or correct edges beside the parsed ones. The dashed trust boundary marks where ingestion crosses from the database network into the OpenMetadata server, so check what that account can reach on each side.

Definitions move from the database through ingestion and parsing into the lineage graph.

Where stored procedure lineage is not supported

Treat stored procedure lineage as a gap to confirm, not a feature to assume. For each OpenMetadata connector and each version you run, check whether the procedure bodies it extracts produce lineage edges between source and target tables, and record the answer before you promise coverage to data owners. Run a test procedure that reads one table and writes another, ingest it, and confirm the edge appears in the lineage view and through the API. Keep that test in your upgrade checklist, because parser behavior can change between releases, including across the 2.0 line.

Several patterns regularly defeat a SQL parser. Dynamic SQL built at runtime (statements assembled from string variables or passed to an execute command) never appears in the stored text as a table reference, so no edge can be inferred. Temporary tables created and dropped inside a procedure often break the chain from source to final target. Procedures that write through other procedures hide the real write inside a call, so the caller shows no direct lineage. Cross-schema references can fail when the parser cannot resolve the schema or database name, particularly when the procedure relies on a default search path or on a service name that differs from the one ingested. Each of these needs a documented owner decision, not silent acceptance.

The fallback is manual lineage edits in the lineage editor or edges pushed through the REST API or Python SDK. Both work, but they only describe what someone entered, so they go stale when a procedure changes and nothing flags the drift. Assign an owner to each manually maintained procedure, store the edge list in version control, and review it whenever the procedure's code or its upstream tables change. Ask your vendor or the project documentation to confirm which edge types manual entry supports for your version, and plan the upkeep effort before you count these procedures as covered.

Security and operational considerations for lineage ingestion

View and stored procedure lineage depends on the ingestion account reading view definitions and procedure text from each database. The cards below cover the database credential and the operational checks around it, from where the password lives to how each run is recorded. OpenMetadata's login options and trust model are covered on a separate page, so this section concerns only the account that connects to your database.

Store the database password outside config files

The ingestion connection stores the database account password, so treat it as a secret from the start. Keep it in your secrets manager or a Kubernetes secret, and reference it from the connection rather than pasting it into a YAML file checked into source control. Confirm with your OpenMetadata deployment which secret sources the connector form and ingestion images accept in your version, and check who can read the secret in the runner environment and in the OpenMetadata database.

Rotate the ingestion password on a schedule

Plan rotation for the ingestion account like any other service credential. Each rotation requires updating the stored secret and confirming that the next scheduled run authenticates before the old password is removed. Ask your database team whether they can keep the old and new passwords valid for a short overlap, so a failed rotation does not break every lineage run at once. Record the rotation date and the owner of the account.

Grant read-only catalog and definition access

The account needs to read metadata, including view definitions and stored procedure source, but it should not write data, alter objects or run procedures. Ask your database administrator to grant only the catalog and definition privileges that the connector documentation lists for your database engine, and to exclude schemas that hold regulated personal data where lineage does not need them. Verify the grants with a test connection and a review of the account's role memberships.

Route ingestion over a private network path

The ingestion runner must reach the database port directly, so define that path before the first run. Prefer a private subnet, a firewall rule that allows only the runner's address to reach the database port, and TLS on the connection if your database supports it. If the runner sits outside the database network, confirm the proxy or tunnel setup with your network team, and keep the connection host name consistent with the service name used for cross-database lineage.

Log every ingestion and lineage run

Each ingestion run should leave a trail that shows when it ran, which account it used, and whether it parsed view and procedure definitions successfully. Keep the ingestion run history in OpenMetadata, export runner logs to your central logging platform, and review failed runs on a set schedule. Database audit logs on the account are a second record. Compare them when a lineage edge appears or disappears unexpectedly, because a changed grant or failed parse can produce the same symptom.

Questions teams ask before parsing views and procedures

Does parsed lineage replace manual mapping of views and procedures?

No. Parsing reduces manual mapping but rarely removes it. The parser can only read the statements it understands, so teams should expect to review the edges generated for each view, check procedures against what they actually do, and add edges by hand where the parser misses dynamic SQL, temporary objects or logic that runs outside the database. Keep a record of which objects were reviewed, who approved the result and when. That record makes later schema changes easier to trace and gives auditors a clear answer about how the catalog was populated.

What drives the effort of parsing views and procedures?

Four factors matter most. The first is volume: the number of views and procedures in each database. The second is dialect mix, since each database engine writes SQL differently and needs its own review. The third is naming discipline. When schema and database names are inconsistent, references fail to resolve and each one needs manual correction. The fourth is permission approvals, because read access to view definitions and procedure source usually passes through DBA and security review before any parsing begins. Nested views, dependencies across databases and heavy use of dynamic SQL also add review time.

How long does validation take for our estimated scope?

The facts available here do not give a duration, so treat any number you hear with caution. Validation time follows the object count per database, the dependency depth between views, the number of dialects and how many approval steps sit in front of read access. Ask a provider for a written scope that lists object counts by database, the engines in use, the procedures in scope and the procedures you expect to fall outside what the connector supports. Then ask for the sampling method, the acceptance criteria and the schedule for each stage, so you can check progress against the plan.

Can our team parse views and procedures without a partner?

Often yes, if the team has someone who reads SQL well, can run and schedule OpenMetadata ingestion and can own the review queue. The work is repetitive once the permissions and naming issues are fixed, so a small team can handle it over time. A partner adds the most value when the estate spans several database engines, when there are many procedures to review, when approvals need formal evidence, or when the internal team lacks time to maintain the catalog after go-live. Whichever route you choose, name one owner for lineage accuracy so the work does not stall between reviews.

What does the work need from our DBAs and platform team?

DBAs decide what the ingestion account can read. They need to review the grants that let the connector see view definitions and procedure source, create read-only accounts that carry no write rights, and document who approved them. The platform team provides the network path from the OpenMetadata server to each database, runs the deployment, schedules ingestion and keeps backups of the OpenMetadata metadata store. On PostgreSQL, confirm the exact privileges the connector needs against its documentation and your DBA's policy before granting them. Ask both teams to agree on a change window for the first full ingestion run.

Which stored procedures will OpenMetadata not parse?

Stored procedure lineage is not supported for every database or in every situation, so do not assume full coverage. Check the connector documentation for each engine you run, then test a sample of procedures in a non-production environment before you rely on the output. Procedures that build SQL dynamically, call external services, or write to tables through indirect logic are the usual gaps. Plan a manual edge entry for each unsupported procedure, record the source of that edge and schedule a review after schema changes so the manual lineage does not drift from the database.

When should we bring in a partner, and what should the quote include?

Bring in a partner when the estate is large, spans several engines, sits under strict approval rules, or when your team cannot keep the catalog current after the first run. Most DeployOpen engagements are fixed-scope, with scope, deliverables and timelines agreed in writing before work starts. A quote should list the object inventory, the permission requests and approvals, the ingestion configuration, the review workflow, the list of unsupported procedures with their manual edges, the handover documentation and a retest after fixes. Ask which items are one-time work and which recur, such as ingestion runs or lineage review after schema changes, and whether a retainer covers them.

How DeployOpen scopes lineage work for your databases

A DeployOpen lineage engagement is fixed-scope, so the written scope fixes which databases, schemas and view and procedure types are covered before any connector is configured. The first step is an inventory: for each database in scope, we list the views, materialized views where present, and stored procedures that feed or read the tables you care about, and we record which SQL dialect and parser path each object depends on. This inventory is what turns a vague goal like "lineage for the warehouse" into a bounded list of objects that can be tested. Your team should confirm which databases hold business logic in procedures, because those are where lineage most often stops.

Next, we agree a least-privilege account design for each database connection. The OpenMetadata database connectors read metadata and view definitions, so the account needs read access to the catalog objects and to the definitions it parses, and nothing that changes data. We confirm the exact privileges against the connector documentation for your database version rather than from memory, and we document which account is used for which service. Connector configuration then runs inside your cloud accounts, data centers or air-gapped network, with secrets stored where your security team expects them. Keep the inventory and the account list in the handover, because a later permission change can silently remove lineage that was working.

Validation comes before handover. We pick sample views and procedures from the inventory, run ingestion, and compare the lineage OpenMetadata produces against the lineage a reviewer would draw by reading the SQL, recording each gap and whether it is a parser limit, a permission gap or a missing manual edge. The written handover then covers the configuration, the account design, the validation results, the known unsupported cases and the steps to correct them. Ongoing support, re-validation after upgrades and continuous checks are available as a retainer. A quote follows from the written scope, so the inventory and validation sample should be settled first.

Sources and further reading

Talk to our team.

Tell us what you're working on, whether it's a deployment, an audit, a security test or a cyber range. You'll speak with an engineer who can help you scope it.

  • 30-minute call: free, with no obligation.
  • NDA on request: we can sign before you share details.
  • Clear next steps: a scope and plan after the call.