我正在设置一个带有spark的流,其中将从S3存储桶读取数据,并定义到应用程序的流。但是,查询在读取数据列中的json时返回错误。
例如,如果我以以下方式开始流式传输
val stream = spark.readStream.format("delta").load("my_path").where("apply condition")
然后应用一个withWatermark
和一个分组,我得到了错误
com.fasterxml.jackson.databind.JsonMappingException: Can not construct instance of com.databricks.sql.transaction.tahoe.actions.CommitInfo: no suitable constructor found, can not deserialize from Object value (missing default constructor or creator, or perhaps need to add/enable type information?)
基本上,我在where
内限制数据的使用时间不得早于阈值,以减小其大小(如果不这样做,则会出现内存错误)。