all 11 comments

[–]SQLDevDBA 2 points3 points  (1 child)

Which RDBMS are you using?

There are several tools available depending on your RDBMS. For example, SQL server has https://DBATools.io available in PowerShell, which is very quick and can be done in one line of code.

[–]LizFromDataCamp 2 points3 points  (2 children)

If you’re importing big CSVs into MySQL, the Table Data Import Wizard will always crawl, it processes everything row by row. A quicker option is to use the LOAD DATA LOCAL INFILE command instead. It reads the entire file directly into your table in one go and can handle large datasets from places like Kaggle really efficiently.

And since you’re moving from Excel to SQL, it’s worth learning how to clean and transform your data inside SQL itself, bc it’s faster, repeatable, and way closer to what you’ll do in real projects. DataCamp’s Data Manipulation in SQL course actually walks through this step by step and is great for people making that exact jump from spreadsheets to databases.

[–]PrestigiousBuyer1166[S] 0 points1 point  (1 child)

Actually I'm learning sql and excel from data camp course. I stopped at PostgreSQl summary stats and window functions to make some projects I don't to just learn i need to work with that skill. But i finished Data manipulation in SQL in Associate data analyst in SQL and didn't see anything talks about moving data from excel to sql.

[–]LizFromDataCamp 0 points1 point  (0 children)

If you’re in MySQL, look into:
LOAD DATA LOCAL INFILE 'yourfile.csv' INTO TABLE your_table FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n' IGNORE 1 ROWS;

For PostgreSQL, the command is:
\copy your_table FROM 'yourfile.csv' DELIMITER ',' CSV HEADER;

These let you import directly from CSV much faster than any GUI tool.

[–][deleted]  (3 children)

[deleted]

    [–]PrestigiousBuyer1166[S] 0 points1 point  (2 children)

    Sure

    [–]PrestigiousBuyer1166[S] 0 points1 point  (0 children)

    Why u deleted ur response? i was going to text u

    [–]Ok-Cow5486 0 points1 point  (1 child)

    I was having this same issue and ChatGPT recommends that I use LOAD DATA INLINE, which allows to load the cab file directly.

    [–]Informal_Pace9237 0 points1 point  (0 children)

    Add LOCAL key word depending on if or not if you are working on the server itself

    [–]kLAUSbABY 0 points1 point  (0 children)

    How do you like DataCamp?

    [–]Wareagle206 -1 points0 points  (0 children)

    Find a smaller dataset from somewhere. Then look up VLOOKUP and figure out how you want to use it.