Show HN: Turn CSV Files into SQL Statements for Quick Database Transfers

by ryanwaldorfon 5/28/2024, 12:26 PMwith 15 comments

This package lets you unload a CSV from a warehouse, turn that CSV into SQL statements creating a temp table and inserting data with a CLI command, and copy those SQL statements into your query editor so you can start using the data in a different warehouse. Useful for when you need to join data together that's stored in two separate data warehouses (e.g. finance and product data).

by bdcravenson 5/28/2024, 6:37 PM

For small datasets, this is good, but for anything significant, using the database's native bulk load will be more efficient than INSERT statements.

by nbbaieron 5/28/2024, 3:54 PM

This is neat! Correct me if I'm wrong, but don't a lot of systems already have the ability to ingest CSV data? Why this intermediate step?

by ddgfloridaon 5/29/2024, 2:56 PM

There are many browser based solutions for quick CSV to SQL also - i.e. www.convertcsv.com/csv-to-sql.htm

by mharigon 5/30/2024, 5:11 PM

One can do this with the sqlite3 CLI tool.