cancel
Showing results for 
Search instead for 
Did you mean: 
Data Engineering
cancel
Showing results for 
Search instead for 
Did you mean: 

Identity Column Issues

AJK1
New Contributor II

Hello.

I'm experiencing what I'm believe are pretty severe (current) shortcomings regarding Identity columns in Databricks.

I'm defining a SQL table using spark SQL - the table creates as exepcted; I've tried using both column definitions for this identity column.

CreateTable 

If I define the table using Generated Always I get the following error when inserting records:

Insert-GeneratedAlwaysI'm certain I am not providing any column values targeted for the identity column within the insert statement.

If I define the table using Generated By Default this statement executes and inserts data, but the identity column is completely NULL:

Command successimage 

For context, I'm on Azure DBR 12.2 LTS. I've tried on the 13.0 DBR, but still nothing.

Anything obvious I'm missing?

0 REPLIES 0
Welcome to Databricks Community: Lets learn, network and celebrate together

Join our fast-growing data practitioner and expert community of 80K+ members, ready to discover, help and collaborate together while making meaningful connections. 

Click here to register and join today! 

Engage in exciting technical discussions, join a group with your peers and meet our Featured Members.