I am currently struggling with this piece of code using spark:
spark.read.format("jdbc").option("url", connectionUrl).option("driver", "com.microsoft.sqlserver.jdbc.SQLServerDriver").option("query", "SELECT Customer ID - Source FROM some_table").option("user", localusername).option("password", localpassword).load()
I tried to wrap Customer ID - Source in `s and in []. None of these works and code keeps returning the error
com.microsoft.sqlserver.jdbc.SQLServerException: Incorrect syntax near '`'
Any suggestions for using columns with spaces in the query? Renaming would be problematic as I plan to ingest xlsx into this table and there are a lot of columns. The excel files are provided by users.