SPRKPY1017

pyspark.sql.functions.date_add has a workaround

Category

Warning.

Description

This issue appears when the tool detects the usage of pyspark.sql.functions.date_add which has a workaround. Note: This workaround is deprecated because a later tool version supports the date_add snowflake function as a helper.

Input code:

col = date_add(colName, 5)

Output code:

#EWI: SPRKPY1017 => pyspark.sql.functions.date_add has a workaround, see documentation for more info
col = date_add(colName, 5)

Scenario:

date_add(start: ColumnOrName, days: int) Action: Import snowpark_extensions package, which contains a helper for date_add function.

import snowpark_extensions
col = date_add(colName, 5)

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