get the metadata of a csv file by skipping the first two rows

Dheeraj Kumar Reddy Jogi 21 Reputation points Microsoft Employee
2022-03-09T04:38:54.09+00:00

I have a csv file where i have the schema in the 3rd row.
I need to get the columns names only(metadata) from the csv file by skipping the first and second row.

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

Accepted answer
  1. ShaikMaheer-MSFT 38,546 Reputation points Microsoft Employee Moderator
    2022-03-09T06:14:57.773+00:00

    Hi @Dheeraj Kumar Reddy Jogi ,

    Thank you for posting query in Microsoft Q&A Platform.

    As I understand ask here, you are trying to get schema of your csv file in azure data factory. Please correct me if I am wrong.

    This can be done using GetMetaData activity. We can leverage skip line count field to skip starting unwanted rows. Use Structure as Field List inside GetMetaData activity.

    Please check below screenshots and details for better idea.

    My source file:
    181263-image.png

    Dataset for csv file in ADF:
    181248-image.png

    GetMetaData activity to get structure of csv file:
    181291-image.png

    Output json of GetMetaData activity:
    181283-image.png

    Hope this helps. Please let us know if any further queries.

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

    Please consider hitting Accept Answer. Accepted answers helps community as well.


0 additional answers

Sort by: Most helpful

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.