Draqun opened a new issue, #29153:
URL: https://github.com/apache/airflow/issues/29153
### Description
Hi.
It would be great to have possibility to use file-like buffer as
local_filepath parameter. An example:
```python3
class FTPFileTransmitOperator(BaseOperator):
def __init__(
self,
*,
ftp_conn_id: str = "ftp_default",
local_filepath: str | list[str] | io.TextIOWrapper |
list[io.TextIOWrapper],
remote_filepath: str | list[str],
operation: str = FTPOperation.PUT,
create_intermediate_dirs: bool = False,
**kwargs,
) -> None:
...
```
### Use case/motivation
Files to be sent to the FTP server can be read by open/smart_open from e.g.
S3 or AzureStorage. The current solution forces such a file to be downloaded,
which makes the provider very limited. Here, passing the handle returned by
smart_open would solve the problem. It should not be hard, because hook
(FTPHook) in method store_file can use file_handlers.
### Related issues
_No response_
### Are you willing to submit a PR?
- [ ] Yes I am willing to submit a PR!
### Code of Conduct
- [X] I agree to follow this project's [Code of
Conduct](https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]