appName
The appName method is not supported; instead, the query_tag can be set after the session creation sentence.
the query_tag can be set by using the get_active_session() function from snowflake.snowpark.context
Input Code
from pyspark.sql import SparkSession
spark = SparkSession.builder.appName('appName').getOrCreate()
Output code
from snowflake.snowpark import Session
#EWI: SPRKPY1030 => pyspark.sql.session.SparkSession.Builder.appName has a workaround, see documentation for more info
spark = Session.builder.appName('appName').create()
Workaround
we can translate the output code to:
from snowflake.snowpark import Session
#EWI: SPRKPY1030 => pyspark.sql.session.SparkSession.Builder.appName has a workaround, see documentation for more info
spark = Session.builder.create()
snowflake.snowpark.get_active_session().query_tag = "appname"
Last updated
Was this helpful?