Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在尝试查找查询以使用 Redash 更新 Mongo 文档中的记录。我想出了以下查询,但它不起作用。有人可以帮忙吗?我对 Redash 的了解是它使用 Pymongo。
{ "collection": "Application", "update": [{ "$match": { "ID": "2001" }, "$set": { "ID": "2020" } }] }
从未使用过 Redash,但在 pymongo 中,构造将是:
db = MongoClient()['mydatabase'] # Set the database connection db.Application.update_one({"ID": "2001"}, {"$set": {"ID": "2020"}}) # Perform the update