cancel
Showing results for 
Search instead for 
Did you mean: 
Data Engineering
Join discussions on data engineering best practices, architectures, and optimization strategies within the Databricks Community. Exchange insights and solutions with fellow data engineers.
cancel
Showing results for 
Search instead for 
Did you mean: 

data type that cannot participate in a columnstore index Error

DataEng1
New Contributor

Hi All

I am trying to insert DF into Synapse table. I need to insert string type columns in DF into Nvarchar fields in Synapse table. I am getting the error ' data type that cannot participate in a columnstore index Error'  

 

Can someone guide on the issue? Appreciate it.

 

1 REPLY 1

Kaniz_Fatma
Community Manager
Community Manager

Hi @DataEng1you are trying to insert a DataFrame with string type columns into a Synapse table with NVARCHAR fields and encountering a ’data type that cannot participate in a columnstore index Error’.

The issue is likely occurring because you are trying to cast a string-type column to varchar.

In Databricks Runtime 8.0 and above, the varchar data type can only be used in table schema and cannot be used in functions or operators.

As a result, casting from string to varchar is not supported.