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 create table if not exists and insert record only if table was created
- getting error HTTP Status 405 – HTTP method GET is not supported by this URL but not used `get` ever?
- Why do we need “Relationships” between tables at all?
- How to declare a variable in MySQL?
- Export Pervasive to MySQL (C#)
- MySQL SELECT increment counter
- How to get size of mysql database?
- 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
- Simulate CREATE DATABASE IF NOT EXISTS for PostgreSQL?
- MySQL – UPDATE multiple rows with different values in one query
- How to create a MySQL hierarchical recursive query?
- PHP Warning: mysql_num_rows() expects parameter 1 to be resource, boolean given in /home/website/public_html/facebook/fbclogin.php on line 57 [duplicate]
- MySQL LIKE IN()?
- WordPress site migration – icons missing
- Using wpdb to connect to a separate database
- WordPress (MyISAM) database is slow, should I switch to InnoDB?
- WordPress Database lost auto increment
- Slow wp_term_relationships query
- How to use “TRUNCATE TABLE” MySQL statement?
- Slow SQL_CALC_FOUND_ROWS Query
- How is the data stored in the database?
- How do I write this SQL statement for Posts written in last 24 hours?
- Would manually deleting the dumping data fix a “#1062 – Duplicate entry ‘1’ for key ‘PRIMARY'” phpMyAdmin error?
- WooCommerce – Query for ordered products
- How to find if a post with custom_field == X exists?
- Import 10,000 Users into WordPress WITH a specific ID for each user
- WP database error for comments_popup_link()
- Query WordPress database by registered date and role
- Tons of Twitter rows in my database
- Set Display Name to first and last name (phpmyadmin SQL Query)
- Manually removing revision post types
- Select Multiple meta_value from WP DB; Single Query
- Within the database, where is the flag which says that a user has Super Admin rights?
- Is it possible to split database tables using HyperDB?
- Order by custom table and multiplication
- What happens if I overwrite the current wp_options table with a backup from a week ago?
- SQL Error wp_commentmeta – incorrect table definition
- WordPress database error – Error in SQL syntax – I can’t identify any error?
- CRUD operations using WordPress database API
- WordPress database error for query INSERT INTO
- How to connect to AWS RDS external database (not for the core WordPress db)
- Database Tables Lost Indexes? How to Recover?
- How to Mirror WordPress database from Remote server to Local server
- Is MariaDB’s Aria storage engine suitable for WordPress?
- Slow queries constantly getting stuck on WordPress database of ~100,000 posts
- How do I query wp_options for expired transient pairs with MySQL commands?
- Automatic switch to backup database on fail
- WordPress running SQL query to update database from form
- How to fix database error duplicate entry
- How do I convert a MySQL database from utf8mb4 to utf8 encoding?
- Alternative functions for mysql_free_result and mysql_ping in wordpress functions
- Custom WordPress Table wpdb
- Why this query is not showing any result on wordpresss home page?
- Best practice to limit results in get_row()?
- Trouble running $wpdb->query() with last_insert_id
- how to encyrpt DB_PASSWORD in wp-config
- Undo WooCommerce CSV import
- External wpdb connections in different plugins on single page
- WP_Query with page_ids in arguments without a result
- wp_usermeta – Read from database, but save function broken
- How to get product order by two custom taxonomy in wordpress
- Adding data to custom wordpress database table
- Add row to custom database Table and delete all rows older than 1 day
- Having problem creating local instance of wordpress site
- select a single val though a table in wordpress
- Integrating Custom Database with WordPress
- WordPress database error: [Query was empty] – using $wpdb->prepare()
- Please help! I have a problem with getting wordpress databas
- Why last row deleted when refresh page
- Bulk find & replace on WordPress posts/pages (minus image paths)
- WordPress database problem wp_posts, primary key
- How to import products in host instead of database on wordpress?
- I would like some help wth an SQL query to link posts with categories
- Merging development site with live site
- The MySQL Connection could not be established., before it was joomla but i have change it into worpress
- Missing latest posts and options after DB migration via phpMyAdmin
- How to set max users to 17.000
- live site do not update after importing sql database
- How do i get value from wp_postmeta?
- Function to get the name in database table from the comma separated string
- “MySQL server has gone away” since update to 3.8
- featured image not showing up with mysql_connect
- Print output of Table Creation
- SQL Query to get post_id from wp_posts and and meta_key(s) from wp_postmeta
- How can I delete the options from DB when the plugin is deleted?
- SQL query into to WP query
- How to find fresh (last modified) and sql backup?
- Putting form result in my database