Share via

Need help with error code: DelimitedTextMoreColumnsThanDefined

Glenda 1 Reputation point
2022-02-09T15:01:37.977+00:00

I am using the Copy activity to copy a file from blob storage to data lake.
It is giving the error:

ErrorCode=DelimitedTextMoreColumnsThanDefined,'Type=Microsoft.DataTransfer.Common.Shared.HybridDeliveryException,Message=Error found when processing 'Csv/Tsv Format Text' source 'ES_TRANSACTION_20220208020013.csv' with row number 3: found more columns than expected column count 21.,Source=Microsoft.DataTransfer.Common,'

The input file has 23 columns in every row, comma delimited. The copy is set up to skip the first row. The second row ends with a couple of nulls, separated by commas and I think the copy is failing on the 3rd row which has the trailing columns populated.
How can I resolve this?

Azure Data Factory
Azure Data Factory

An Azure service for ingesting, preparing, and transforming data at scale.


1 answer

Sort by: Most helpful
  1. ShaikMaheer-MSFT 38,631 Reputation points Microsoft Employee Moderator
    2022-02-10T15:37:16.25+00:00

    Hi @Glenda ,

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

    This error may happen because of multiple reasons. May be column count is larger than first row's column count. Or May be you might have specified wrong compression or format settings. Or May be source is a folder, the files under the specified folder might have a different schema.

    Click here to know more about it.

    By seeing your ask, it seems in your case there may be some rows may have column count larger than the first row's column count. In your case you skipped first row, hence second row becomes first row. Kindly check column counts in all rows and correct them to avoid this error.

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

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

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

    Was this answer helpful?


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.