如何解决错误:“pymongo.errors.OperationFailure:功能不受支持:splitVector”在 Apache Beam 中使用 ReadFromMongoDB 时
我正在尝试从 mongodb(在 AWS Documentdb 中运行)读取数据并写入 bigquery。
我已经为此编写了 python 代码并使用 python3 命令运行它。我的管道字符串如下所示:
p | ReadFromMongoDB(uri='mongodb://documentdb_url:27017',db="test_db",coll="test_collection") | beam.Map(json_parse_fun) | 'WriteToBigQuery' >> beam.io.WriteToBigQuery('target_bq_table',write_disposition=beam.io.BigQueryDisposition.WRITE_APPEND)
json_parse_fun() 将 mongodb 数据转换为 JSON 文件。
但是当我运行此代码时,数据流作业失败并显示以下错误:
pymongo.errors.OperationFailure: Feature not supported: splitVector
解决方法
MongoDB 不会“在 DocumentDB 中运行”。
DocumentDB 是一个模仿数据库,实现了 MongoDB 的一些功能。您发现了它没有实现的功能。
见"Feature not supported: $text" in document db with mongodb 3.6 compatiability。
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。