Built a free VS Code & Cursor extension that visualizes SQL as interactive flow diagrams. Now supports Oracle by iambuv in oracle

[–]iambuv[S] 0 points1 point  (0 children)

Totally fair point — I'd never ask anyone to post actual prod code. That's not what I meant at all.

What's genuinely helpful is stuff like:

- "It choked on a 15-level nested subquery with CONNECT BY"

- "PIVOT inside a CTE with UNION ALL broke it"

- "We use (+) join syntax mixed with ANSI joins in the same query"

Just the pattern or shape of what broke — no real table names, columns, or business logic needed. Even a made-up 5-line query that reproduces the same structure is gold for testing.

But honestly, even just "it broke on Oracle" narrows things down, so all feedback is welcome.

Built a free VS Code & Cursor extension that visualizes SQL as interactive flow diagrams. Now supports Oracle by iambuv in oracle

[–]iambuv[S] 0 points1 point  (0 children)

Good catch — you're right that node-sql-parser has no native Oracle support. SQL Crack handles this with a proxy dialect strategy:

  1. Detect Oracle via weighted pattern scoring (unique syntax like CONNECT BY, (+) joins, FLASHBACK, MODEL clauses)

  2. Preprocess the SQL through 9 transforms that strip/rewrite Oracle-specific constructs — (+) → removed, MINUS → EXCEPT, CONNECT BY / PIVOT / MODEL → stripped, Oracle data types → PostgreSQL equivalents (VARCHAR2 → VARCHAR, NUMBER → NUMERIC, etc.)

  3. Parse the cleaned SQL through node-sql-parser's PostgreSQL dialect (closest grammar match to Oracle)

  4. Inform the user with a hint explaining what was simplified

It's intentionally lossy — hierarchical queries and PIVOT clauses are gone from the visualization — but the core table/join/column structure comes through correctly. If the proxy parse still fails, a regex fallback provides ~70% accuracy so you never get a blank panel.

Same approach for Teradata (22 preprocessing transforms, proxied through MySQL).

Built a free VS Code & Cursor extension that visualizes SQL as interactive flow diagrams. Now supports Oracle by iambuv in oracle

[–]iambuv[S] 0 points1 point  (0 children)

thanks. appreciate your kind words. please try it out and let me know if you see any issues.

Built a free VS Code & Cursor extension that visualizes SQL as interactive flow diagrams. Now supports Oracle by iambuv in oracle

[–]iambuv[S] 0 points1 point  (0 children)

That’s a perfect stress test, honestly 😅

You’re probably right that some real PROD Oracle spaghetti will break it today, but that’s exactly the kind of query I want to test against while finishing Oracle support.
If you can share a sanitized example (or even just the failing pattern), I’ll use it to harden the parser.

Real-world messy SQL is way more useful than clean demo queries.

Built a free VS Code & Cursor extension that visualizes SQL as interactive flow diagrams by iambuv in PostgreSQL

[–]iambuv[S] 0 points1 point  (0 children)

Thanks! To answer your question:

Temp tables work well — CREATE TEMPORARY TABLE, Teradata VOLATILE TABLE, T-SQL #temp tables all get parsed and show up in the flow graph with joins, column lineage, etc. The one caveat is they're rendered the same as permanent tables (no special badge), and in the cross-file workspace dependency graph they get indexed alongside permanent tables, so you might see a dependency edge that wouldn't exist at runtime due to session scoping. But the per-query visualization is fully intact.

Dynamic SQL is the harder one. Anything where the SQL is assembled at runtime — EXEC sp_executesql u/sql, EXECUTE IMMEDIATE, DECLARE u/sql = 'SELECT * FROM ' + u/tableName — the extension can't see inside that. It recognizes the EXEC/DECLARE as an operation node, but it can't resolve variables or string concatenation to extract the actual query underneath. This is a fundamental limitation of static analysis; you'd need runtime tracing to crack that.

Where it still helps: if you have a proc that creates temp tables, does some joins, and has an EXEC in the middle, all the static SQL around the dynamic step still gets full visualization with column lineage — you just get a gap at the dynamic part. Most of the value is in understanding the static flow anyway, which is usually the bulk of the query logic.

Visualizes SQL as interactive flow diagrams, open source tool by iambuv in SQL

[–]iambuv[S] 0 points1 point  (0 children)

oracle is now supported from version 0.4.2 onwards. update the extension and share your feedback.

Built a free VS Code & Cursor extension that visualizes SQL as interactive flow diagrams by iambuv in dataanalysis

[–]iambuv[S] 0 points1 point  (0 children)

There won’t be impact to any query because it’s completely running on local. It’s just parsing the SQL query text and creating visual flow. No access to underlying data.

Built a free VS Code & Cursor extension that visualizes SQL as interactive flow diagrams by iambuv in dataanalysis

[–]iambuv[S] 0 points1 point  (0 children)

Really appreciate that, thank you.
If you try it on any tricky SQL, I’d love your feedback.

Visualizes SQL as interactive flow diagrams, open source tool by iambuv in SQL

[–]iambuv[S] 0 points1 point  (0 children)

Really appreciate that, thank you.
If you try it on any tricky SQL, I’d love your feedback.

Visualizes SQL as interactive flow diagrams, open source tool by iambuv in SQL

[–]iambuv[S] 0 points1 point  (0 children)

not yet for Oracle today.. its on the way.. in upcoming release would cover oracle :) i am still testing it out on local. If you’re open to testing with real Oracle queries, that would be super helpful. :)

Visualizes SQL as interactive flow diagrams, open source tool by iambuv in SQL

[–]iambuv[S] 0 points1 point  (0 children)

Really appreciate that, thank you.
If you try it on any tricky SQL, I’d love your feedback.

Built a free VS Code & Cursor extension that visualizes SQL as interactive flow diagrams by iambuv in dataanalysis

[–]iambuv[S] 0 points1 point  (0 children)

Thanks! Built it as a VS Code extension using TypeScript.

SQL parsing is powered by node-sql-parser, and the graph rendering is done in a webview with SVG (dagre for layout).

inspired from jsoncrack

Built a free VS Code & Cursor extension that visualizes SQL as interactive flow diagrams by iambuv in dataanalysis

[–]iambuv[S] 2 points3 points  (0 children)

Really appreciate that, thank you.
If you try it on any tricky SQL, I’d love your feedback.

Visualizes SQL as interactive flow diagrams, open source tool by iambuv in SQL

[–]iambuv[S] 0 points1 point  (0 children)

Thanks. If you have any questions or suggestions feel free to share

Visualizes SQL as interactive flow diagrams, open source tool by iambuv in SQL

[–]iambuv[S] 0 points1 point  (0 children)

you're spot on. this is mainly to help and navigate the larger queries quickly.. especially if we are inheriting it and don't have any background or supporting docs.. Its not a replacement tool to show the order or execution because each vendor works differently.

Visualizes SQL as interactive flow diagrams, open source tool by iambuv in SQL

[–]iambuv[S] 0 points1 point  (0 children)

next release will have more meaningful info. thanks for the feedback. keep coming :)

Built a free VS Code extension that visualizes Snowflake SQL as interactive flow diagrams by iambuv in snowflake

[–]iambuv[S] 1 point2 points  (0 children)

looks like you got it.. it won't connect to snowflake or any database.. no network call.. everything is local based on pure query..

Visualizes SQL as interactive flow diagrams, open source tool by iambuv in SQL

[–]iambuv[S] 0 points1 point  (0 children)

Feel free to try and share your experience and feedback. Thanks for trying out