Notebooks are a functionality available in Azure Data Studio, that allows you to create and share documents that may contain text, code, images, and query results. These documents are helpful to be able to share database insights and create runbooks that you can share easily.
Are you new to notebooks? don't know what are the uses for it? want to know how to create your first notebook? then you can get started in ADS notebooks checking my article for MSSQLTips.com here.
Once you have created your first notebooks and share them among your team, maybe you want to share it on your website or blog for public access.
even when you can share the file for download, you can also embed it on the HTML code.
On this post, I will show you how to do it.
What do you need?
It looks something like this:
After clicking the Go! button, the next window will show you the notebook rendered:
At this point, you could share this link on your site and the user can click on it to see your notebook contents, but what if you want to show the results directly on your website?
Embedding it into your website
You can use the IFrame HTML tag (reference here), with this tag, you can embed an external URL in your HTML code (just be aware of security risks of embedding external code in your application).
the code should look like this:
src="your nbviewer URL" >
The final result is this:
Not the best possible way ¯_(?)_/¯, but it is something.