DataGalaxy's JDBC SDK can read the SQL that defines your stored procedures and views, and turn it into lineage: which tables a procedure reads and writes, and which upstream columns each view column comes from.
This is a best-effort, regex-based parser. It extracts what it confidently can, stays silent when it can't, and never fails an import.
Lineage is supported in URN mode only.
Supported connectors: Azure SQL, Oracle, PostgreSQL, MySQL, SQL Server, MariaDB
- What this feature does
- What you get
- Supported capabilities
- What's not supported
- Known limitations
- Scope behavior
- When to use this feature
- When to consider an advanced alternative
What this feature does
When the Get Lineage checkbox (disabled by default) is enabled, DataGalaxy analyzes SQL definitions for stored procedures and views and generates lineage from the SQL it can interpret. This includes both:
- Stored procedure lineage
- View lineage
What you get
| Source object | Emitted as | Granularity |
| Stored procedure | Data processing items on the procedure (source → target) | Column-level where possible, otherwise table-level, decided per statement |
| View | Uses links (from = the view, to = what it reads) | Column-level where possible, otherwise a table-level fallback for the whole view |
Note: The parser attempts column-level lineage first. If the SQL pattern is not recognized at column level, it falls back to table-level lineage.
Supported capabilities
- Table-level lineage for INSERT [INTO], UPDATE, DELETE FROM, MERGE [INTO], and TRUNCATE TABLE as writes, and FROM, JOIN, and a MERGE … USING source as reads.
- Column-level lineage for views, and for INSERT INTO <table> (<columns>) SELECT … inside stored procedures.
- Multiple SQL statements in stored procedures. Each statement is analyzed separately, so if one statement cannot be parsed, the others still produce lineage.
- Read-only or write-only statements. A SELECT-only statement produces an input-only item; an INSERT … VALUES or TRUNCATE produces an output-only item.
- Common Table Expressions (CTEs)WITH clauses, including chained and recursive CTEs.
- Bracketed joins, such as FROM a JOIN (b JOIN c ON …) ON ….
- Subqueries. Tables used inside nested queries are included in the lineage.
- Set operations like UNION, EXCEPT, and INTERSECT, with lineage covering all participating tables.
- Table aliases, with or without the AS keyword, matched regardless of letter case.
- Quoted aliases and identifiers, including names with spaces or reserved SQL keywords.
- Unqualified table names, resolved using the schema of the current view or procedure.
- Views and procedures located directly under a database, even when no schema is present.
What's not supported
- Table-valued functions
- Dynamic table names
- Sub-selects written straight into a FROM, such as FROM (SELECT …) x
Known limitations
- Case-sensitive matching. Table and column references must match the case of the imported object. Aliases and CTE names are case-insensitive.
- Lineage stops at import boundaries. Objects outside your import scope produce no links. Widening the scope can reveal more lineage.
- Prefix columns with their table alias. If your query joins multiple tables, always prefix columns with their table alias. The parser won't guess which table a column belongs to.
- No definition = no lineage. If the connector returns no SQL body for a procedure or view, nothing is parsed.
Scope behavior
Lineage is restricted to objects included in the import scope. If SQL references objects outside the selected scope, those objects are filtered out from the lineage output.
When to use this feature
Use this feature when you want:
- Basic lineage extraction for stored procedures or views
- Visibility into common SQL transformations
When to consider an advanced alternative
If you need broader SQL coverage, more accurate column-level lineage, or support for more complex SQL patterns, this built-in parser may not be sufficient. In those cases, enhanced paid options are available that offer higher-accuracy lineage extraction. Please reach out to your AM/CSM to discuss the best solution for your needs.