SqlColumnNameNotExist

Bheemaraju Vinay Kumar 20 Reputation points
2025-02-25T05:38:05.56+00:00

Hi Data Factory team,

While working on "COPY DATA TO SQL" I am facing the issue like:

Error code: SqlColumnNameNotExist

Failure type: User configuration issue

Details: Failure happened on the 'Sink' side. ErrorCode=SqlColumnNameNotExist,'Type=Microsoft.DataTransfer.Common.Shared.HybridDeliveryException,Message=Column 'reported_data' does not exist in the target table '[covid_reporting].[cases_and_deaths]'.,Source=Microsoft.DataTransfer.Connectors.MSSQL,'

Copy Data to SQL error

I have uploaded the resources file into the Azure SQL server and created the tables in the database. In the "covid_reporting.cases_and_deaths" the column name is mentioned correctly. Here is the screenshot below.created table

Don't know why the pipeline is not debugging.

SINK

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

Accepted answer
  1. Chandra Boorla 10,160 Reputation points Microsoft External Staff
    2025-02-25T05:54:48.9733333+00:00

    Hi @Bheemaraju Vinay Kumar

    Thank you for posting your query!

    The error SqlColumnNameNotExist occurs because the column reported_data does not exist in the target table covid_reporting.cases_and_deaths. Based on your table schema, the correct column name is reported_date.

    Steps to Resolve:

    Verify Column Mapping in ADF - Open the Copy Data activity. Navigate to the Mapping tab. Ensure the source column is mapped to reported_date, not reported_data.

    Check Source Data - Ensure the source dataset contains a column named reported_date. If the source column is incorrectly named reported_data, consider renaming or transforming it before copying.

    Validate SQL Table Schema - Run the following query in Azure SQL to confirm the correct column name:

    SELECT COLUMN_NAME 
    FROM INFORMATION_SCHEMA.COLUMNS 
    WHERE TABLE_SCHEMA = 'covid_reporting' 
      AND TABLE_NAME = 'cases_and_deaths';
    

    Refresh the Sink Dataset Schema in ADF - Open ds_sql_cases_and_deaths (your sink dataset). Click "Preview Schema" to refresh the structure. Manually update the column mapping if needed.

    Republish & Rerun the Pipeline - After updating the mapping, publish your changes and rerun the pipeline.

    By addressing these areas, you can resolve the SqlColumnNameNotExist error and ensure seamless data ingestion into SQL.

    I hope this information helps. Please do let us know if you have any further queries.


    If this answers your query, do click Accept Answer and Yes for was this answer helpful. And, if you have any further query do let us know.

    1 person found this answer helpful.
    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Nandan Hegde 34,426 Reputation points MVP
    2025-02-25T05:48:01.55+00:00

    The column name in sink is reported_date whereas the error is for column : reported_data
    Check the mapping in the copy data activity

    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.