Ingest Data into Azure SQL Database using SSMS
14K views
May 1, 2024
This video shows how to ingest data into Azure SQL Database using SQL Server Management Studio.
View Video Transcript
0:00
Today, I'm going to show you how to ingest data into
0:04
the Azure SQL Database using SQL Server Management Studio. Let's get started. I'm going to come to this Demo Sales Database
0:16
so click on that. Then I can for now click on the Query Editor
0:21
and I want to see the table in my database. I'm going to go on and login with my credentials and click okay
0:29
I'm going to click on this tables and expand. I've got FTransaction table
0:36
I can go on and just write a simple select top five star from the FTransaction table
0:44
and then I can go on and run the query. This is going to return the top five records from the FTransaction table
0:54
We're going to go to the SQL Server Management Studio. In SQL Server, I want to click on the Connect in
1:00
the Object Explorer and choose Database Engine. In the Database Engine, I'm going to provide my server name
1:08
easily get that information by coming back to the overview in the Microsoft Azure
1:13
I'm going to for now click okay to un-save that. Then in the overview
1:18
I can see my server name displayed at the top here. So just go ahead and copy
1:24
Of course, to successfully connect to the SQL Server Management Studio, it is important to set the firewall
1:32
So click on the set server firewall, and then you want to scroll down
1:37
and then it is essential you click on add your client IP for address
1:42
Then once you do that, go ahead and save at the bottom
1:46
Then you should be able to login properly into the SQL Server Management Studio
1:51
So I'm going to come back here, and then I've got my server name, and of course, for the authentication
1:56
I specified SQL Server authentication, and then for my login, I've got my name and my password
2:02
and click on Connect. I'm successfully connected to the server. So I'm going to click on the Databases plus sign to expand
2:11
and then I'm going to see the demo sales database. So I'm going to expand
2:18
and of course, I'm going to come to the table, and then we should be able to see the F transaction table
2:25
we saw earlier in the Azure SQL database. Okay, so we have the database owner F transaction
2:34
So we want to go on and ingest this dimension tables. I've got lots of them in the CSV file
2:42
and then I'm going to go back to the SSMS, and then I'm going to right click on the demo sales database
2:48
and select task, and then we'll point to import data. For the data source
2:54
I'm going to click on this dropdown, and I'm going to scroll down. I want to access the Microsoft Excel
2:59
and then I can go on and browse through the Excel file path
3:03
and then we have the Excel version. So the first row has column names
3:08
So click on Next, and I want to choose the destination. Now I'm going to click on this dropdown
3:13
and I'm going to point to the Microsoft OLE database provider for SQL
3:19
Click on that. For the authentication, I'm going to click on this use SQL server authentication
3:24
and then for the username, I'm going to type my username, and then I'm going to type my password
3:30
and then of course, we have the demo sales database selected automatically
3:35
Now I can go on and click on Next, and then we have this copy data
3:42
from one or more tables of views. So click on Next, and then we can see all the worksheets
3:49
I can select the deep account manager category and so on downwards
3:54
and then click on Next. So we can go on and run immediately
3:59
in the save and run package. So click on Next, and then we have the complete wizard finished
4:06
to perform the following operations or actions. Click on Finish. So we can see that the data is being ingested
4:14
into my demo sales database. Okay, so there we go. We can see status, success
4:22
and then I can click on Close to close the window. I can right click and refresh the database
4:30
Right click and choose Refresh. So we should be able to see all the dimension tables
4:35
in the demo sales database. So click on the tables, and there we go
4:40
So we can see all the dimension table. I can right click on account manager
4:45
and select the top 1000 rows. Okay, so this is working pretty fine
4:52
Now I want to go back to the Azure SQL database, and then I want to click on
4:57
or go back to the SQL databases in the left panel and choose the demo sales database
5:03
And I want to click on the Query Editor. Click on that
5:07
And then I want to sign in using my authentication SQL server
5:11
And then when I come to the tables, I can see all the dimension tables
5:17
And of course I can just query one of them. So let's select style from the account managers table
5:25
And then we can go on and run the query. Okay, there we go
5:30
So this is basically how we can use the SQL server management studio
5:35
to ingest data into the Azure SQL database. I trust that you enjoyed this video
5:41
If you do, give it a thumbs up, share with your friends and comment
5:45
Thank you for watching. Bye for now
#Data Management
#Networking
#Operating Systems
#Software
#Technical Reference
#Transportation & Logistics