Rhombic is a SQL parsing, analysis, and manipulation library for TypeScript/JavaScript (v0.19.0). It provides two parsers: a Chevrotain-based parser for lightweight ANSI SQL manipulation (add projections, filters, ordering) and an Antlr-based parser (from Apache Spark SQL grammar) for broad dialect support and column-level lineage extraction. Rhombic ships TypeScript types, is actively maintained, and is designed for building SQL editors or data lineage tools. It differentiates from other SQL parsers (like sqlparser-js) by offering both manipulation and lineage in one package, with native TS support.
npm install rhombicNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows how to parse SQL with the Antlr parser and extract column-level lineage.
Use `antlr.parse()` for lineage, and default import `rhombic.parse()` for manipulation.
Use dynamic import() if in a CommonJS environment, or switch to ESM.
Watch for version updates; check changelog.
Use Antlr parser for complex or dialect-specific SQL.
Ensure getTable returns an object with at least a `columns` array.
Use antlr parser for non-ANSI SQL dialects.
Use `import rhombic from 'rhombic'`.
Provide a function: `const getTable = (ref) => { return { columns: [] }; }`.No dependency data recorded yet.