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
Support for SFTP as file location #1481
Conversation
Codecov ReportBase: 97.43% // Head: 93.84% // Decreases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## main #1481 +/- ##
==========================================
- Coverage 97.43% 93.84% -3.59%
==========================================
Files 21 85 +64
Lines 740 4175 +3435
Branches 0 416 +416
==========================================
+ Hits 721 3918 +3197
- Misses 19 176 +157
- Partials 0 81 +81
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
I think we should also support export_file() operator. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@rajaths010494 do you have plan to add integration tests also?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is a lot of common code on this PR and FTP. Do you think we would have a base class for that instead?
Currently smart_open doesn't support write. SFTP hook supports store_file from local_file to remote_file. For this we need a local_file to be created. |
75280e3
to
b919e00
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
2dc308a
to
1645dcf
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added comments
fixed it |
Add alternative approach to sftp
f5416b6
to
4038b6e
Compare
Tested new RC release on my local. It is working fine. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Awesome, thanks @rajaths010494 for addressing all the feedback. |
related-to: #969 **Please describe the feature you'd like to see** It is a very common ETL operation to either push data to or load data from FTP sources **Describe the solution you'd like** SFTP should be valid location types in `File` **Are there any alternatives to this feature?** Implementors otherwise need to use workarounds like `S3toSFTPOperator` **Acceptance Criteria** - [x] All checks and tests in the CI should pass - [x] Unit tests (90% code coverage or more, [once available](#191)) - [x] Integration tests (if the feature relates to a new database or external service) - [x] Example DAG - [x] Docstrings in [reStructuredText](https://peps.python.org/pep-0287/) for each of methods, classes, functions and module-level attributes (including Example DAG on how it should be used) - [x] Exception handling in case of errors - [x] Logging (are we exposing useful information to the user? e.g. source and destination) - [x] Improve the documentation (README, Sphinx, and any other relevant) - [x] How to use Guide for the feature ([example](https://airflow.apache.org/docs/apache-airflow-providers-postgres/stable/operators/postgres_operator_howto_guide.html)) Co-authored-by: Utkarsh Sharma <utkarsharma2@gmail.com>
related-to: #969
Please describe the feature you'd like to see
It is a very common ETL operation to either push data to or load data from FTP sources
Describe the solution you'd like
SFTP should be valid location types in
File
Are there any alternatives to this feature?
Implementors otherwise need to use workarounds like
S3toSFTPOperator
Acceptance Criteria