Jul-31-2018, 09:48 AM
Hello community,
Can someone let me know how pyspark.sql deals with spaces?
For example the following query won't work:
Cheers
Carlton
Can someone let me know how pyspark.sql deals with spaces?
For example the following query won't work:
myresults = spark.sql("""SELECT Name AS [Product Name] FROM Production_vProductAndDescription""")As you can see above the I have tried to concantenate Product Name with square brackets, but I get error:
Error:== SQL ==
SELECT Name AS [Product Name] FROM Production_vProductAndDescription
----------------^^^
However, with no spaces between Product and Name (without the square brackets as follows it works:myresults = spark.sql("""SELECT Name AS Product_Name FROM Production_vProductAndDescription""")Any thoughts welcomed
Cheers
Carlton