Pyspark.SQL
Message: SQL embedded code cannot be processed.
Category: Warning.
This issue appears when the tool detects an SQL-embedded code that cannot be converted to Snowpark.
Check the SQL-embedded code section for more information.
Input
In this example the SQL code is embedded on a variable called query that is used as parameter for the Pyspark.sql method.
query = f"SELECT * from myTable" spark.sql(query)
Output
SMA detects that the PySpark.sql parameter is a variable and not a SQL Code, so the EWI SPRKPY1077 message is added to the PySpark.sql line.
query = f"SELECT * myTable" #EWI: SPRKPY1077 => SQL embedded code cannot be processed. spark.sql(query)
For the transformation of SQL, this code must be directly inside as parameter of the method only as string values and without interpolation. Please check the SQL send to the PySpark.SQL function to validate it's functionality on Snowflake.
For more support, you can email us at [email protected]envelope or post an issue in the SMAarrow-up-right.
Last updated 1 year ago