Skip to content
SNOWGLOBE
All posts

Generated Columns

Martin DebusPosted on LinkedIn

Generated Columns in Databricks is a great feature to automatically create surrogate keys and populate columns using generation expressions.

Generated Columns are defined upon table creation. This can either be generated identity columns returning a unique value. Or it can be a SQL expression (generation expression) to populate a column automatically.

This enables engineers to define transformations (using the columns defined in the table) directly upon creating the table. I am not sure, if this is a good idea.

Certainly identity columns and operations on timestamps like extracting year, month and day are a useful tool. The documentation provides some useful examples.

Image 1 of 2 for the post Generated ColumnsImage 2 of 2 for the post Generated ColumnsView on LinkedIn

Working on this in your platform?

SNOWGLOBE helps teams set up, grow and run Azure Databricks platforms.