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: 

Starting from #databricks runtime 12.2 LTS, implicit lateral column aliasing is now supported. This feature enables you to reuse an expression defined...

Hubert-Dudek
Esteemed Contributor III

Starting from #databricks runtime 12.2 LTS, implicit lateral column aliasing is now supported. This feature enables you to reuse an expression defined earlier in the same SELECT list, thus avoiding repetition of the same calculation.

For instance, in a SELECT statement with expressions like:

SELECT

'John' AS name,

'Smith' AS surname,

Concat(name, ' ', surname) AS full_name

the Concat(name, ' ', surname) can be resolved using previously defined 'John' AS name and 'Smith' AS surname.

This makes writing SQL queries easier and more efficient, as you can reference expressions that have already been defined without needing to repeat them."

ezgif-3-d3fac0139c

1 REPLY 1

Anonymous
Not applicable

Thanks for sharing this with the Databricks community.

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