Using the following command in spark/scala to read a long SQL query that I have put in the resources table.
val stream = getClass.getResourceAsStream("wbs_