potiuk commented on code in PR #26974: URL: https://github.com/apache/airflow/pull/26974#discussion_r1020479132
########## airflow/providers/ftp/example_dags/example_ftp.py: ########## @@ -0,0 +1,51 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +from __future__ import annotations + +from datetime import datetime + +from airflow import models +from airflow.providers.ftp.operators.ftp import FTPOperation, FTPOperator + +with models.DAG( + "example_ftp_put_get", + schedule_interval=None, + start_date=datetime(2021, 1, 1), + catchup=False, +) as dag: + # [START howto_ftp_put] + ftp_put = FTPOperator( + task_id="test_ftp_put", + ftp_conn_id="ftp_default", + local_filepath="/tmp/filepath", Review Comment: I think we have two different approaches for that. And we can decide either way. I personally think the "Local" is a bit artifficial for transfer. Having to define connection to download/upload files is not necessarily what you woul dlike ot do. I think we are not currently in the spree of cleaning and unifying this, so I would be ok with merging it as is. WDYT @eladkal -- 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]
