Loading Sample Data

Let's load our dataset into Azure Data Studio.

We'll cover the following

Introduction

SQL queries generally return rows and columns, which is often enough, especially with small datasets. However, if you have a larger result set and/or you have the need to share the information, this chapter will illustrate how Azure Data Studio can help. As data professionals, it is often helpful to visualize a set of data and share results and analysis with our co-workers, internal and external clients, or even other workstreams. Instead of relying on external applications, ADS is happily a one-stop-shop to create, run, visualize, and export your database queries.

Getting started

Beginning with this chapter, we are going to use a database named car_crash, which is a small DataMart created from data provided by the NYC OpenData website. This dataset provides information on car accidents that have occurred in the five major NYC boroughs over an approximate eight-year period (July 2012 through Feb 2020). The database is provided as a SQL Server 2019 backup (.bak) file. Use this link to download it from the course GitHub site.

After downloading, you can use Azure Data Studio to restore this database using the following steps:

Note: Restoring databases should always be performed with caution because you have the potential to overwrite an existing database.

  1. Unzip the downloaded file called car_crash.zip (which is most likely located in your download folder) and place the .bak file in a convenient location to be referenced in step 5 below.
  2. Using a server-level connection from the SERVERS sidebar, right-click the SQL Server where you would like to restore this database and select “Manage,” as shown below:

Get hands-on with 1400+ tech skills courses.