我正在尝试使用以下文档向kafka接收器写入内容:https://docs.databricks.com/spark/latest/structured-streaming/avro-dataframe.html#example-with-schema-registry
但是,我在spark-avro(https://mvnrepository.com/artifact/org.apache.spark/spark-avro_2.11)中找不到有多个参数的to_avro函数。是否有人知道它是否已被移动/重命名,或者我是否应该使用其他库?谢谢!
发布于 2020-08-06 17:25:55
在spark 3.0中,这些函数被转移到org.apache.spark.sql.avro.functions.scala对象中
检查这个- spark-repo jira- SPARK-26870
您引用的数据库文档也是基于spark 3的
https://stackoverflow.com/questions/63280391
复制相似问题