FAQ-同步的collection无数据

问题描述/异常栈

同步的collection无数据
org.apache.spark.sql.AnalysisException: cannot resolve 'id' given input columns: []; line 1 pos 0;

'Project ['id, 'name]

+- Relation[] MongoRelation(MongoRDD[0] at RDD at MongoRDD.scala:51,Some(StructType()))

at org.apache.spark.sql.catalyst.analysis.package$AnalysisErrorAt.failAnalysis(package.scala:42)

解决方案

检查collection是否有数据

问题原因

待补充;

作者:qianzhaoyuan