struct

The struct function of Pyspark needs a workaround to have an equivalence on Snowpark.

For an input code of a struct function, the output workaround should have the same parameters as the original code, but each should invoke a "col" function call as a parameter.

Input Code:

struct('a','b')

Output WorkAround:

object_construct('a',col('a'),'b',col('b'))

Last updated