Why does SparkSQL require two literal escape backslashes in the SQL query?
May be because backslash is a special symbol, used to concatenate multi-line SQLs.
sql_1 = spark.sql("SELECT \
1 AS `col1`, '{0}' AS `col2`".format(var_1))
May be because backslash is a special symbol, used to concatenate multi-line SQLs.
sql_1 = spark.sql("SELECT \
1 AS `col1`, '{0}' AS `col2`".format(var_1))