How can I copy data from multiple subfolders as parquet tables in a folder with same subfolder name using Azure Data Factory?

Abhijit M 1 Reputation point
2022-03-28T11:15:55.07+00:00

I have a folder sturucture like:

Folder_1/Sub_Folder_1------>file_1_1.txt, file_1_2.txt, file_1_3.csv

Folder_1/Sub_Folder_2------>file_2_1.txt, file_2_2.txt

Folder_1/Sub_Folder_3------>file_3_1.txt, file_3_2.txt

Folder_1/Sub_Folder_4------>file_4_1.csv

Folder_1/Sub_Folder_5------>file_5_1.csv, file_5_2.csv, file_5_3.csv

Folder_1/Sub_Folder_6------>file_6_1.txt

I want to pick these files and save them as parquet table but the files from sub_folder_2 must be stored in the directory with same name i.e. sub_folder_2

Azure Data Factory
Azure Data Factory
An Azure service for ingesting, preparing, and transforming data at scale.
11,345 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Nasreen Akter 10,811 Reputation points
    2022-03-28T12:21:58.473+00:00

    Hi @

    Thank you for the ask.

    In the CopyActivity, there is an option in the SINK --> Copy Behavior --> Preserve Hierarchy which will give you the desire output. Thanks!

    187498-image.png


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.