> For the complete documentation index, see [llms.txt](https://docs.ovaledge.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.ovaledge.com/release8.2/connectors/connector-repositories/rdbms/ibm-db2-as-400/ibm-db2-as-400-lineage.md).

# IBM DB2 (AS/400) - Lineage

This article outlines the lineage coverage, configuration requirements, metadata handling, supported scenarios, component behaviors, transformation coverage, and known limitations for lineage extraction in IBM DB2 (AS/400). The connector enables SQL-based lineage extraction from DB2 datasets using a common lineage engine to provide table-level and column-level lineage visibility. It integrates DB2 datasets into the standard lineage pipeline (parse → build → visualize), enabling visibility into data flows across transformations and queries. Lineage accuracy depends on SQL compatibility with supported parser dialects.

## Lineage Configuration Requirements

Accurate lineage extraction depends on DB2 connectivity, metadata availability, SQL accessibility, and lineage configuration settings. These requirements must be properly configured and available to ensure successful lineage generation and source-target resolution.

### Configuration Requirements Table

<table><thead><tr><th width="264">Configuration</th><th>Required Detail</th></tr></thead><tbody><tr><td>DB2 (AS/400) Connection</td><td>A valid DB2 (AS/400) connection and crawler configuration must be available</td></tr><tr><td>Dataset Queries</td><td>Dataset queries must be available for lineage processing</td></tr><tr><td>connectionsPriorityForLineage</td><td>Connection priority settings must be configured to support accurate source and target object resolution during lineage processing</td></tr><tr><td>supportingDialects</td><td>Must include the appropriate SQL dialects required for parsing DB2 dataset queries</td></tr><tr><td>Query Log Integration</td><td>Query log integration can be enabled for query-based lineage extraction</td></tr><tr><td>Metadata Availability</td><td>A complete metadata crawl is required for schema and table resolution</td></tr></tbody></table>

{% hint style="warning" %}
Missing metadata, unavailable dataset queries, or incorrect dialect configuration may result in incomplete lineage generation or unresolved lineage paths.
{% endhint %}

## Lineage Components

| Component / Feature             | Availability |
| ------------------------------- | :----------: |
| Tables                          |       ✅      |
| Views                           |       ✅      |
| Columns                         |       ✅      |
| SQL Queries (Dataset-based)     |       ✅      |
| Query Logs (Connection Lineage) |       ✅      |
| Stored Procedures               |      ⚠️      |
| Functions                       |      ⚠️      |
| Triggers                        |      ⚠️      |
| Dynamic SQL                     |      ⚠️      |
| DB2AS400-specific Parsing       |       ❌      |
| Reports / ETL Tools             |       ❌      |

{% hint style="info" %}
The ⚠️ icon indicates partially supported functionality with limited lineage coverage in applicable scenarios.
{% endhint %}

## Column Creation Support

This section outlines lineage support for column creation and transformation scenarios.

### Column Creation from Lineage

| Transformation Type | Supported |
| ------------------- | :-------: |
| Expressions         |     ⚠️    |
| Aggregations        |     ⚠️    |
| Calculated Fields   |     ⚠️    |
| Renamed Columns     |     ✅     |
| Temp Columns        |     ⚠️    |
| Semantic Columns    |     ⚠️    |

{% hint style="info" %}
The ⚠️ icon indicates partially supported functionality with limited lineage coverage in applicable scenarios.
{% endhint %}

## Supported Use Cases

The connector supports lineage extraction for standard SQL-based DB2 workloads and query-driven transformations. These use cases represent scenarios where lineage extraction functions as expected.

### Supported Lineage Scenarios

<table><thead><tr><th width="334">Supported</th><th>Details</th></tr></thead><tbody><tr><td>SQL-based Lineage from DB2 Datasets</td><td>Lineage extraction from the dataset SQL definitions</td></tr><tr><td>Table-to-Table Lineage</td><td>Lineage for standard SQL transformations</td></tr><tr><td>Column-Level Lineage</td><td>Lineage for SELECT, INSERT, and UPDATE queries</td></tr><tr><td>Incremental Lineage Processing</td><td>Incremental processing of lineage changes</td></tr><tr><td>Query Log-Based Lineage</td><td>Lineage generated from query log information</td></tr><tr><td>Views and Table Relationships</td><td>Relationships derived from SQL definitions and object references</td></tr></tbody></table>

{% hint style="info" %}
Lineage extraction is based on SQL parsing and metadata available through datasets, query logs, and crawled database objects.
{% endhint %}

## Partial or Limited Coverage

Certain scenarios provide only partial lineage coverage due to dialect limitations, parser dependencies, SQL complexity, or metadata resolution challenges.

### Scenarios

<table><thead><tr><th width="331">Scenario</th><th>Limitation Description</th></tr></thead><tbody><tr><td>DB2-specific Syntax</td><td>Coverage depends on the supported parser dialect compatibility</td></tr><tr><td>Stored Procedures and Functions</td><td>Lineage extraction is limited for procedural logic</td></tr><tr><td>Dynamic SQL and Runtime-generated Queries</td><td>Runtime-generated SQL may not be fully resolved</td></tr><tr><td>Complex Transformations and Nested SQL Logic</td><td>Complex logic may reduce lineage accuracy</td></tr><tr><td>Schema Resolution for Partially Qualified Objects</td><td>Object resolution may be incomplete</td></tr><tr><td>Trigger-based or Procedural Lineage</td><td>Limited support for procedural execution paths</td></tr><tr><td>Expressions</td><td>Expression-level lineage may be incomplete in complex scenarios</td></tr><tr><td>Aggregations</td><td>Aggregation lineage may not fully capture transformation details</td></tr><tr><td>Calculated Fields</td><td>Coverage depends on expression parsing success</td></tr><tr><td>Temporary and Semantic Columns</td><td>Column resolution may be incomplete when metadata is unavailable</td></tr></tbody></table>

{% hint style="info" %}
Complex SQL patterns, dialect-specific syntax, and runtime-generated logic may result in incomplete table-level or column-level lineage.
{% endhint %}

## Unsupported Scenarios

The connector does not support lineage extraction for certain DB2 AS/400-specific processing patterns and non-SQL lineage scenarios.

### Unsupported Lineage

| Not Supported                                              | Description                                             |
| ---------------------------------------------------------- | ------------------------------------------------------- |
| Non-SQL Lineage                                            | Lineage outside SQL-based processing is not supported   |
| XML-based Lineage Processing in DB Context                 | XML-based lineage generation is not supported           |
| Full DB2 AS400 Dialect-Native Parsing                      | Native DB2 AS400 parsing capabilities are not available |
| Advanced Procedural Constructs or Macros Specific to AS400 | AS400-specific procedural logic is not fully supported  |
| Complete Lineage for Dynamic or Runtime-generated SQL      | Runtime-generated SQL cannot be fully resolved          |

{% hint style="info" %}
Unsupported scenarios will not produce lineage and may appear disconnected in lineage visualization.
{% endhint %}

## Current Functional Status

This section outlines the present state of lineage coverage supported by the IBM DB2 (AS/400) connector based on the available capabilities and limitations.

<table><thead><tr><th width="200">Status Area</th><th>Details</th></tr></thead><tbody><tr><td>Overall Coverage</td><td>Partial coverage across DB2 SQL workloads</td></tr><tr><td>Lineage Depth</td><td>Table-level lineage and limited column-level lineage support</td></tr><tr><td>Supported Inputs</td><td>Tables, views, SQL datasets, query logs, and supported database objects</td></tr><tr><td>Functional Scope</td><td>SQL-based lineage extraction using a common lineage engine</td></tr><tr><td>Limitation Areas</td><td>DB2-specific syntax, procedural logic, dynamic SQL, nested transformations, and AS400-native SQL constructs</td></tr><tr><td>Resulting Output</td><td>Reliable lineage for standard SQL workloads with reduced coverage for complex, dynamic, and DB2-specific scenarios</td></tr></tbody></table>

{% hint style="warning" %}
Coverage remains partial because lineage relies on a generic SQL parser with dialect fallback rather than DB2-specific parsing optimizations. This approach provides reliable SQL-based lineage for standard workloads but introduces limitations when handling complex transformations, dynamic SQL, procedural logic, and AS400-native SQL scenarios.
{% endhint %}

***

Copyright © 2026, OvalEdge LLC, Peachtree Corners, GA, USA.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.ovaledge.com/release8.2/connectors/connector-repositories/rdbms/ibm-db2-as-400/ibm-db2-as-400-lineage.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
