How to ship SQL Jupyter Notebooks and Books directly to Azure Data Studio by creating an extension in the Marketplace

Table of Contents

The recently released Extension Generator for Azure Data Studio has opened up yet another way to ship Notebooks and Books to ADS allowing you to easily author your extensions.

In my previous post I’ve detailed how you can now access a Book remotely, now, if you want the book to be actually installed in your ADS instance, you can install it as an extension!

Follow this link for the SQL Server Diagnostic Book as an extension, in this post we’ll look at the feature in a general way.

How to create Notebook/Books extensions

Microsoft has produces some pretty good documentation about the whole process:

The whole process is based around the command line, using tools like npm , yo and vsce, however, you don’t have to be a proper Node.js dev to take advantage of this new tool; in fact, I know nothing about web development and look at me creating extensions and how-to articles 🙃

Missing Features

The publish process isn’t still supported for ADS extensions, hence you cannot directly publish them to the Marketplace like it’s possible with VS Code extensions (on which ADS is based on)

At the moment the marketplace onboarding is still a manual process, managed via Pull Requests in the ADS Github repository, hence an extension will be published in the marketplace only if your PR gets accepted in time for the next release of ADS, I’m working on it.

Using your own publisher name

in the tutorials above, the publisher name is left as the default value (Microsoft), this is probably because, as stated above, the publish feature isn’t yet present for ADS extensions.

For my SQL Server Diagnostic Book, I wanted to use my own publisher name, in order to be ready to publish whenever the feature gets implemented, and to reserve my publisher ID; this was actually the most difficult part of the whole extension authoring

If you want to register a publisher as an individual, you’ll have to do the following:

Later on, you’ll have to type the following to use your publisher from your machine:

In this way your VSCE is ready to publish to the marketplace, whenever it will be seamless for ADS

How to publish your extension right now

The process is still a bit tricky, hopefully the marketplace will be standardized as the VSCode one soon enough.

To include your extension in the marketplace, right now, you’ll have to modify these files (they have their own dedicated branch in the repository) in the ADS GitHub repository and make a pull request in order to get them included in the next release.

There are no specific instructions, the point is to just copy/paste the previous entry in the JSON file and add your specific information, nothing too crazy for someone that already managed to create your own extension.

Unfortunately you’ll have to wait until the next release of ADS to see your extension go live in the marketplace (unless you use the insider versions) as the marketplace list it’s included in the application code.

comments powered by Disqus

Related Posts

How to use Grafana (on docker) to monitor your SQL Server (eventually on docker too) - feat. InfluxDB and Telegraf

In this container-centric era to complement my SQL Server instance on docker (previous articles here ) I’ve looked over containerized monitoring solutions, and chose Grafana as my first candidate; spoiler: everything is simple once you’ve figured out how this stuff works, which can be not trivial for a Windows Guy (like me)

Read More

A script to automatically align columnstore indexes to enhance segment elimination (and hence performances)

Columstore indexes are a “new” neat data structure that I like, even if technically they’ve been around for years, only recently they’ve become usable by most customers.

Read More

Tracking Dynamic SQL performance automatically with a wrapper on sp_executesql (Dynamic SQL Inception)

in some projects I have a lot of Dynamic SQL going on, some queries are fast, some queries are slow, it depends on how the dynamic statement is actually put together ¯\_(ツ)_/¯ Tracking the performance of such statements is usually difficult because you don’t really know “why it’s slow” and you have to interpolate data from the app and the plan cache (if the plan is still there and wasn’t purged due to memory pressure) and try to figure out which was the piece of the offending dynamic SQL and why it did that.

Read More