我正在尝试从 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
答案 0 :(得分:2)
MongoDB 不会“在 DocumentDB 中运行”。
DocumentDB 是一个模仿数据库,实现了 MongoDB 的一些功能。您发现了它没有实现的功能。
见"Feature not supported: $text" in document db with mongodb 3.6 compatiability。