Reputation: 847
I have already installed the apache-airflow-providers-mongo package. It appears in the pip list, and all three dependencies are installed correctly. However, in the code, I still encounter a ModuleNotFoundError from the airflow.providers.mongo.hooks.mongo package.
My Code look like this:
import pendulum
from airflow import DAG
from airflow.operators.python_operator import PythonOperator
from airflow.hooks.base_hook import BaseHook
from airflow.providers.mongo.hooks.mongo import MongoHook
from datetime import datetime, timedelta
import pyodbc
local_tz = pendulum.timezone("Asia/Kuala_Lumpur")
...
Error is attached in Screenshot:
Upvotes: 0
Views: 121