I have an SQL built dynamically and it has some corrupted strings in it like wrong column name or used sm instead of sum.
When I execute the sparksession.sql() on this generated string , the entire spark job fails as expected and I can see all the logs as in the resource manager logs.
Is there a way for me to catch this exception in a try catch block or so and handle this exception and move forward with my logic.