mik-laj commented on a change in pull request #11284:
URL: https://github.com/apache/airflow/pull/11284#discussion_r503201814
##########
File path: airflow/providers/google/cloud/transfers/gcs_to_sftp.py
##########
@@ -35,6 +35,31 @@ class GCSToSFTPOperator(BaseOperator):
"""
Transfer files from a Google Cloud Storage bucket to SFTP server.
+ **Example**: ::
+
+ with models.DAG(
+ "example_gcs_to_sftp",
+ start_date=datetime(2020, 6, 19),
+ schedule_interval=None,
+ ) as dag:
+ # downloads file to /tmp/folder/subfolder/file.txt
+ copy_file_from_gcs_to_sftp = GCSToSFTPOperator(
+ task_id="file-copy-gsc-to-sftp",
+ source_bucket="test-gcs-sftp-bucket-name",
+ source_object="folder/subfolder/file.txt",
+ destination_path="/tmp/sftp",
+ )
+
+ # moves file to /tmp/file.txt
+ move_file_from_gcs_to_sftp = GCSToSFTPOperator(
+ task_id="file-move-gsc-to-sftp",
+ source_bucket=BUCKET_SRC,
+ source_object=OBJECT_SRC_2,
+ destination_path=DESTINATION_PATH_1,
Review comment:
Can you use values here instead of undefined constants?
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]