How to read a .sql file (not notebook) in a DataBricks repo to a String in Scala?

212 Views Asked by At

I can't seem to accomplish this is scala, seems easy in python, bash and R, but im trying to keep our code base in scala. I know the repo is set up correctly because when I execute %sh cat /absolute/path/to/file/in/repo I get the file contents printed to the console. I have tried most java/scala read text file methods and can't seem to get it to work. The error message I am repeatedly hitting is like: enter image description here

Any help would be greatly appreciated.

0

There are 0 best solutions below