screechOwl
screechOwl

Reputation: 28129

MYSQL Data Import

I am trying to import a large csv file into MySQL. It's about 1.4 GB and consists of ~ 1MM rows and 100 columns.

My question is whether there is some way to generically dump the data into a db w/o having to manually define 100 columns.

I know in SQL Server there is a data importing tool that will read the first row of a csv file and figure out what the columns should be.

I have MySQL workbench but can't find a similar feature.

Any suggestions?

Upvotes: 0

Views: 180

Answers (1)

Filip Roséen
Filip Roséen

Reputation: 63797

The answer is sadly No, there is no way (using the standard mysql utilities) to create a table by analyzing the data your .csv, and then insert the data into this new table.

You'll need to create the table yourself (either by hand, or preferably using some script).

Then you can import the rest of the data using one of the methods below:

Upvotes: 1

Related Questions