how to copy multiple csv files from blob storage to azure Sql? RRS feed

  • Question

  • Hi,

         I am having multiple .csv files in blob storage and loading them to sql table,using copy activity am able to load only one file,but how to copy all the files in blob.

    Thanks in advance

    Thursday, December 6, 2018 9:37 AM

All replies

  • Hi Naresh,

    Now you need to use an For each activity to wrap the copy activity, which loads data from one csv file into sql table. But before that, please use a Get Metadata activity to get all the file names in the blob container, then pass these fileNames into For each activity to loop copying them. This doc gives an example to copy data from multiple tables, which is quite similar with your requirement. Hope that helps.

    Thursday, December 6, 2018 1:33 PM
  • Hi Naresh,

    Copy activity supports load multiple files. You can either specify the folderPath only to copy all files under that path, or you can specify the fileName with wildcard like "*.csv" to copy all csv files under that path. Refer to this doc for more details: https://docs.microsoft.com/en-us/azure/data-factory/connector-azure-blob-storage#dataset-properties 

    Thursday, December 6, 2018 11:55 PM