How do I get column-level SQL lineage in C#?
Reference gudusoft.gsqlparser, choose the database dialect, create a DataFlowAnalyzer and call generateDataFlow(). Read the resulting source-to-target relationships as XML or use the model API. The downloadable C# project on this page also exports SQLFlow JSON. No database connection or JVM is required.
Which databases does .NET data lineage support?
All 15 SQL dialects of the .NET SDK: Oracle, SQL Server (T-SQL), MySQL, PostgreSQL, IBM Db2, Sybase, IBM Informix, Snowflake, Amazon Redshift, Teradata, Greenplum, IBM Netezza, Apache Hive, Apache Impala and MDX. The worked examples on this page use SQL Server and Oracle. For your own dialect, evaluate representative scripts with the build you plan to deploy.
Does the .NET SDK support SQL Server data lineage?
Yes. The example on this page traces five SELECT INTO target columns through SQL Server joins, CONCAT, STRING_AGG, SUM, MAX and FORMAT. It was compiled and run with public NuGet 4.1.0.18. For larger batches, stored procedures and dynamic SQL, evaluate representative scripts with the build you plan to deploy.
Does the C# SDK support Oracle SQL and PL/SQL lineage?
Yes. The downloadable Oracle CREATE VIEW example traces customer_id and aggregated revenue to their source columns on public NuGet 4.1.0.18. For advanced PL/SQL packages, procedures, functions, triggers, cursors and dynamic SQL, request a current evaluation build. Recent advanced Oracle changes are not all included in that public package; validate your scripts with the supplied build.
What is the difference between a SQL parser and a lineage engine?
A parser produces a syntax tree and can enumerate tables and columns. A lineage engine resolves references and follows how source values contribute to target columns through expressions, queries and statements. GSP provides both in .NET. This makes it suitable for impact analysis, ETL mappings and data catalog integrations.
Can I export lineage as XML, JSON or CSV?
Yes. generateDataFlow() returns XML. The model can be converted to SQLFlow JSON, as shown in the downloadable C# project. The dlineage demo also offers detailed and simplified CSV, table-level lineage and graph JSON. Paste the XML or SQLFlow JSON into Gudu SQL Omni in VS Code or the online SQLFlow tool to explore an interactive diagram.
How can I visualize the .NET lineage XML or JSON?
Use Gudu SQL Omni for VS Code or SQLFlow online. In VS Code, paste the complete XML or SQLFlow JSON into an editor and run GSP: Data Lineage (Ctrl+Alt+L, or Cmd+Alt+L on macOS). Online, sign in if prompted, paste the same output into the SQLFlow editor and click Visualize Lineage. Both viewers let you zoom, pan and explore column connections. Use the dlineage XML or SQLFlow JSON generated by the .NET tool, including the sample files on this page.
Can lineage analysis run offline without a database connection?
Yes. GSP analyzes SQL text in your .NET process without executing it or connecting to the database. Supply offline schema metadata when wildcard expansion or ambiguous unqualified columns require catalog context. Dynamic SQL can be analyzed when its statement text can be resolved; SQL text alone cannot reveal arbitrary runtime-generated statements.
Do I need Java to use the .NET lineage API?
No. DataFlowAnalyzer, Option, generateDataFlow() and the model methods use Java-compatible API names, but the implementation runs as C# on .NET. The example targets .NET 10. The package also supplies a netstandard2.0 assembly for compatible hosts, including .NET Framework 4.6.2 and later.
Can I evaluate lineage before buying a licence?
Yes. Start with the public NuGet trial and the examples on this page. The public trial rejects SQL longer than 10,000 characters. Request an evaluation build for longer scripts, advanced procedure analysis and confirmation of your dialect, runtime and redistribution requirements.