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: 

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

Connect with Databricks Users in Your Area

Join a Regional User Group to connect with local Databricks users. Events will be happening in your city, and you won’t want to miss the chance to attend and share knowledge.

If there isn’t a group near you, start one and help create a community that brings people together.

Request a New Group