How familiar are you with Spark and the like? This is what it looks like:
https://spark.apache.org/examples.html
SQL is just a DSL; it is not the only or primary API for Spark, and there's nothing magical about it. If you ditch it you can get your type safety, composability, and testability back, like so:
https://medium.com/@sergey.kotlov/unit-testing-of-spark-appl...
See those case classes that neatly encapsulate business objects? Add to that functional transforms that concisely express typical operations like filtering, mapping, and so on, you get something that is simply superior to SQL.