snippetsqlMinor
How to create and populate a PostgreSQL table from CSV automatically?
Viewed 0 times
postgresqlcreatecsvautomaticallypopulatehowandfromtable
Problem
I am new to database management and we are using PostgreSQL. All I need to do is to migrate CSV files (corresponding to around 200 tables) to our database. Manually creating tables for every CSVfile is a bit tiresome, so please help me out. Is there any way not only to import data, but also to generate tables from CSV files?
Solution
You might look at PgFutter to help you out. It sounds like it would fit your use case well, because it creates tables for CSV formatted data based on the header line, and then loads the data into the tables.
Context
StackExchange Database Administrators Q#114257, answer score: 6
Revisions (0)
No revisions yet.