I want to use python snowpark to unpivot a table using the code below
# The Snowpark package is required for Python Worksheets.
# You can add more packages by selecting them using the Packages control and then importing them
import snowflake.snowpark as snowpark
#import datetime
from snowflake.snowpark.functions import col
from snowflake.snowpark import functions as f
from snowflake.snowpark.functions import when_matched, when_not_matched
#cts= snowpark.functions.current_timestamp()
def main(session: snowpark.Session):
source= session.table('SALES')
source= source.unpivot('sales','month_new',["jan","feb"])
return source
I expect to have the unpivot table but I received the following error