Export Data from SQL Server to Flat File in Azure Data Factory

Marimuthu Kalyanasundaram 1 Reputation point
2021-05-29T03:20:59.967+00:00

Hi All,

I have to export the Fixed length file from my SQL query Input using Azure Mapping Data flow. Could you please anyone share the logic?

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

1 answer

Sort by: Most helpful
  1. PRADEEPCHEEKATLA 91,496 Reputation points Moderator
    2021-05-31T11:30:11.627+00:00

    Hello @Marimuthu Kalyanasundaram ,

    Welcome to the Microsoft Q&A platform.

    In below example I am trying to take "tbl_employees" table data in to Fixed length file.

    Source table:

    101066-image.png

    Emp_code column should save as 4 character fixed length

    Emp_name column should save as 10 character fixed length

    Emp_gender column should save as 10 character fixed length

    Here are the implementation steps:

    Step1: Add tbl_employees table as source in mapping data flow.

    101131-image.png

    Step2: Add derived column transformation to transform columns in to fixed length strings.

    101122-image.png

    Step3: use derived column transformation to combine all these columns(Emp_code, Emp_Name & Emp_gender) in to single column.

    101029-image.png

    Step4: Use select transformation to take only combined column that is column1.

    101085-image.png

    Step5: Load data in to desired location using Sink Transformation

    Below is the output fixed length file screenshot.

    101030-image.png

    Hope this helps. Do let us know if you any further queries.

    ---------------------------------------------------------------------------

    Please "Accept the answer" if the information helped you. This will help us and others in the community as well.


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.