Azure Data Studio – extension for SQL Server Import

Last release note for Azure Data Studio was about the update the SQL Server Import extension that was moved to General Availability last month. From now on it is possible to import flat files like *.txt or *.csv into SQL table using Azure Data Studio.

Download a new version Azure Data Studio.

At first, I need to update my version of Azure Data Studio to the newest (version: 1.23.0), then I can install the extension. In Azure Data Studio in extension tab (on the left side), I need to find SQL Server Import, now I can install this extension.

Azure Data Studio – SQL Server Import extension installation

How does import to SQL Server from Azure Data Studio works?

The SQL Server Import extension for Azure Data Studio supports importing CSV or TXT files into SQL Server. In order to use the Import Wizard (Ctrl+I), I need to have an active connection to a SQL Server instance.

To activate flat-file import I need to use the shortcut or right-click on a database and select Import wizard.

Import wizard or CTRL+I

In the first step of the Import wizard, I need to specify my input file. I am choosing the server, database, location of my file and name of my table.

Specifying flat file for import

In the second step I can see preview of my importing file.

Preview of my importing file

In the third step, I can modify column names, data type, choose a primary key or allow nulls. Then I can click Import Data.

Modify columns name, data type, primary key, allow nulls

In the fourth step I have a Summary and information about successful insert.

Summary and information about inserting.

Now I can refresh my database in Azure Data Studio or in SQL Server to see a new table.

Refresh the database

Thank you, Magda

Leave a Reply