-
Notifications
You must be signed in to change notification settings - Fork 16.4k
Add DELETE operation in SFTPOperator #46233
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add DELETE operation in SFTPOperator #46233
Conversation
Then you need to identify this case in the code and raise exception. It's best to tell users what is not right rather then ask them to read documentation. example: airflow/airflow/sensors/base.py Lines 159 to 160 in 5ff07fa
(Don't forget to add test case to cover this case) Alternatively, if preferred, you can just log that |
|
Thanks for your review @eladkal |
|
Thanks for your review @morooshka |
|
Looks cool. Thanks @morooshka for all the valuable comments ! |
* Add DELETE operation in SFTPOperator * Add test code * Prevent local_filepath usage for DELETE operation * Update SFTPOperator with changes in condititon check and error msg * Update error message
* Add DELETE operation in SFTPOperator * Add test code * Prevent local_filepath usage for DELETE operation * Update SFTPOperator with changes in condititon check and error msg * Update error message
* Add DELETE operation in SFTPOperator * Add test code * Prevent local_filepath usage for DELETE operation * Update SFTPOperator with changes in condititon check and error msg * Update error message
This PR adds DELETE operation in SFTPOperator, related to the issue(#40365) I have raised before.
Currently, SFTPOperator only supports PUT and GET operations. With this update, you can now delete files or directories on a remote SFTP server by putting paths in the
remote_filepathparameter.NOTE: The
local_filepathparameter does nothing in DELETE operation even if it's providedcloses: #40365