Skip to content

T-SQL Tuesday 164 – Code that made me feel something

Reading Time: 3 minutes

For this months T-SQL Tuesday contribution I want to cover the last time I saw code that made me feel something.

Erik Darling hosts this months T-SQL Tuesday. Erik invites us all to talk about the last time we saw code that made us feel something.

You can read the original invitation by clicking on this link for the T-SQL Tuesday 164 invitation or on the image below.

T-SQL Tuesday 164 - Code that made me feel something
T-SQL Tuesday logo

Code that made me feel something

To be honest the last time I saw code that made me feel something is when I saw the possibilities within Microsoft Fabric.

Because you can work with various types of code within Microsoft Fabric depending on which experience you use. Like the ones shown in the below diagram above OneLake.

Microsoft Fabric experiences

Including good old T-SQL when working with Microsoft Fabric Data Warehouses. Like in the below example.

T-SQL in Microsoft Fabric Data Warehouse
T-SQL in Microsoft Fabric Data Warehouse

I covered what you can do within the various experiences in a previous post especially for those with a SQL Server background. Where I covered spreading your SQL Server wings with Microsoft Fabric.

Anyway, when I first saw the different coding options currently available within Microsoft Fabric, I felt pure excitement. I was excited at the thought of all of these experiences being made available within one Software as a Service solution.

Others are clearly just as excited about it as I am. Which explains why so many people are talking about it since the announcement at Microsoft Build 2023.

One key point to note is that Microsoft Fabric is now generally available. You can read more about this in detail in the official post by Ryan Majidimehr.

Code example

I will share a little-known fact about working with Microsoft Fabric Data Warehouses since this is a T-SQL Tuesday post.

You can view the T-SQL that is generated behind the scenes when working with the visual query editor in Microsoft Fabric Data Warehouse. By clicking on the ‘View SQL’ button.

View SQL button in the visual query editor

As you can see below, it can be interesting to view the generated SQL.

select [$Outer].[SalesOrderKey],
from [MSLearn Datawarehouse].[dbo].[FactSalesOrder] as [$Outer]
left outer join 
    select [_].[CustomerKey] as [CustomerKey2],
        [_].[CustomerAltKey] as [CustomerAltKey],
        [_].[Title] as [Title],
        [_].[FirstName] as [FirstName],
        [_].[LastName] as [LastName],
        [_].[AddressLine1] as [AddressLine1],
        [_].[City] as [City],
        [_].[StateProvince] as [StateProvince],
        [_].[CountryRegion] as [CountryRegion],
        [_].[PostalCode] as [PostalCode]
    from [MSLearn Datawarehouse].[dbo].[DimCustomer] as [_]
) as [$Inner] on ([$Outer].[CustomerKey] = [$Inner].[CustomerKey2])

Final words about code that made me feel something

I hope me talking about the last time code made me feel something has made for an interesting read.

For those looking to get started with Microsoft Fabric, I wrote a post a while back. Which covers how to create your own Microsoft Fabric environment. As well as options it also contains plenty of links to useful resources.

Of course, if you have any comments or queries relating to this post feel free to reach out to me.

Published inMicrosoft FabricT-SQL Tuesday

One Comment

Leave a Reply

Your email address will not be published. Required fields are marked *