Auto Create in Copy Activity giving Column 'EmpId' has a data type that cannot participate in a columnstore index.',

Neha 101 Reputation points
2022-07-06T13:24:09.847+00:00

I used copy activity to load multiples files to multiple tables according to filename. which means i need to autocreate the tables for new files. However i am getting below error i suppose it is failing while table creation

ErrorCode=SqlOperationFailed,'Type=Microsoft.DataTransfer.Common.Shared.HybridDeliveryException,Message=A database operation failed with the following error: 'The statement failed. Column 'EmpId' has a data type that cannot participate in a columnstore index.',Source=,''Type=System.Data.SqlClient.SqlException,Message=The statement failed. Column 'EmpId' has a data type that cannot participate in a columnstore index.,Source=.Net SqlClient Data Provider,SqlErrorNumber=35343,Class=16,ErrorCode=-2146232060,State=1,Errors=[{Class=16,Number=35343,State=1,Message=The statement failed. Column 'EmpId' has a data type that cannot participate in a columnstore index.,},],'

File content is very less, simple like below

DeptID,DeptName
1,IT
2,HR
3,Finance
4,Manufacturing

Source - Files in Azure Blob Storage
Destination - Azure Sql Database

Can you please help me with solution

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

Accepted answer
  1. Bhargava-MSFT 31,261 Reputation points Microsoft Employee Moderator
    2022-07-15T22:47:48.923+00:00

    Hi @Neha ,
    If you are using Azure SQL DW then please select synapse analytics as your dataset. then you should be able to create the table with the "Autocreate" option. Please try and let me know. If have any further questions, please let us know.

    1 person found this answer helpful.

1 additional answer

Sort by: Most helpful
  1. Subashri Vasudevan 11,231 Reputation points
    2022-07-06T15:00:36.117+00:00

    Hi @Neha ,

    Thanks for the ask and for posting it on MS Q&A platform.

    Can you please check this link and confirm if your column types aren't any of the listed? Probably the first column is implicitly treated as char(1).

    Thanks


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.