Azure data factory dataset first row as header

Pankaj Joshi 411 Reputation points
2023-06-20T07:37:49.31+00:00

In adf dataset I have unchecked property "first row as header" Since I don't need columns in output csv file. But in output file it's creating a blank row on the top ( see screenshot) which I don't need. How to remove it from output file. I am using data flow and in source activity dataset I have unchecked first row as header property. IMG_20230620_130441.jpg

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

1 answer

Sort by: Most helpful
  1. AnnuKumari-MSFT 34,566 Reputation points Microsoft Employee Moderator
    2023-06-21T11:35:49.3866667+00:00

    Hi PJ ,

    Thankyou for using Microsoft Q&A platform and thanks for posting your question here. As I understand your question, you are witnessing a blank row at the top of the output file which is not expected and you want to remove it. Please let me know if that is not the correct understanding.It would be great if you could share the screenshot of the source file data so that we can replicate your scenario exactly.

    First of all, when you uncheck the 'first row as header' option ADF will treat the header as the first row in the dataset. It will not erase the column name . I suspect that the empty record is present in the source file in your case. Kindly recheck the same.

    In order to remove the column names and avoid empty row generation in the target file , you can try one of these approaches:

    1. Keep the 'first row as header' unchecked in source dataset and provide 1 in the skip line count in source setting. In case your source file has an empty row, then use 2 in skip line count.

    User's image

    1. Use filter transformation with the condition: !isNull(Column_1) && !isNull(Column_2)after source transformation

    Hope it helps. Kindly accept the answer if it is helpful. Thankyou


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.