Azure data factory - errors on columns that has name starting with @ (special characters)

Grover, Jyoti 40 Reputation points
2024-04-16T14:53:15.4866667+00:00

Azure data factory - errors on columns that has name starting with @ (special characters)

We have a csv file, it has first column with column name "@dataetag" .

Azure data factory - fails and gives error on that column. any solution to force process this column?

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

2 answers

Sort by: Most helpful
  1. AnnuKumari-MSFT 34,556 Reputation points Microsoft Employee Moderator
    2024-04-16T16:01:39.64+00:00

    Hi Grover, Jyoti ,

    Thankyou for using Microsoft Q&A platform and thanks for posting your query here.

    Could you please share more details as what exactly you have tried in your solution. Are you using copy activity to copy the data from csv source file to the target datastore ? Are you using dataflow ? Where are you exactly getting the error?

    I tried to create a sample csv file having first column as '@ID' and copied the file from one container to another using copy activity. It worked without any error.

    User's image

    User's image

    In case you are trying to copy from csv(ADLS) to SQL table, you could try mapping the column to remove @ in the target like below: @ sign in columnname

    However , if you are getting this error in dataflow, then kindly try removing auto mapping and use select transformation having replace function to replace @ with blank '' in the column name.

    Related resources: https://stackoverflow.com/questions/68216473/data-factory-special-character-in-column-headers

    https://stackoverflow.com/questions/70107912/how-to-escape-an-in-source-column-in-azure-data-factory

    Hope it helps. Looking forward to your response. Thankyou

    0 comments No comments

  2. Pinaki Ghatak 5,600 Reputation points Microsoft Employee Volunteer Moderator
    2024-05-27T10:24:58.74+00:00

    Hello @Grover, Jyoti

    The issue you are facing is because the column name starts with a special character @.

    Azure Data Factory does not support column names that start with special characters.

    To resolve this issue, you can rename the column in your CSV file to remove the @ symbol. Once you have renamed the column, you can then upload the updated CSV file to your data store and use it in your data factory pipeline.

    If you are unable to rename the column in your CSV file, you can try using a data transformation tool like Azure Databricks or Azure HDInsight to preprocess the data and rename the column before ingesting it into Azure Data Factory. This should solve your problem.


    I hope that this response has addressed your query and helped you overcome your challenges. If so, please mark this response as Answered. This will not only acknowledge our efforts, but also assist other community members who may be looking for similar solutions.

    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.