| Crates.io | flowscope-core |
| lib.rs | flowscope-core |
| version | 0.3.1 |
| created_at | 2026-01-18 02:02:59.749871+00 |
| updated_at | 2026-01-23 13:49:52.517496+00 |
| description | Core SQL lineage analysis engine |
| homepage | https://flowscope.pondpilot.io |
| repository | https://github.com/pondpilot/flowscope |
| max_upload_size | |
| id | 2051582 |
| size | 3,586,911 |
Core SQL lineage analysis engine for FlowScope.
flowscope-core is a Rust library that performs static analysis on SQL queries to extract table and column-level lineage information. It serves as the foundation for the FlowScope ecosystem, powering the WebAssembly bindings and JavaScript packages.
sqlparser-rs, supporting PostgreSQL, Snowflake, BigQuery, DuckDB, Redshift, MySQL, SQLite, Databricks, ClickHouse, and Generic ANSI SQL.ref(), source(), config(), var(), and is_incremental().SELECT *).src/
├── analyzer.rs # Main analysis orchestration
├── analyzer/
│ ├── context.rs # Per-statement state and scope management
│ ├── schema_registry.rs # Schema metadata and name resolution
│ ├── visitor.rs # AST visitor for lineage extraction
│ ├── query.rs # Query analysis (SELECT, subqueries)
│ ├── expression.rs # Expression and column lineage
│ ├── select_analyzer.rs # SELECT clause analysis
│ ├── statements.rs # Statement-level analysis
│ ├── ddl.rs # DDL statement handling (CREATE, ALTER)
│ ├── cross_statement.rs # Cross-statement lineage tracking
│ ├── diagnostics.rs # Issue reporting
│ ├── input.rs # Input merging and deduplication
│ └── helpers/ # Utility functions
├── parser/ # SQL dialect handling
├── types/ # Request/response types
└── lineage/ # Lineage graph construction
use flowscope_core::{analyze, AnalyzeRequest, Dialect};
fn main() {
let request = AnalyzeRequest {
sql: "SELECT u.name, o.id FROM users u JOIN orders o ON u.id = o.user_id".to_string(),
dialect: Dialect::Postgres,
schema: None, // Optional schema metadata
file_path: None,
};
let result = analyze(&request);
// Access table lineage
for statement in result.statements {
println!("Tables: {:?}", statement.nodes);
println!("Edges: {:?}", statement.edges);
}
}
cargo test
Apache 2.0