예제 #1
0
def download_file2(**kwargs):
    print("download_file2()")
    lc = LoaderUtils()
    downloaded_file = lc.download_file(
        kwargs["ti"].xcom_pull(key="file2"),
        kwargs["ti"].xcom_pull(key="file_path2"))
    kwargs["ti"].xcom_push(key="file2_to_load", value=downloaded_file)
예제 #2
0
def download_file(**kwargs): 
    print("download_file()")
    lc = LoaderUtils()
    directory, working_dir = lc.create_working_dir()  
    file1 = 'file1.csv'
    file_path = directory + "/" + file1
    downloaded_file = lc.download_file(file1, file_path)
    kwargs["ti"].xcom_push(key="file_to_load", value=downloaded_file)
    kwargs["ti"].xcom_push(key="temp_directory", value=directory)