Starting from #databricks runtime 12.2 LTS, implicit lateral column aliasing is now supported. This feature enables you to reuse an expression defined...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-06-2023 03:12 AM
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."
- Labels:
-
databricks
-
LTS
-
SQL Queries
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-06-2023 03:45 AM
@Hubert Dudek , I guess this has been updated in recent update right ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-06-2023 05:09 AM
Thanks @Hubert Dudek for the info. Now 50% of my subselects can go to the trash 🙂
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-06-2023 05:17 AM
Informative
Thanks for sharing.