MongoDB 本身安装在具有所有依赖项的系统上,所有内容也都是最新的。仍然没有得到这个。 在 Docker 上运行 Apache-Airflow。
Dags 文件也给出找不到模块的错误,但实际上所有模块都已安装并更新。
希望下面的方法可以帮助您,尽管这个错误并没有真正修复。
首先,您应该创建新的 MongoDB 连接,类型为
Generic
并填写所有必需信息。保存后,需要在气流数据库中更改conn_type
。
示例数据库airflow mysql
use airflow # change by your airflow database name
select * from connection;
+----+------------------+-----------+------------------------------------+----------------------------------------------+----------+-------+--------------------------------------------------------------------------------------------------------------------------+-------+--------------+--------------------+-------+
| id | conn_id | conn_type | description | host | schema | login | password | port | is_encrypted | is_extra_encrypted | extra |
+----+------------------+-----------+------------------------------------+----------------------------------------------+----------+-------+--------------------------------------------------------------------------------------------------------------------------+-------+--------------+--------------------+-------+
| 1 | mongo_default | generic | Default connection connect mongodb | localhost
+----+------------------+-----------+------------------------------------+----------------------------------------------+----------+-------+--------------------------------------------------------------------------------------------------------------------------+-------+--------------+--------------------+-------+
update connection set conn_id = 'mongo' where conn_id = 'mongo_default';