Vote
(0)
Comments (Liquid error: Exception has been thrown by the target of an invocation.)
RE:
Here's another code snippet that the spark.sql() function seems to break, allthough the code is able to run. The code below gives the red squiggly underline errors "no viable alternative at input '\n'" and "extraneous input '.' expecting {, 'assert', 'async'...". But the code still runs. The errors can be solved by using backslashes on each line for line continuation, but that makes the code messy. When commenting or removing the spark.sql() line, the errors disappear.df = spark.sql(query)df1 = (df .withColumn("col1", lit(1)) .select(col('*')) )