Azure DocumentDB 与 MongoDB Protocol Spark 集成
Azure DocumentDB with MongoDB Protocol Spark integration
我想使用 DocumentDB,但没有 PySpark 的连接器。看来DocumentDB也支持MongoDB Protocol as mentioned here, which means all existing MongoDB drivers should work. Since there is PySpark connector for MongoDB,我想试试这个
df = spark.read.format("com.mongodb.spark.sql.DefaultSource").load()
这会引发错误。
com.mongodb.MongoCommandException: Command failed with error 115: ''$sample' is not supported' on server example.documents.azure.com:10250. The full response is { "_t" : "OKMongoResponse", "ok" : 0, "code" : 115, "errmsg" : "'$sample' is not supported", "$err" : "'$sample' is not supported" }
看起来 DocumentDB MongoDB API 不支持所有 MongoDB 功能,但我找不到任何相关文档。还是我漏掉了什么?
I want to use DocumentDB but there is no connector for PySpark.
Spark to DocumentDB connector (including a pyDocumentDB
package) 的预览版已于 2017 年 4 月上旬提供。
Looks like DocumentDB also supports MongoDB Protocol as mentioned here, which means all existing MongoDB drivers should work
DocumentDB 支持 MongoDB 有线协议进行通信并将其版本报告为 MongoDB 3.2.0,但这并不意味着它是完全支持所有 MongoDB 特性(或者 DocumentDB 实现具有相同行为和限制的特性)。目前值得注意的缺失是对 MongoDB 聚合管道的任何支持,其中包括 PySpark 连接器期望在连接到声称为 [=22 的服务器的情况下可用的 $sample
运算符=] 3.2.
您可以在问题中引用的 DocumentDB API for MongoDB 文档的评论中找到更多潜在兼容性问题的示例。
我想使用 DocumentDB,但没有 PySpark 的连接器。看来DocumentDB也支持MongoDB Protocol as mentioned here, which means all existing MongoDB drivers should work. Since there is PySpark connector for MongoDB,我想试试这个
df = spark.read.format("com.mongodb.spark.sql.DefaultSource").load()
这会引发错误。
com.mongodb.MongoCommandException: Command failed with error 115: ''$sample' is not supported' on server example.documents.azure.com:10250. The full response is { "_t" : "OKMongoResponse", "ok" : 0, "code" : 115, "errmsg" : "'$sample' is not supported", "$err" : "'$sample' is not supported" }
看起来 DocumentDB MongoDB API 不支持所有 MongoDB 功能,但我找不到任何相关文档。还是我漏掉了什么?
I want to use DocumentDB but there is no connector for PySpark.
Spark to DocumentDB connector (including a pyDocumentDB
package) 的预览版已于 2017 年 4 月上旬提供。
Looks like DocumentDB also supports MongoDB Protocol as mentioned here, which means all existing MongoDB drivers should work
DocumentDB 支持 MongoDB 有线协议进行通信并将其版本报告为 MongoDB 3.2.0,但这并不意味着它是完全支持所有 MongoDB 特性(或者 DocumentDB 实现具有相同行为和限制的特性)。目前值得注意的缺失是对 MongoDB 聚合管道的任何支持,其中包括 PySpark 连接器期望在连接到声称为 [=22 的服务器的情况下可用的 $sample
运算符=] 3.2.
您可以在问题中引用的 DocumentDB API for MongoDB 文档的评论中找到更多潜在兼容性问题的示例。