I am trying to use UDTF in snowpark but not able to do partition by column. what I want the sql query is something like this :
select mcount.result from CUSTOMER, table(map_count(name) over (partition by name)) mcount;
Here "map_count" is my JavaScript UDTF. Below is the code snippet in Snowpark :
val session = Session.builder.configs(configs).create
val df = session.table("CUSTOMER")
val window = Window.partitionBy(col("name"))
val result = df.join(TableFunction("map_count"), col("name"))
//result.show()
Any suggestion how to use window partition by with table function? Is this even supported in snowpark?