Import CSV to SQL Server using Azure Data Studio

  Рет қаралды 16,210

ScriptBytes

ScriptBytes

Жыл бұрын

Learn two ways to import a CSV file into SQL Server using Azure Data Studio. This is a great option if you are like me and use a Mac for development but use SQL Server as your database.
The two options, that I know of, are using SQL Bulk Insert, and the SQL Server Import extension
Docs for Bulk Insert
learn.microsoft.com/en-us/sql...
Follow me on social media!
Twitter: / scriptbytesio
Instagram: / scriptbytes
Check out my blog!
scriptbytes.io/

Пікірлер: 61
@marchismo
@marchismo 3 ай бұрын
The most straight forward data import tutorial and I just spent hours watching multiple different videos. 🥰
@veccio
@veccio 5 ай бұрын
Thanks a bunch! Long time SQL Server user, first time running Azure Data Studio on macOS/Docker. I am super glad to see that there is decent extensibility and additional tools. Grateful for your helpul information.
@scriptbytes
@scriptbytes 5 ай бұрын
You are welcome!
@oliverselwyn
@oliverselwyn 11 ай бұрын
Thank you for your clear & comprehensive explanation!!! I was attempting to use the SQL Server Import in Azure Data Studio to import CSV and TXT files. It absolutely would not work and just timed out. Now I know another way to do it! Thanks again.
@scriptbytes
@scriptbytes 11 ай бұрын
You are welcome! I'm glad it helped out.
@PankajRaghunadhabhatla
@PankajRaghunadhabhatla 3 ай бұрын
i know better and easy way to do it
@dylanmariano6993
@dylanmariano6993 Ай бұрын
@@PankajRaghunadhabhatla how?
@top_1_percent
@top_1_percent Ай бұрын
Thanks a ton. This is very helpful for Mac users who love Microsoft Business Products and Services.
@Reglaized
@Reglaized Жыл бұрын
Two videos that helped me in one day, thank you!
@scriptbytes
@scriptbytes Жыл бұрын
Haha, glad they both helped! Thanks for watching.
@user-et8tr4xq7y
@user-et8tr4xq7y 4 ай бұрын
Thank you so much! You made it so clear and easily!
@scriptbytes
@scriptbytes 4 ай бұрын
You're welcome!
@shahnawazk
@shahnawazk Жыл бұрын
Very nice and informative, thanks and keep it up.
@scriptbytes
@scriptbytes Жыл бұрын
I appreciate that, thanks!
@RahulP572
@RahulP572 3 ай бұрын
Thanx for the explanation. There is one more way through which we can easily import the CSV files in Azure Data Studio by installing the "SQL Server Import" extension from the extension store.
@scriptbytes
@scriptbytes 3 ай бұрын
I talked about that extension in the video
@haithamdarweesh8781
@haithamdarweesh8781 Ай бұрын
What in case I already have a table and I want to append data
@user-dp7lr5qh6o
@user-dp7lr5qh6o 7 ай бұрын
thank you for clearly explanation
@user-kq3tc5tu1c
@user-kq3tc5tu1c 11 ай бұрын
Thank-You, Thank-You, Thank-You! Awesome video and I love the NASA t-shirt! Just knowing there is at least one other human being using Docker/Azure Data Studio for SQL makes me happy! I have experienced LOTS of headaches importing Excel as a CSV file. Recently, I've encountered challenges when dealing with dates. My best guess is that the Excel date data may be a bit wonky, or gets wonky when I "Save As CSV". Any "dealing with date data" experience you can share? Keep up the great work. You've earned my subscription to your channel AND a heartfelt "Like" for your efforts. Cheers! 😎
@scriptbytes
@scriptbytes 11 ай бұрын
I appreciate the kind words! Unfortunately I don't do importing into SQL this way very frequently, so I don't have a lot of tips to share about dates. I do know that Excel is notorious for misinterpreting some columns and what data type is in them, so you are probably onto something with it getting wonky when saving.
@trieutruong2410
@trieutruong2410 7 ай бұрын
great hint. Thank you. save me a lot of effort
@scriptbytes
@scriptbytes 7 ай бұрын
You’re welcome! Thanks for watching.
@musawasheshambare
@musawasheshambare 7 ай бұрын
you have earned my subscription sir, thank you
@scriptbytes
@scriptbytes 7 ай бұрын
I appreciate it, thanks!
@rickgrunewald5163
@rickgrunewald5163 Жыл бұрын
Very helpful, thanks!
@scriptbytes
@scriptbytes Жыл бұрын
You're welcome!
@amananand1997
@amananand1997 5 ай бұрын
Thank you for making a Mac/docker with Azure Data Studio video, still in the learning process helped a lot. Is there a way to import xls file as if I try with the extension it greys-out the xls files and I not able to import the file.
@scriptbytes
@scriptbytes 5 ай бұрын
I honestly don't do this very often, but I think you might have to save/export the xls as a csv and import that.
@DilanHamawandy
@DilanHamawandy 21 күн бұрын
Thank you!
@ayooluwatomisowole3347
@ayooluwatomisowole3347 4 ай бұрын
Thank you! I only have an issue with the second option using the extension. I downloaded SQL practice projects, which I am attempting to import into my Azure studio, but it wouldn't run after importing as its imported directly as an SQL file instead of a CSV. Any suggestions on how to change the SQL files to csv before importing into studio?
@scriptbytes
@scriptbytes 4 ай бұрын
I'm not too sure, sorry. Are the sql files rows of data, or are they actual sql statements to create tables and stuff like that?
@user-hf2hn7rb8q
@user-hf2hn7rb8q 11 ай бұрын
Hello! thanks for the video! Do u know how to import data into the existing table in Azure Data Studio except standard INSERT INTO command?
@scriptbytes
@scriptbytes 11 ай бұрын
The Insert Into or Bulk Insert are both options for existing tables. If you need something besides that you might look into an ETL tool (Extract, Transform, Load).
@winstonmulyawansetiabudi1739
@winstonmulyawansetiabudi1739 4 ай бұрын
Do you have any idea on how to import an excel file with multiple sheets to SQL Server? I use mac also, and when I tried using the Import Wizard, the data becomes crazy with weird characters.
@scriptbytes
@scriptbytes 3 ай бұрын
I haven't tried it with multiple sheets. Sorry.
@lanzly9540
@lanzly9540 9 ай бұрын
for some reason when choosing the "database the table is created in", my only option is "master" and not the db that I have created even though i didn't have the same problem before. Do you know why this problem is happening? Thanks in advance
@scriptbytes
@scriptbytes 9 ай бұрын
Unfortunately I haven't seen that issue before. Hopefully someone else can chime in!
@HenryFake
@HenryFake 10 ай бұрын
Thank you very much but how could I delete a column before step 4?
@scriptbytes
@scriptbytes 9 ай бұрын
I don't think you can unfortunately. I think you'd have to clean up the data you don't want from the csv before using the wizard.
@munfordable
@munfordable 5 ай бұрын
Thanks for the vid. Is there a way to import CSV into existing table with SQL Server import using primary ID's? or similar?
@scriptbytes
@scriptbytes 5 ай бұрын
I don't actually do imports very often like this, but I just looked at the docs and there is a KEEPIDENTITY option in the Bulk Insert command. That might be what you're looking for.
@carlosromero5051
@carlosromero5051 4 ай бұрын
EXCELLENT VIDEO.
@scriptbytes
@scriptbytes 4 ай бұрын
Thank you very much!
@abdulhakeemsanni7937
@abdulhakeemsanni7937 9 ай бұрын
this was very helpful, do you have any videos on data analysis on youtube?, i would really love to learn from you . i am just starting out tho
@scriptbytes
@scriptbytes 9 ай бұрын
No, I'm not much of a data analyst. I do mostly programming/development.
@rolanddelarosa7981
@rolanddelarosa7981 9 ай бұрын
i do not know how to find the docker container where you inout that code for permission😢
@scriptbytes
@scriptbytes 9 ай бұрын
You only need to do that part if you are running the database inside docker. I just included that because it's something that caught me off guard. If you are running it on your computer, or on a server, you don't need that.
@vaishnavitripathi307
@vaishnavitripathi307 8 ай бұрын
hey ... when I am doing the same 1. it is not installing directly, I have to install it from vxix. 2. even after installing it is not opening the wizard and showing "spawn Unknown system error -86" & "yet not activated". can anyone help me ? what is wrong with this . I cannot find any solution online .
@scriptbytes
@scriptbytes 8 ай бұрын
Unfortunately I’ve never seen that. Hopefully someone else can chime in and help out.
@tiagommtt
@tiagommtt 7 ай бұрын
thx man, but how do you separate data between semicolon?
@scriptbytes
@scriptbytes 7 ай бұрын
I haven't tested it, but I think you can use the FieldTerminator option in the bulk insert: FIELDTERMINATOR=';' learn.microsoft.com/en-us/sql/t-sql/statements/bulk-insert-transact-sql?view=sql-server-ver16#fieldterminator--field_terminator
@tiagommtt
@tiagommtt 7 ай бұрын
Thanks man im gonna try it out@@scriptbytes
@tjwinnguyen
@tjwinnguyen 3 ай бұрын
What if its a very large data set?
@scriptbytes
@scriptbytes 3 ай бұрын
I haven't done this with large datasets, so I'm not sure how well it would work.
@FahimMuntasir-od4ud
@FahimMuntasir-od4ud 6 ай бұрын
Thanks
@scriptbytes
@scriptbytes 6 ай бұрын
You're welcome!
@pachinkosv
@pachinkosv 11 ай бұрын
this is my issue, let me know for any idea: Cannot bulk load because the file ".../.../file_01012023csv" could not be opened. And another thing that I need is automatize this import for new files, how can I do that?
@scriptbytes
@scriptbytes 11 ай бұрын
It looks like you're trying to read the file over http, which I doubt it can do. You probably need to download the file first and then import the downloaded file. There are a million options for automating it. Any tool that can run a SQL command that can be scheduled could be used (ETL tools, APIs, scripts, etc). If you are on SQL Server you could also look into SQL Server Agent which can run a Job.
@pachinkosv
@pachinkosv 11 ай бұрын
@@scriptbytes the file is in a blob store, in this case, just is necesary write the foldername and filename in FROM label? thanks for your help
@ailleengonzales9372
@ailleengonzales9372 11 ай бұрын
Thank you!
@scriptbytes
@scriptbytes 11 ай бұрын
You’re welcome!
MongoDB Explained in 10 Minutes | SQL vs NoSQL | Jumpstart
11:18
HAPPY BIRTHDAY @mozabrick 🎉 #cat #funny
00:36
SOFIADELMONSTRO
Рет қаралды 17 МЛН
Clowns abuse children#Short #Officer Rabbit #angel
00:51
兔子警官
Рет қаралды 73 МЛН
New model rc bird unboxing and testing
00:10
Ruhul Shorts
Рет қаралды 23 МЛН
Beautiful gymnastics 😍☺️
00:15
Lexa_Merin
Рет қаралды 14 МЛН
How I use SQL as a Data Analyst
15:30
Luke Barousse
Рет қаралды 812 М.
Add Tailwind CSS to Blazor! | Build a Blog - Ep 01
9:52
ScriptBytes
Рет қаралды 1,5 М.
The 25 SQL Questions You MUST Know for Data Analyst Interviews
32:47
KSR Datavizon
Рет қаралды 201 М.
6 SQL Joins you MUST know! (Animated + Practice)
9:47
Anton Putra
Рет қаралды 123 М.
Process Excel files in Azure with Data Factory and Databricks | Tutorial
34:14
Adam Marczak - Azure for Everyone
Рет қаралды 114 М.
Смартфон УЛУЧШАЕТ ЗРЕНИЕ!?
0:41
ÉЖИ АКСЁНОВ
Рет қаралды 1,1 МЛН
Красиво, но телефон жаль
0:32
Бесполезные Новости
Рет қаралды 1,4 МЛН
Samsung Galaxy 🔥 #shorts  #trending #youtubeshorts  #shortvideo ujjawal4u
0:10
Ujjawal4u. 120k Views . 4 hours ago
Рет қаралды 8 МЛН
Klavye İle Trafik Işığını Yönetmek #shorts
0:18
Osman Kabadayı
Рет қаралды 6 МЛН
ГОСЗАКУПОЧНЫЙ ПК за 10 тысяч рублей
36:28
Ремонтяш
Рет қаралды 509 М.