Adding headers to a txt file in ADF

Anandhakumar Cholendran 45 Reputation points
2024-10-14T07:11:26.99+00:00

Hi Team,

I am having a .txt file where I have data without headers, which is separated by delimiter. how do I add headers to txt file using ADF Dataflow? Suggestions Please!

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

1 answer

Sort by: Most helpful
  1. PRADEEPCHEEKATLA 90,241 Reputation points
    2024-10-14T09:48:25.1833333+00:00

    @Anandhakumar Cholendran - Thanks for the question and using MS Q&A platform.Here are the steps to add headers to txt file using ADF Dataflow:

    Step1: Create a data flow and add a source and point to the text file located in the storage account and make sure to the ignore selecting First row as header option.

    User's image

    Step2: Repeat the same for adding the sink where you want the output to be stored.

    Step3: Select Sink and go to mapping option and I would suggest you disable Auto mapping in Sink's Mapping tab and then name Output columns as column header name as per your requirement.

    User's image

    Step4: Click on datapreview option to shows the data with headers to output file.

    User's image

    Step5: Add a Data flow activity and attach the dataflow created and run.

    User's image

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


    If this answers your query, do click Accept Answer and Yes for was this answer helpful. And, if you have any further query do let us know.

    0 comments No comments

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.