Azure Synapse Spark Notebook: UDF fails with strange conversion error #1119
Unanswered
SacredSkull
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have a very simple UDF, which I have gradually commented out in an attempt to try and fix.
Every version of it has failed however - here is a really simple version:
And I am calling it with this:
Any version of this code returns the following error:
I should note that this isn't really the code I want, but I'm trying to get something working. I'm currently converting PySpark code to C# as the Azure Cosmos python client is much slower than the C# implementation.
The end goal is to take a full row and push it to Cosmos - and return the status of any failure or null if successful.
I had initially set up this UDF to work on an entire row, but it fails with the same strange
cannot convert from Microsoft.Spark.Sql.Column
error:So to summarise, my UDFs are not working and are throwing strange conversion errors between the same type (Microsoft.Spark.Sql.Column). I think if I get the basic version of the UDF working I should be able to get going with the full fat UDF I need.
I've just checked there and the Spark pool is Spark 3.1 and .NET Spark 2.0 which seems to line up with the error message.
Oh, and additionally, I have tried to eliminate serialisation by doing as the docs suggest and having the UDF in a different cell to the calling code - same error.
Beta Was this translation helpful? Give feedback.
All reactions