How to Import Data into Azure SQL Database

Written by
CloverDX
CloverDX

By the end of 2020, 67 percent of enterprise infrastructure will live in the cloud, and Azure is taking a large piece of that pie.

But, with 80 percent of data migration projects running over time and/or budget, it’s clear that most businesses have room for improvement when it comes to moving data.

With these facts in mind, it’s a good time to brush up on the fundamentals of using Azure SQL database.

Methods for importing and exporting data in SQL Azure database

Frankly, you’re spoiled for choice with methods for moving data with Azure.

Here are the most common methods:

  • Use Transact-SQL statements. Using the commands, BULK INSERT or OPENROWSET (BULK…), you can import data. These commands typically run in SQL Server Management Studio (SSMS).
  • Import using the Flat File Wizard. Using the Import Flat File Wizard in SSMS, you can import a text file into SQL server. This is best to do if you don’t need the configuration options in the Import and Export Wizard. If you need more help, Microsoft have a guide that gets into the weeds.
  • SQL Server Import and Export Wizard. If you have SQL Server Integration Services (SSIS) or SQL Server Data Tools (SSDT) installed, you can use the SQL Server Import and Export Wizard to import and export data.

Loading data from a CSV into Azure SQL Database

Another way to load data is to use the BCP command-line utility to import data from a CSV file into Azure SQL database.

Here’s how:

  1. Create a destination table. Define a table in SQL Database as the destination table. Ensure the columns in the table correspond to the data in each row of your data file.
  2. Create a source data file.
  3. Load the data. Open a command prompt, run the correct command, replacing the values for Server Name, Database name, Username, and Password with your own information.

Azure SQL database is well-optimized for users to move data around in a way that suits them. However, manually moving data with the methods we’ve covered isn’t the best solution for every business.

Life’s too short to wait on data

Moving data to/from Azure isn’t rocket science, but implementing it manually can be both problematic and time-consuming. That’s because writing and executing code can lead to errors and incorrect formatting, which ends up slowing data processes. Manual implementation also leads to costly errors further down the road.

The worst part? As your datasets grow in scale, and you go from terabytes to petabytes, these issues become even more problematic.

Automating the process, with a tool like CloverDX, dramatically improves this process. Error handling, sequencing of steps, ensuring data is on time - these are all easier when you automate your pipelines.

So, if you want to see how an automated solution can help you modernize and accelerate your data pipelines, download a free trial of CloverDX today.

New call-to-action

Posted on October 21, 2019
DISCOVER  CloverDX Data Integration Platform  Design, automate and operate data jobs at scale. Learn more

Related Content

Subscribe to our blog


Where to go next