3 ms·
Focusing on the Tree-Sitter side, it's something I've been meaning to look into. We have a lot of Oracle SQL files that make up our ETL pipeline at work, and I
by hifikuno 3y ago
Focusing on the Tree-Sitter side, it's something I've been meaning to look into. We have a lot of Oracle SQL files that make up our ETL pipeline at work, and I would love to be able to visualize the flow of the data. I know there are some products out there but our ETL was written from scratch without any tooling besides Oracle SQL and bash scripts (and cron).
I feel like a well written Tree-Sitter grammar should allow me to parse the files and follow the data from source to dashboard.
- nerdponx 3y agoI believe there is a grammar for SQL, but it probably doesn't support a lot of the vendor-specific language extensions you might be using. You could end up writing your own grammar or heavily extending any grammar that already exists. There might already be libraries specific to parsing Oracle SQL into a syntax tree, at which point Tree Sitter isn't really adding value. That said, the ability to query for things like "all SELECT statements where table 'xyz' is referenced in any table identifier" is very powerful.
- hifikuno 3y agoThat's a good idea, that would save me starting from scratch. We do use a fair bit of vendor-specific language, would be cool to make a good Oracle version and then commit back to the project.