Azure Data Studio – 12

Episode 12 – TSQL -> Notebook

Views 61

One of the best features available to assist us as Data Professions was the introduction of Notebooks and the ease of us creating and using these inside of Azure Data Studio.

Recently as part of a Hackathon a new feature “Export as Notebook” & “Export Notebook as SQL” has made it’s way into the Insiders Edition as at the time of this post.

Yes you will need to have the insiders edition installed to use this feature but stay tuned for it being available in the GA version soon.

This new feature makes our lives easy in being able to create Notebooks from our existing T-SQL scripts. This will make life so much easier for you and your team in collaborating and using the same scripts and processes.

Let’s have a look at how easy this is. We need to use block comments as this picks up and denotes the text cells and the code cells.

If you know a little bit of HTML you can do some work on your T-SQL and when you convert you will have some formatted comments in your text cells.

With our T-SQL created and commented like you can see below, when you click on the Export as Notebook, we get our New Notebook broken into our text and code cells with all of our pre-setup comments.

clip_image002

Here is our newly exported Notebook ready for us to save. Notice the formatting in the Text cells with our HTML formatting.

clip_image004

To go in reverse from a Notebook back to a T-SQL script, open your Notebook and click on the arrow in the top right corner.

clip_image006

Enjoy your newly found ease of collaboration in Azure Data Studio with your colleagues.

Warwick

I am a Microsoft Data Platform MVP as well as a Microsoft Certified Master working as the Principal Consultant here at SQL Masters Consulting. When I am not working with the SQL Server Stack I like to get away to the Snow and spend time Snowboarding.

Search
0

Your Cart