#5. Azure Data Factory - Use Foreach loop activity to copy multiple files - Step by Step Explanation

แชร์
ฝัง
  • เผยแพร่เมื่อ 30 ก.ย. 2024
  • We might be in a situation to copy multiple files from one location to another. This video will take you through the steps required to perform copy activity in a loop.
    Also, it explains how to use metadata activity for getting the file names inside a folder.

ความคิดเห็น • 134

  • @deshbhktA
    @deshbhktA 3 ปีที่แล้ว +5

    Very good demo, better than many online blogs, articles. Thanks 👍

    • @AllAboutBI
      @AllAboutBI  3 ปีที่แล้ว +1

      நன்றி sago

  • @ShriramVasudevan
    @ShriramVasudevan 2 ปีที่แล้ว +1

    Fantastic

  • @karanarora9080
    @karanarora9080 4 ปีที่แล้ว +4

    Thanks for the detailed explanation

  • @coincaptoday1612
    @coincaptoday1612 2 ปีที่แล้ว +1

    If you applied noise reducer it’s good

    • @AllAboutBI
      @AllAboutBI  2 ปีที่แล้ว +1

      That was when I had no experience recording 😊 my latest videos won't be having much noise 👍

  • @ssgg2599
    @ssgg2599 3 ปีที่แล้ว +3

    This is much better than udemy.Thank you

    • @AllAboutBI
      @AllAboutBI  3 ปีที่แล้ว +2

      Thanks, I hear similar comments from many. Glad it helps

  • @praveenchinnareddy1552
    @praveenchinnareddy1552 2 ปีที่แล้ว +1

    Thank You !!

  • @hasinibalaji1212
    @hasinibalaji1212 4 ปีที่แล้ว +2

    Simple explanation.

  • @mages005you
    @mages005you 3 ปีที่แล้ว +2

    Thank you so much mam for your explanation, please post more ADF and Data bricks videos as well.

  • @balapramothc.m.
    @balapramothc.m. ปีที่แล้ว

    Hi mam, Here we are coping the multiple files from one place to another so we have used foreach loop. But I have tried this implementation by using only copy data activity i.e in before video u have explained rite. See what I can able to copy multiple files by simply using copy data activity only.. Then y are we using foreach loop and get meta data and all? 😅

  • @maruthu1978
    @maruthu1978 ปีที่แล้ว

    Hi Subha I am facing issue while upload file by manually to container and I am using free subscription

  • @vaibhavgautam4600
    @vaibhavgautam4600 2 ปีที่แล้ว +2

    Very good and really handy for anyone in ETL who is new in ADF.

  • @puneethkiindbscmscs9437
    @puneethkiindbscmscs9437 ปีที่แล้ว

    i have a query that if we are having different no of columns in each csv file then how can we do for each. why i am asking this question means while i am doing copy activity for different csv file from one adls to another it is throwing error. if any body knows answer please let me know.

  • @vjmaths838
    @vjmaths838 ปีที่แล้ว

    Please help me, How to load mongo db multiple collections into adls gen2 in the azure data factory

  • @muratcagriozkan1493
    @muratcagriozkan1493 3 ปีที่แล้ว +1

    Hello! Thank you so much about this video. Helped me to understand ForEach loop. I wish you healthy days.

  • @subhashkomy
    @subhashkomy 21 วันที่ผ่านมา

    very well explained in details. Thanks for uploading this video.

    • @AllAboutBI
      @AllAboutBI  21 วันที่ผ่านมา

      Glad it is still relevant

  • @akhilesh2186
    @akhilesh2186 2 ปีที่แล้ว +1

    You are amazing.

  • @Ap-ki-bokka316
    @Ap-ki-bokka316 2 ปีที่แล้ว

    Hi
    Have you done any to get the data from sftp to datalake if have any such kind of video could you please share to me

  • @ankitjain3144
    @ankitjain3144 2 ปีที่แล้ว

    I tried foreach loop activity there is no error but after getmata data it will not executed .

  • @rajeshece432
    @rajeshece432 3 ปีที่แล้ว +1

    It was a very good explanation, only suggestion from my side is, the voice is having some noise in the audio, please try to reduce the noise in the audio.

    • @AllAboutBI
      @AllAboutBI  3 ปีที่แล้ว +2

      Thanks so much 🙏 ya I have improved the audio to a greater extent in my other videos

  • @rohitkumar-nk6sd
    @rohitkumar-nk6sd ปีที่แล้ว

    Great tutorial i want to copy files which are nested how to do?

  • @nareshvellampalli6696
    @nareshvellampalli6696 2 ปีที่แล้ว

    How to copy nested folders from one storage to another

  • @kanthsri1980
    @kanthsri1980 2 ปีที่แล้ว +2

    Great videos and detailed explanations..This channel is amazing

    • @AllAboutBI
      @AllAboutBI  2 ปีที่แล้ว +1

      Thank you Srikanth!

    • @vru5696
      @vru5696 8 หลายเดือนก่อน

      @@AllAboutBI what if we have table name list in file and extract them using lookup and then iterate using foreach, do you have any video on this scenario?

    • @AllAboutBI
      @AllAboutBI  8 หลายเดือนก่อน

      @@vru5696 no but pretty straight forward..do you find any issue somewhere in the implementation

  • @sanjaypurohit5931
    @sanjaypurohit5931 ปีที่แล้ว

    Do you know of a good synapse training online?

  • @alagappanv7430
    @alagappanv7430 ปีที่แล้ว

    Awesome one...Could you please put video for fetching particular file type from folder? for eg, i want to fetch and move only the .csv file from source folder to sink..Thanks

    • @AllAboutBI
      @AllAboutBI  ปีที่แล้ว

      That's easy. We need to use wildcard option or use filter activity

  • @shruthil7913
    @shruthil7913 3 ปีที่แล้ว +1

    Hi, I have a scenario, I have a multiple excel files (4 files) in blob and need to upload the in SQL in 4 different table. I have created the stored procedure in SQL for 4 files. Can you able to help me with videos, to upload automatically on regular basis.

    • @junaidmalik9593
      @junaidmalik9593 3 ปีที่แล้ว +1

      I too would like to have a video on this scenario. @Shruthi if u come across any video on this please share :)

    • @AllAboutBI
      @AllAboutBI  3 ปีที่แล้ว

      th-cam.com/video/K2xiGZ2yQZs/w-d-xo.html it might be useful. Pls chk

    • @raviteja_asr
      @raviteja_asr 3 ปีที่แล้ว

      @@junaidmalik9593 got the answer!!.

  • @gauravpp5768
    @gauravpp5768 ปีที่แล้ว

    Can we copy different types of files like CSV, json and parquet together with same for each activity

    • @AllAboutBI
      @AllAboutBI  ปีที่แล้ว

      Yes if auto mapping is used

  • @VivekSharma_IT
    @VivekSharma_IT ปีที่แล้ว

    Hi
    How do we copy folders recursively from one location to another. For eg: One adls has 10 folders in root which I want to copy to another adls.
    Thanks

    • @AllAboutBI
      @AllAboutBI  ปีที่แล้ว

      Releasing a video for it today. Pls watch

  • @hariprasanth6353
    @hariprasanth6353 3 ปีที่แล้ว +1

    Atlast pls show the output folder in container also so that it is helpful to see how the data gets copied there.. Thank you! Was useful!

    • @KranthiKumar-kp2nw
      @KranthiKumar-kp2nw ปีที่แล้ว

      yes aftr submission how we knw the data was copied into output or not. anyway thanks nice teaching

  • @manojsrivastava7009
    @manojsrivastava7009 3 ปีที่แล้ว +1

    Thanks so much...every step is perfectly explained with its functionality...I was able to follow everything! keep posting stuff like this !! Thanks

  • @nouamanebrinssi6996
    @nouamanebrinssi6996 2 หลายเดือนก่อน

    4 years later, your video is still useful, thank you very much :)

    • @AllAboutBI
      @AllAboutBI  2 หลายเดือนก่อน

      That's a huge honour for a content creator !! 😊

  • @bathini14
    @bathini14 3 ปีที่แล้ว +1

    Great!! Thanks! However one thing like to mention.. you shud have show output folder after successful execution ( I know we get these 2 files, but still , for more clarity)

  • @sid5201
    @sid5201 3 ปีที่แล้ว +1

    Firstly thanks for this awesome video. Do you really have to use Metadata in this case? By using just Copy activity, I can use "*" in the filename box option available in the wildcard file path and check Recursive option. I am assuming it should be able to pick all the files under this folder. I understand if the files in the folder needed extra vetting in which case metadata would help.

    • @AllAboutBI
      @AllAboutBI  3 ปีที่แล้ว +2

      Right. If we need to filter by file name or last modified date, metadata would help.
      And thanks for your feedback and comment 🙏

  • @VavilalaPavan
    @VavilalaPavan 9 หลายเดือนก่อน

    mam i want to from one source to two different locations on sink by using foreach pls help me

    • @AllAboutBI
      @AllAboutBI  9 หลายเดือนก่อน

      U have to have two copy activity or use two sinks in Data flow

  • @coincaptoday1612
    @coincaptoday1612 2 ปีที่แล้ว

    what if we have Multi Folders with Multi Files in each folder ? any one answer pls

    • @AllAboutBI
      @AllAboutBI  2 ปีที่แล้ว

      Two for each reqd. In the playlist itself there's an example.
      Delete multiple files in multiple folders.

  • @swapnilhingmire43
    @swapnilhingmire43 6 หลายเดือนก่อน

    thanks

  • @surabhi444
    @surabhi444 2 ปีที่แล้ว

    so Thanks medam

  • @gsreekanthyadav
    @gsreekanthyadav ปีที่แล้ว

    Hi, we can copy multiple files from one folder to another by using copy activity. Then what is the purpose of using Get metadata & Foreach loop? could you please explain

  • @kiranbandi3497
    @kiranbandi3497 3 ปีที่แล้ว +1

    please make the videos on azure key vaults

  • @harshapydala5418
    @harshapydala5418 2 ปีที่แล้ว

    Why can't we use look up for getting files

    • @AllAboutBI
      @AllAboutBI  2 ปีที่แล้ว +1

      Look up is just for giving the content of file.. not names of files under a folder

  • @maheindra5572
    @maheindra5572 ปีที่แล้ว

    Hello Mam, As per abv scenario i have tried copying the multiple files from Source to target , but no luck even though the whole activity is success. Please advise!

  • @ksrilakshmi5900
    @ksrilakshmi5900 2 ปีที่แล้ว

    Excellent

  • @Myachnik
    @Myachnik 4 ปีที่แล้ว +1

    Thanks a lot

  • @rachakondadurgaprasad7962
    @rachakondadurgaprasad7962 3 ปีที่แล้ว +1

    Thanks. Will finish all ur videos.

  • @shankarnarayanan24
    @shankarnarayanan24 ปีที่แล้ว

    How do I give 2 array of parameters in foreach which should run a script inside the foreach based on these 2 parameters??

    • @AllAboutBI
      @AllAboutBI  ปีที่แล้ว

      Pls explain a bit more

    • @shankarnarayanan24
      @shankarnarayanan24 ปีที่แล้ว

      @@AllAboutBI i have to give 2 parameters for my script year and month.. and every time it has to take a new year n month parameter.. how do I achieve this? I tried a foreach loop and a script activity inside the foreach but it is taking only one parameter.. please let me know

  • @rahulchavan7822
    @rahulchavan7822 ปีที่แล้ว

    nice explanation, but insread of using getmeta data can we use lookup activity right? and whats is difference of both when to use both and where not use both

  • @saritapatole6030
    @saritapatole6030 2 ปีที่แล้ว

    While selecting source dataset to getmetadata activity if we have input folder and inside it 4 more folders to copy so till input folder only needs to select path in souce dataset or how?

  • @vru5696
    @vru5696 2 ปีที่แล้ว

    Here, Childitems is array type so we have to call with index right to get both files like childitems[0] and [1]

  • @digithat6496
    @digithat6496 3 ปีที่แล้ว

    What if... the career.txt is already on Output folder. Would it be replaced or updated or would the pipeline fail?

  • @anupbhimineni1564
    @anupbhimineni1564 3 ปีที่แล้ว

    Thankyou for the good explanation, I have a scenario where I need to loop through subfolder's with in a folder to get to the file. Could you suggest how to achieve that.
    Thanks

  • @dharmveerchaudhary7060
    @dharmveerchaudhary7060 3 ปีที่แล้ว

    Pls give any idea ,how to kill infinite loop created inside the until activity in azure data factory

  • @alexfernandodossantossilva4785
    @alexfernandodossantossilva4785 2 ปีที่แล้ว

    How do overwrite files? Is it any of those copy behaviours?

  • @prajju8114
    @prajju8114 2 ปีที่แล้ว

    Could you please explain how did you add output folder in storage folder without uploading any files inside it?

  • @santoshnagargoje7126
    @santoshnagargoje7126 ปีที่แล้ว

    Nicely Explained !

  • @vaidehithirumalai6612
    @vaidehithirumalai6612 4 ปีที่แล้ว +1

    Very clear thanks

  • @roselinetulypalma4380
    @roselinetulypalma4380 3 ปีที่แล้ว

    your videos are very useful. thank you so much.

  • @piraviperumal2544
    @piraviperumal2544 3 ปีที่แล้ว

    Nice :) Interesting and could grasp the content easily. Thanks for the tutorials!!

  • @mr.prasadyadav
    @mr.prasadyadav 3 ปีที่แล้ว

    Good lecture , Thank you ❤️

  • @carpediem5666
    @carpediem5666 3 ปีที่แล้ว

    Hi Mam, I am getting an error - "The length of execution output is over limit (around 4MB currently)" while I tried using the 'GetMetadata' Activity to get all the metadata of all the containers inside the source storage account. Is there any workaround for this issue ?
    The storage account is an ADLS Gen1 HNS disabled one and has more than 80K containers.
    I want to copy all the containers and the blobs inside those containers to an ADLS Gen 2 (HNS enabled) Storage Account.

    • @AllAboutBI
      @AllAboutBI  3 ปีที่แล้ว

      Hi Ajay, guess it's the limitation right now. Not sure of workaround. Did u get a chance to go thru the forums?

  • @dipeshshrestha2086
    @dipeshshrestha2086 3 ปีที่แล้ว

    Actually i have created a Ftp server in my win 10 machine using IISM and while creating linked service to connect with it i get error "connection failed".
    Can you please do one thing like instead of storing these files in blob storage cloud directly,
    create a local FTP server in you local machine and then use data factory to connect with the Local FTP server and then copy data to blob storage.

    • @AllAboutBI
      @AllAboutBI  3 ปีที่แล้ว

      Sure.. pass on steps for creating FTP server?

  • @himachandra8223
    @himachandra8223 2 ปีที่แล้ว

    My files are present directly in the container, but not in a folder within container. I am unable to copy them to another container. Please help.

    • @AllAboutBI
      @AllAboutBI  2 ปีที่แล้ว

      Is there any error

    • @himachandra8223
      @himachandra8223 2 ปีที่แล้ว

      @@AllAboutBI I need to transform each row in CSV to seperate jsons. I.E one row need to be created as one json. Is it possible in data factory

    • @AllAboutBI
      @AllAboutBI  2 ปีที่แล้ว

      Yes

    • @himachandra8223
      @himachandra8223 2 ปีที่แล้ว

      @@AllAboutBI Great. What's the option for that? Do I need to use data flow or copy will work?

  • @jonlunn4114
    @jonlunn4114 3 ปีที่แล้ว

    Thank you, good demo, helped me understand what was going wrong in my for each loop

  • @bathini14
    @bathini14 3 ปีที่แล้ว

    I have a question, how to restrict specific no. of files to pass to for each. Suppose getmetadata gives 10files , restrict to execute 5 files in copy activity.

    • @AllAboutBI
      @AllAboutBI  3 ปีที่แล้ว +1

      We might have to use a filter activity with some expresion that restricts no.of files

  • @kaygeecorleone
    @kaygeecorleone 3 ปีที่แล้ว

    This was brilliant!

  • @harithad1757
    @harithad1757 2 ปีที่แล้ว

    loved it

    • @AllAboutBI
      @AllAboutBI  2 ปีที่แล้ว

      Thanks much 👍

  • @dnhemanthkumar9136
    @dnhemanthkumar9136 3 ปีที่แล้ว

    Woww....i would totally take a paid course of urs...thanks so much👌

    • @AllAboutBI
      @AllAboutBI  3 ปีที่แล้ว

      Glad to hear. Thanks 🙏

  • @sivasudarsan2373
    @sivasudarsan2373 3 ปีที่แล้ว

    Which pipeline needed for read text file content from storage and based on value from text file trigger another pipe line

    • @AllAboutBI
      @AllAboutBI  3 ปีที่แล้ว

      Can u explain it a bit.

  • @chloetheragdollkitten9890
    @chloetheragdollkitten9890 2 ปีที่แล้ว

    Thank you so much. That was really helpful.

  • @raghavanchellappa6950
    @raghavanchellappa6950 2 ปีที่แล้ว

    I just moved myself from long Oracle journey to Azure. I find your channel very nice. Great job !!

    • @venkatn8824
      @venkatn8824 10 หลายเดือนก่อน

      I am from oracle right now I search in cloud for opportunities can you guide how to become azure data engineer with sql

  • @Metroid1177
    @Metroid1177 3 ปีที่แล้ว

    I just built a data ingestion Proof of Concept to show my boss. Coming from a SSIS background, most of the steps in Data Factory seemed very awkward. This tutorial helped me complete the last step of moving csv files to another container after loading them to a SQL Server Database, thank you very much!

    • @AllAboutBI
      @AllAboutBI  3 ปีที่แล้ว

      Very happy to know that it helped. All the best for your ADF journey.

  • @NasimaKhatun-jb7qo
    @NasimaKhatun-jb7qo 3 ปีที่แล้ว

    Hello Mam, I am getting this error for the pipeline: ErrorCode=UserErrorSourceBlobNotExist,'Type=Microsoft.DataTransfer.Common.Shared.HybridDeliveryException,Message=The required Blob is missing. Folder path: lab1-05/finance.txt/.,Source=Microsoft.DataTransfer.ClientLibrary,' .. I have followed all the steps.

    • @NasimaKhatun-jb7qo
      @NasimaKhatun-jb7qo 3 ปีที่แล้ว

      I have file format like this
      FirstName|LastName|Age
      Naima|Khatun|26
      Prati|Vermani|27
      Mehzan|Ali|23
      I menttioned column separated as pipeline separated and row as default..
      Ma'am please suggest

    • @NasimaKhatun-jb7qo
      @NasimaKhatun-jb7qo 3 ปีที่แล้ว

      I was using Blob storage , now i have changed it to data lake storage and doing and it worked.. Didn't understand how..

    • @AllAboutBI
      @AllAboutBI  3 ปีที่แล้ว +1

      then you would have created a data lake storage instead of blob while creating storage account Nasima.

  • @jayashankartn9813
    @jayashankartn9813 2 ปีที่แล้ว

    Can we use the same steps to load files present in nested folders one ADLS to another?

    • @raghavanchellappa6950
      @raghavanchellappa6950 2 ปีที่แล้ว

      In the copy activity there is a recursive option, which should allow you to load files with the sub folder levels as well.

  • @subhashkomy
    @subhashkomy 3 ปีที่แล้ว

    Can you please create a video, how to upload multiple Excel data in Sql Server using ForEach and Data Flow and please also used data conversion. It doesn't seem to be as easy as we do in SSIS.

    • @AllAboutBI
      @AllAboutBI  3 ปีที่แล้ว +1

      In SSIS also, it will be like we need to hard code the sheetname. Here also we need to mention sheet name in dataset.
      I have posted a video to process multiple sheets in adf. Pls check the playlist 🙏

    • @subhashkomy
      @subhashkomy 3 ปีที่แล้ว

      @@AllAboutBI if you don’t mind, can you please share that video link?

    • @AllAboutBI
      @AllAboutBI  3 ปีที่แล้ว +1

      th-cam.com/video/Niod4uj9FZQ/w-d-xo.html pl chk here

    • @subhashkomy
      @subhashkomy 3 ปีที่แล้ว

      @@AllAboutBI thank you so much 😊

  • @TheVijaynegi
    @TheVijaynegi 3 ปีที่แล้ว

    just a doubt here why we add source information in metadata if we have to tell them all information again at 3rd step (in copy activity) isn't it making work double?

    • @AllAboutBI
      @AllAboutBI  3 ปีที่แล้ว

      You mean the data set?

    • @TheVijaynegi
      @TheVijaynegi 3 ปีที่แล้ว

      ​@@AllAboutBI Yes, I mean we get all detail of input file location on lookup.
      So in copy activity we just have to move file by providing the sink location
      but we have to add input detail again in activity.why?
      sorry might be i missed any point in video...

  • @junaidmalik9593
    @junaidmalik9593 3 ปีที่แล้ว

    That was in Great Detail . Thanks So much :)

    • @AllAboutBI
      @AllAboutBI  3 ปีที่แล้ว

      Thanks much Junaid.

  • @venkataswapna2086
    @venkataswapna2086 3 ปีที่แล้ว

    how can we ignore one file alone while copying using foreach?

    • @AllAboutBI
      @AllAboutBI  3 ปีที่แล้ว

      You can have a filter to filter to be loaded files.
      Else before copying use if condition and ignore

    • @venkataswapna2086
      @venkataswapna2086 3 ปีที่แล้ว +1

      @@AllAboutBI thankyou

  • @ayubshaik2415
    @ayubshaik2415 3 ปีที่แล้ว

    Hi mam, I have a scenario, i have .txt files in Blob and i want to load that files into SQL, Through SSIS
    Can you help me with this?

    • @AllAboutBI
      @AllAboutBI  3 ปีที่แล้ว

      Check the sand playlist. I hv s video related to it. Else chk my SSIS playlist