I just published an initial adapter for MySQL:
Any bug reports are welcome!
I only tested against MySQL 8.0, and it probably won't work with MySQL 5.x due to lack of support for Common Table Expressions (CTE) / WITH clause.
So, assuming such a software doesn't exist (which I am not sure of, spark users may come from SQL and have had such requirements before). What I think would need to be done if one were to write one:
parse the SQL. In a way that gives you a sensible model you can work with. Here is a question where exactly this is asked. https://stackoverflow.com/questions/...