Azure Data Factory : Get Metadata activity giving incorrect columnCount

Prakamya Aishwarya 121 Reputation points
2021-12-21T07:23:07.6+00:00

Hi Team,

When working with Delimited dataset, get metadata activity is giving wrong column count if the first row is having empty columns at the end.

We are using csv files. PFB the sample data-

1,Delhi,,
2,UP,23,56
3,Punjab,64,22

The get metadata activity is returning columnCount of 3 for this data, whereas the expected columnCount is 4.

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

Accepted answer
  1. ShaikMaheer-MSFT 38,486 Reputation points Microsoft Employee
    2021-12-21T16:38:28.66+00:00

    Hi @Prakamya Aishwarya ,

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

    If your first row will not have any data for last column then Azure data factory delimiter text formatter is going to ignore that column. Hence, you see in your case it as 3 columns only.

    To avoid this issue, we can consider below work arounds,

    • Alter source file to add one more extra comma at the end.
    • Load schema of Dataset from dummy sample file from local, instead of loading it from connection or store.

    Between, I agree with your point that we can consider this as bug may be to see if this can be fixed. I raised concern with product team. I will be updating thread here once I here back response. Thank you.

    Hope this will help. Please let us know if any further queries.

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

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

    2 people found this answer helpful.

1 additional answer

Sort by: Most helpful
  1. jiexin zhou 26 Reputation points
    2022-11-29T18:13:30.333+00:00

    Hey @ShaikMaheer-MSFT ,

    thanks for the explanation.

    Is there any update for this bug fixing? We are facing the same issue by using Get MedataData actitity towards TEXT files.
    Or is there any link where we can vote for this bug fix?

    Thanks and kind regards

    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.