Import CSV to SQL Server using Azure Data Studio

แชร์
ฝัง
  • เผยแพร่เมื่อ 20 ม.ค. 2025

ความคิดเห็น • 66

  • @marchismo
    @marchismo 9 หลายเดือนก่อน +4

    The most straight forward data import tutorial and I just spent hours watching multiple different videos. 🥰

  • @veccio
    @veccio 11 หลายเดือนก่อน

    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  11 หลายเดือนก่อน

      You are welcome!

  • @Reglaized
    @Reglaized ปีที่แล้ว +2

    Two videos that helped me in one day, thank you!

    • @scriptbytes
      @scriptbytes  ปีที่แล้ว

      Haha, glad they both helped! Thanks for watching.

  • @oliverselwyn
    @oliverselwyn ปีที่แล้ว +1

    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  ปีที่แล้ว

      You are welcome! I'm glad it helped out.

    • @PankajRaghunadhabhatla
      @PankajRaghunadhabhatla 9 หลายเดือนก่อน

      i know better and easy way to do it

    • @dylanmariano6993
      @dylanmariano6993 7 หลายเดือนก่อน

      @@PankajRaghunadhabhatla how?

  • @bikrampandher
    @bikrampandher 2 หลายเดือนก่อน

    How do you handle blank lines in bulk inserts? it throws error

  • @celebrando_a_vida
    @celebrando_a_vida 5 หลายเดือนก่อน

    Thank you for the demonstration. I created a table with specific columns and want to import .csv file but which will import only the columns you define in the table.

  • @tiagommtt
    @tiagommtt ปีที่แล้ว +1

    thx man, but how do you separate data between semicolon?

    • @scriptbytes
      @scriptbytes  ปีที่แล้ว +1

      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 ปีที่แล้ว

      Thanks man im gonna try it out@@scriptbytes

  • @top_1_percent
    @top_1_percent 7 หลายเดือนก่อน

    Thanks a ton. This is very helpful for Mac users who love Microsoft Business Products and Services.

  • @haithamdarweesh8781
    @haithamdarweesh8781 7 หลายเดือนก่อน

    What in case I already have a table and I want to append data

  • @rolanddelarosa7981
    @rolanddelarosa7981 ปีที่แล้ว

    i do not know how to find the docker container where you inout that code for permission😢

    • @scriptbytes
      @scriptbytes  ปีที่แล้ว

      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 ปีที่แล้ว

    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  ปีที่แล้ว

      Unfortunately I’ve never seen that. Hopefully someone else can chime in and help out.

  • @ayooluwatomisowole3347
    @ayooluwatomisowole3347 11 หลายเดือนก่อน

    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  11 หลายเดือนก่อน

      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?

  • @lanzly9540
    @lanzly9540 ปีที่แล้ว

    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  ปีที่แล้ว

      Unfortunately I haven't seen that issue before. Hopefully someone else can chime in!

  • @HenryFake
    @HenryFake ปีที่แล้ว

    Thank you very much but how could I delete a column before step 4?

    • @scriptbytes
      @scriptbytes  ปีที่แล้ว

      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.

  • @winstonmulyawansetiabudi1739
    @winstonmulyawansetiabudi1739 10 หลายเดือนก่อน

    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  9 หลายเดือนก่อน

      I haven't tried it with multiple sheets. Sorry.

  • @amananand1997
    @amananand1997 11 หลายเดือนก่อน

    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  11 หลายเดือนก่อน

      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.

  • @RahulP572
    @RahulP572 9 หลายเดือนก่อน

    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  9 หลายเดือนก่อน

      I talked about that extension in the video

  • @ЮраФилиппов-д2э
    @ЮраФилиппов-д2э ปีที่แล้ว

    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  ปีที่แล้ว

      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).

  • @BruceBeck-f1n
    @BruceBeck-f1n ปีที่แล้ว

    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  ปีที่แล้ว +1

      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.

  • @munfordable
    @munfordable 11 หลายเดือนก่อน

    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  11 หลายเดือนก่อน

      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.

  • @tjwinnguyen
    @tjwinnguyen 9 หลายเดือนก่อน

    What if its a very large data set?

    • @scriptbytes
      @scriptbytes  9 หลายเดือนก่อน

      I haven't done this with large datasets, so I'm not sure how well it would work.

  • @AmandhaWingertBarok
    @AmandhaWingertBarok 10 หลายเดือนก่อน

    Thank you so much! You made it so clear and easily!

    • @scriptbytes
      @scriptbytes  10 หลายเดือนก่อน

      You're welcome!

  • @abdulhakeemsanni7937
    @abdulhakeemsanni7937 ปีที่แล้ว

    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  ปีที่แล้ว

      No, I'm not much of a data analyst. I do mostly programming/development.

  • @musawasheshambare
    @musawasheshambare ปีที่แล้ว

    you have earned my subscription sir, thank you

    • @scriptbytes
      @scriptbytes  ปีที่แล้ว

      I appreciate it, thanks!

  • @trieutruong2410
    @trieutruong2410 ปีที่แล้ว

    great hint. Thank you. save me a lot of effort

    • @scriptbytes
      @scriptbytes  ปีที่แล้ว

      You’re welcome! Thanks for watching.

  • @shahnawazk
    @shahnawazk ปีที่แล้ว

    Very nice and informative, thanks and keep it up.

    • @scriptbytes
      @scriptbytes  ปีที่แล้ว

      I appreciate that, thanks!

  • @rickgrunewald5163
    @rickgrunewald5163 ปีที่แล้ว

    Very helpful, thanks!

  • @VeyselAytekin-k2b
    @VeyselAytekin-k2b ปีที่แล้ว

    thank you for clearly explanation

  • @carlosromero5051
    @carlosromero5051 10 หลายเดือนก่อน

    EXCELLENT VIDEO.

    • @scriptbytes
      @scriptbytes  10 หลายเดือนก่อน

      Thank you very much!

  • @ailleengonzales9372
    @ailleengonzales9372 ปีที่แล้ว

    Thank you!

  • @jarjitopuria7063
    @jarjitopuria7063 หลายเดือนก่อน

    tyyy better than chat gpt lol

  • @FahimMuntasir-od4ud
    @FahimMuntasir-od4ud ปีที่แล้ว

    Thanks

  • @BrutusFanboy12345
    @BrutusFanboy12345 3 หลายเดือนก่อน

    Microsoft azure is unusable

  • @pachinkosv
    @pachinkosv ปีที่แล้ว

    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  ปีที่แล้ว

      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 ปีที่แล้ว

      @@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

  • @DilanHamawandy
    @DilanHamawandy 6 หลายเดือนก่อน

    Thank you!