SPRKPY1030

pyspark.sql.session.SparkSession.Builder.appName has a workaround

Category

Warning.

Description

This issue appears when the tool detects the usage of pyspark.sql.session.SparkSession.Builder.appName which has a workaround.

Input code:

spark = SparkSession.builder.appName("Merge_target_table")

Output code:

#EWI: SPRKPY1030 => pyspark.sql.session.SparkSession.Builder.appName has a workaround, see documentation for more info
spark = Session.builder.appName("Merge_target_table")

Scenario:

appName(name: str) Action: Import snowpark_extensions package, which contains a helper for appName function.

import snowpark_extensions
spark = SessionBuilder.appName("Merge_target_table")

Recommendation

  • For more support, you can email us at snowconvert-info@snowflake.com. If you have a contract for support with Snowflake, reach out to your sales engineer and they can direct your support needs.

#332: [SIT-1562] SQL Readiness

Change request updated