I need to run the following code in SQL (Snowflake) from Python.
"WHERE SOMECOLUMN LIKE 'product\\\\_%\\\\_season\\\\_s%\\\\_premium' ESCAPE '\\\\'"
For the avoidance of doubt each backslash in the SQL is repeated twice.
When I run this through Python I get the error
001003 (42000): SQL compilation error:
syntax error line 1 at position 358 unexpected '_'.
How can I properly escape this string?