I'm trying to use the function from_avro in a dataframe.
This dataframe has its origin from a streamRead from kafka and at some point I create a column with the schemaId (related to schema registry) and the message.
I then have an UDF that grabs the schema Id and goes to my SchemaRegistry API to fetch the schema, so at the end I have a column with it.
After this, I'm trying to create a new column with the decoded message by calling from_avro("message", "schema", options) but my "schema" is a column and the from_avro expects a string. I tried everything to turn the column to string but I get other errors like "Column is not iterable".
I also tried to move the from_avro into a UDF but then I get issues related to the fact that the from_avro needs to be executed in driver context (even though I'm using a single node cluster).