dstandish commented on a change in pull request #9677: URL: https://github.com/apache/airflow/pull/9677#discussion_r468234393
########## File path: airflow/providers/microsoft/azure/transfers/sftp_to_wasb.py ########## @@ -0,0 +1,166 @@ +# +# 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. +""" +This module contains SFTP to Azure Blob Storage operator. +""" +import os +from tempfile import NamedTemporaryFile +from typing import Any, Dict, List, Optional, Tuple + +from airflow.exceptions import AirflowException +from airflow.models import BaseOperator +from airflow.providers.microsoft.azure.hooks.wasb import WasbHook +from airflow.providers.sftp.hooks.sftp import SFTPHook +from airflow.utils.decorators import apply_defaults + +WILDCARD = "*" +SFTP_FILE_PATH = "SFTP_FILE_PATH" +BLOB_NAME = "BLOB_NAME" + + +class SFTPToWasbOperator(BaseOperator): Review comment: BaseOperator has dry run method defined [here](https://github.com/apache/airflow/blob/master/airflow/models/baseoperator.py#L1106-L1113) What it does is just log the templated fields. Which to me isn't all that helpful especially if you don't use templating. What I would do is extend that. I'd actually print out the list of files it _would_ transfer, and where they would be either copied or moved to. this is helpful for verifying that you have set things up correctly when building a dag with this kind of operator ---------------------------------------------------------------- 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]
