I just discovered csvkit, which is a set of Unix command-line tools for CSV files. I installed it on my Mac with pip install csvkit
. The command was:
csvsql --dialect mysql --snifflimit 100000 bigdatafile.csv > maketable.sql
You can alternatively provide a DB connection string and it can load the table directly.
Related Posts:
- MySQL Error: : ‘Access denied for user ‘root’@’localhost’
- MySQL Error: : ‘Access denied for user ‘root’@’localhost’
- Case statement in MySQL
- Error Code: 2013. Lost connection to MySQL server during query
- how to drop partition without dropping data in MySQL?
- MySQL equivalent of DECODE function in Oracle
- importing a CSV into phpmyadmin
- How to map data on CSV to web pages?
- MySQL Error: : ‘Access denied for user ‘root’@’localhost’
- What is the difference between “INNER JOIN” and “OUTER JOIN”?
- What is the difference between “INNER JOIN” and “OUTER JOIN”?
- What is an MDF file? [closed]
- ORA-00904: invalid identifier
- Unknown column in ‘field list’ error on MySQL Update query
- Unknown column in ‘field list’ error on MySQL Update query
- Self Join to get employee manager name
- MySQL – Operand should contain 1 column(s)
- MySQL “CREATE TABLE IF NOT EXISTS” -> Error 1050
- MySQL create table if not exists and insert record only if table was created
- Rename a table in MySQL
- getting error HTTP Status 405 – HTTP method GET is not supported by this URL but not used `get` ever?
- How should I tackle –secure-file-priv in MySQL?
- How do I use MySQL through XAMPP?
- How do I use properly CASE..WHEN in MySQL
- Why do we need “Relationships” between tables at all?
- How can I do a FULL OUTER JOIN in MySQL?
- MySQL query String contains
- What’s the difference between VARCHAR and CHAR?
- Can’t connect to MySQL server on ‘127.0.0.1’ (10061) (2003)
- Can’t connect to MySQL server on ‘127.0.0.1’ (10061) (2003)
- How to declare a variable in MySQL?
- Can’t find mysqladmin on Mac OSX 10.6.8
- Export Pervasive to MySQL (C#)
- MySQL Cannot Add Foreign Key Constraint
- Can’t connect to MySQL server on ‘127.0.0.1’ (10061) (2003)
- How do I restore a dump file from mysqldump?
- Invalid column count in CSV input on line 1 Error
- How to split the name string in mysql?
- How do I quickly rename a MySQL database (change schema name)?
- Invalid column count in CSV input on line 1 Error
- How do I import an SQL file using the command line in MySQL?
- Can’t connect to local MySQL server through socket ‘/tmp/mysql.sock’ (2)
- mysql Foreign key constraint is incorrectly formed error
- MySQL: Invalid use of group function
- Authentication plugin ‘caching_sha2_password’ cannot be loaded
- How can I return pivot table output in MySQL?
- Compare dates in MySQL
- MySQL SELECT increment counter
- MySQL “WITH” clause
- What is the difference between JOIN and UNION?
- Create a new database with MySQL Workbench
- MySQL Multiple Joins in one query?
- MySQL syntax for Join Update
- How to get size of mysql database?
- Can’t connect to local MySQL server through socket ‘/tmp/mysql.sock’ (2)
- 1052: Column ‘id’ in field list is ambiguous
- 1052: Column ‘id’ in field list is ambiguous
- difference between primary key and unique key
- MySQL combine two columns into one column
- Simple way to calculate median with MySQL
- Creating a search form in PHP to search a database?
- The ALTER TABLE statement conflicted with the FOREIGN KEY constraint
- Error 1046 No database Selected, how to resolve?
- What is it exactly a BLOB in a DBMS context
- MySQL Error 1264: out of range value for column
- PHP & MySQL: mysqli_num_rows() expects parameter 1 to be mysqli_result, boolean given [duplicate]
- How to store arrays in MySQL?
- How to concatenate text from multiple rows into a single text string in SQL Server
- What is semi-join in database?
- Remove duplicate rows in MySQL
- How to SUM and SUBTRACT using SQL?
- phpMyAdmin – Error > Incorrect format parameter?
- The backend version is not supported to design database diagrams or tables
- Simulate CREATE DATABASE IF NOT EXISTS for PostgreSQL?
- Cast from VARCHAR to INT – MySQL
- SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax — PHP — PDO [duplicate]
- How do you force mysql LIKE to be case sensitive?
- Failed to connect to mysql at 127.0.0.1:3306 with user root access denied for user ‘root’@’localhost'(using password:YES)
- MySQL – UPDATE multiple rows with different values in one query
- Postgres Error: More than one row returned by a subquery used as an expression
- How to create a MySQL hierarchical recursive query?
- ERROR 1148: The used command is not allowed with this MySQL version
- Bulk load data conversion error (truncation)
- Insert into a MySQL table or update if exists
- How to round down to nearest integer in MySQL?
- How do I reset a sequence in Oracle?
- MySQL starts with searching issue
- Query to convert from datetime to date mysql
- Is it possible to GROUP BY multiple columns using MySQL?
- MySQL error: key specification without a key length
- How can I output MySQL query results in CSV format?
- Best way to test if a row exists in a MySQL table
- Check if MySQL table exists without using “select from” syntax?
- mysql update column with value from another table
- The used SELECT statements have a different number of columns
- How to create a foreign key in phpmyadmin
- what is the difference between triggers, assertions and checks (in database)
- How to delete from multiple tables in MySQL?
- MySQL: Can’t create table (errno: 150)
- How to copy a row and insert in same table with a autoincrement field in MySQL?