Azure Data Studio – Setting up your environment

This blog entry comes from Buck Woody, who recently rejoined the SQL Server team from the Machine Learning and AI team.

For those of you who haven’t met me or read any of my books or blog entries, it’s great to meet you! I’ve been a data professional for over 35 years, worked at a variety of places like NASA, various consulting firms, and here at Microsoft since 2006. I started on the SQL Server team, and then helped ship Microsoft Azure. After that I spent some time in Microsoft Consulting Services, then over to the Machine Learning team in Microsoft Research, and then the Machine Learning and AI team. I’ve rejoined the SQL Server team to help with the inclusion of Apache Spark, Kubernetes, and the Machine Learning and AI features. I’ll still be blogging at my regular location, and from time to time I’ll chime in here on the SQL Server blog. As I learn something new, I’ll share it. This time I’ve learned about a great new tool the team has put together. Azure Data Studio  is a new tool that you can use to work with SQL Server.

You may be thinking wait – don’t we already have a lot of those? Isn’t that the SQL Server Management Studio (SSMS), or “Data Dude” (SQL Server Tools for Visual Studio) or even Visual Studio Code with the add-in for SQL Server?

Well, yes. And those still work just fine – but Azure Data Studio goes further than those tools. And it does some things differently.

Multi-Source

In Azure Data Studio, you can connect to multiple data systems, not just SQL Server, like Apache Hadoop HDFS,  Apache Spark, and others. And if you don’t find what you need, you can make more.

Multi-Platform

SQL Server Management Studio is an amazing tool. When I started at Microsoft in 2006, that’s the product I worked on building. I know it VERY well. But it only runs on Windows. Is that a problem? Well, yes, and no. If you live in Windows all day exclusively, then that’s fine. But if you run a Mac or Linux, then you need a tool that runs on those platforms, and Azure Data Studio does just that. In fact, it does it quite well. I’m typing this on a Mac right now (in Azure Data Studio, no less) and it even maps the keyboard to a Mac-like paradigm. You can also run an add-on to map the keyboard to SSMS.

On each platform, when you start Azure Data Studio, it checks itself and all your extensions and gives you the option to update them, regardless of your platform.

Extensibility

Perhaps the biggest argument for a new tool for working with data is that Azure Data Studio has a fully functional extension feature. This means that Azure Data Studio works more as a platform where you can add in new functionality, themes, etc. that Microsoft, vendors, and even you can create extensions to do what you need. Do you need a tool that manages SQL Server Agent? We have that. Need search tools, check scripts, reports, or Jupyter Notebooks? Check. Need something else? Write it. We’ll show you how. If there isn’t something for a platform you regularly work with, contact that vendor and send them the link to create extensions, and have them publish it to the github.

I’m a huge fan of Visual Studio Code. I use it for everything, and Visual Studio Code has LOTS of extensions. And here’s a cool tip: You can use almost all of them in Azure Data Studio. At the end of this post, I’ll show you how to install an extension along with a few of my favorites I always use in my day-to-day coding.

You can also create widgets to show information about your system.  Learn how to do that in this guide.

Environment and Workspaces

If you’re sold on trying out Azure Data Studio, get it installed, and get started setting up.

Workspaces

You can connect to servers and open a directory easily from inside the tool.  The top left two icons will handle that for you. Azure Data Studio also has the concept of Workspaces, which is similar to how you might think about a solution or project in SSMS or Visual Studio. The key is that Workspaces aren’t as rigid as a solution or project. You can include a lot of files located in many places in a single file, such as MyFavoriteFilesAndFolders.code-workspace, that you can simply double-click to open it all at once in Azure Data Studio. Use the File | Save Workspace As menu item to create a Workspace. This feature alone sells me on using this for day-to-day work. Pair that with github integration, and it’s where I spend most of my time.

Task List

As your system works, you’ll see information about what it’s doing and has done in the Task History icon on the left.

Integrated Terminal(s) and output panels

In every operating system, you have a shell (or terminal) of some type that you often need to work with. In Azure Data Studio, you can run those right in the Azure Data Studio environment – and you can run several of them. You can have PowerShell and CMD running, or even the Azure Command-line interface (CLI) shell in the terminal where you can run a quick command.

Setting up your environment

I use Azure Data Studio as my primary work environment for everything from SQL Server code, to Python, R, PowerShell, Apache Spark, and more. It’s become my go-to integrated development environment (IDE). Here’s how I set mine up.

The first thing I care about is how my environment is laid out, and how it looks. When I work, I like a dark environment with brightly colored fonts. So, my primary theme is dark-plus-syntax. For presenting, which I now do in Azure Data Studio, even replacing PowerPoint in some cases, I use Quiet Light, a built-in theme. You can change those after you install the ones you like by opening the Color Theme picker with File > Preferences > Color Theme. You can open this via Code > Preferences > Color Theme on macOS.

Next, I add in the extensions I want. To do this, click the Extensions icon on the left, and select the Install button on the extension you want from the list. This will either re-install or open a web page. If the former happens, wait a moment while the extension loads, and then click the Reload button to activate it.

If the extension installation opens a web page, then download the .visx file you see on that page. Save that to a location on your hard drive, and then open Azure Data Studio, click the File menu item, then Install Extension from VISX Package. Point to the file you downloaded and when it finishes, click the Reload button next to the extension.

We already have several extensions in the list for you, but here’s a cool trick – you can actually load most extensions on the Visual Studio Code Marketplace. All you have to do is the following:

  1. Open the VS Code Marketplace
  2. Search for the extension you want
  3. Click the icon for that extension to go to its source page
  4. On the right-hand side of that page, look for the section marked Resources
  5. Click on the Download Extension link
  6. Save the file on your hard drive
  7. Open Azure Data Studio
  8. Click the File menu item, then Install Extension from VISX Package
  9. Point to the file you downloaded
  10. When the install finishes, click the Reload button next to the extension

Here is a list of the ones I use a lot:

  • SQL Server 2019 extension (preview)
  • Copy Markdown to HTML
  • Docker Explorer
  • Docs-markdown
  • Excel Viewer
  • First Responder Kit
  • GitLens
  • HCQ
  • Kubernetes Support
  • Live HTML Previewer
  • Markdown Preview Enhanced
  • Open in Browser
  • Python
  • R
  • Redgate SQL Search
  • Server Reports
  • SQL Server Agent
  • SQL Server Import
  • SQL Server Profiler
  • SQLite
  • TODO Highlight
  • Vscode-reveal
  • Whoisactive

I’ll be blogging more about Azure Data Studio as I continue the journey. If you’re ready to get started, you can download Azure Data Studio here.

We welcome feedback and suggestions, just click Help and then Report Issue to file a bug or a feature request.  This puts it right in our tracking system. Be verbose, include screenshots, and most of all add a gif of what you’re doing! It helps us fix things faster.