i want load table data into multiple files based on record count

Anonymous
2023-08-24T13:34:22.5+00:00

i want to load table data into multiple files using ADF.

ex:in a table 1000 records so i want load first 1-100 records into 1 file and second 101-200 in the second file and so on. how can i achieve this using ADF.

Azure Data Factory
Azure Data Factory
An Azure service for ingesting, preparing, and transforming data at scale.
{count} votes

2 answers

Sort by: Most helpful
  1. Subashri Vasudevan 11,306 Reputation points Volunteer Moderator
    2023-08-24T16:18:25.3966667+00:00

    Hi,

    1. You can use a script activity to find out number of rows in your table. Screenshot 2023-08-25 at 8.41.46 PM
    2. Add a data flow, with a integer parameter again called rowcount
    3. Pass the rowcount from variable to the data flow parameter as shown (Click on data flow activity, and go to parameters tab and click on rowcount parameter. then Choose pipeline expression and provide the expression given as below) Screenshot 2023-08-25 at 8.42.47 PM
    4. click on Optimize tab in data flow sink and give the settings as shown. this will make sure to split your table rows as per your ask. Screenshot 2023-08-25 at 8.45.29 PM
    5. If you dont want to give default names to the partitioned files, use below setting Screenshot 2023-08-25 at 8.45.09 PM
    6. Just one thing to note, Round robin doesnt put first 100 in one partition, but it splits rows in round robin fashion. Please try these and let us know. thanks

  2. Anonymous
    2023-09-04T11:29:32.9433333+00:00

    any update

    0 comments No comments

Your answer

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