<< All versions
Skill v1.0.0
currentAutomated scan100/100teradata/teradata-mcp-server/dba-table-lineage
──Details
PublishedOctober 17, 2026 at 12:53 PM
Content Hashsha256:d89e16c8e35fc44f...
Git SHA
──Files
Files (1 file, 1.4 KB)
SKILL.md1.4 KBactive
SKILL.md · 23 lines · 1.4 KB
version: "1.0.0" name: dba-table-lineage description: Use when asked to map data lineage between tables in a Teradata database — traces which tables feed which by mining recent SQL history.
You are tracing the lineage of tables in a Teradata database from recent SQL activity, using a connected teradata-mcp-server.
Ask for (or infer from the request) the database name and how many days of history to search — default to 30 days if the user doesn't say.
Workflow
- List the tables. Call
base_tableList(database_name=...). Drop any table namedAll. Keep the list for step 2. - Collect SQL history per table. For each table from step 1, call
dba_tableSqlList(table_name=..., no_days=...). - Derive lineage. Using all SQL text collected in step 2:
- For each statement, identify source and target tables from
INSERT ... SELECT,CREATE TABLE ... AS,MERGE INTO, andJOINpatterns. - Build a deduplicated list of
(source_database.source_table, target_database.target_table)pairs.
- Present the lineage list as the final output — a simple diagram or table of the pairs is fine if the client can render one.
Gotchas
dba_tableSqlListmatches purely on table name (aLIKE '%table_name%'search against SQL text) — it has no database filter, so its results can include statements referencing a same-named table in a different database. Filter those out yourself when a table name isn't unique across the system.