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.
Here is our newly exported Notebook ready for us to save. Notice the formatting in the Text cells with our HTML formatting.
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.
Enjoy your newly found ease of collaboration in Azure Data Studio with your colleagues.