'GCP Composer - ModuleNotFoundError: No module named 'airflow.providers.sftp'

I trying to getting data from FTP server's txt file by GCP Composer Tasks.

So I imported SFTPOperator package in code.

but error occurred:

ModuleNotFoundError: No module named 'airflow.providers.sftp'

then, I tried few ways:

but didn't work.😭

My GCP Composer Environment is as below:

  • Image Version : composer-1.17.7-airflow-2.1.4
  • python version : 3
  • Network VPC-native : Enable

How can I use SFTPOperator ?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source