根据天文学家文档
尽管如此,我仍然不确定如何在Extras中构造JSON.我试过了: {uri:mongodb + srv://myuser:mypass@my-cluster.dwxnd.gcp.mongodb/mydb?retryWrites = true& w = majority} ,但这不是工作:
这看起来应该很明显,但是我正在努力.使用我们来自MongoDB Atlas的MongoDB URI在Airflow中创建此连接的正确方法是什么?
解决方案这是我会尝试的:
According to Astronomer docs here:
Despite this, I'm still not quite sure how to structure the JSON in Extras for this. I've tried: { uri: mongodb+srv://myuser:mypass@my-cluster.dwxnd.gcp.mongodb/mydb?retryWrites=true&w=majority } in the Extras but that doesn't work:
It seems like this should be obvious, yet I am struggling. What's the correct way, using our MongoDB URI from MongoDB Atlas, to create this connection in Airflow?
解决方案This is what I would try:
{ retryWrite:true, <field>:value, w:majority }
更多推荐
设置与Airflow的MongoDB连接
发布评论