SPRKPY1058

Method is not supported with a Platform specific key

Message: < method > with < key > Platform specific key is not supported.

Category: ConversionError

Description

The get and set methods from pyspark.sql.conf.RuntimeConfig are not supported with a Platform specific key.

Scenarios

Not all usages of get or set methods are going to have an EWI in the output code. This EWI appears when the tool detects the usage of these methods with a Platform specific key which is not supported.

Scenario 1

Input

Below is an example of the get or set methods with supported keys in Snowpark.

session.conf.set("use_constant_subquery_alias", False)
spark.conf.set("sql_simplifier_enabled", True)

session.conf.get("use_constant_subquery_alias")
session.conf.get("use_constant_subquery_alias")

Output

Since the keys are supported in Snowpark the tool does not add the EWI on the output code.

Recommended fix

There is no recommended fix for this scenario.

Scenario 2

Input

Below is an example using not supported keys.

Output

The tool adds this EWI SPRKPY1058 on the output code to let you know that these methods are not supported with a Platform specific key.

Recommended fix

The recommended fix is to remove these methods.

Additional recommendations

Last updated