Batch import of multile CSV files into a single table #17439
-
Hello, I want to import multiple CSV files (~300) with the same format into a single table. I googled and found a few possible ways. First one is to create a task: [Database]-[Tasks]-[Create new task], then choose "Data import". It seems it is supposed to allow me to select multiple files (the label "Input files" is plural) but in fact I can't. I could save the task and edit it to change the source CSV but the field mapping goes back to the original, so I have to remap all fields. And of course, I have to do this 300 times. The second way is to right-click "Tables" in the schema tree (not on the target table) and choose "Import Data". I can actually choose multiple CSV files. However, I have to choose the target table and do the field mapping one by one (300 csv files with 14 columns = 4200 selection!). Do I miss something? Any nice features to, say, copy the field mapping to other files? DBeaver Community Edition 22.1.0 on Windows 10 Thanks, |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
DBeaver is able to import multiple files. Inserting huge batch of data from multiple csv files into distinct tables with Postgresql
I'm answering this old question as this came up when I was searching for the same solution. I hadn't realised this was possible in DBeaver as I had only imported single CSV's in the past. |
Beta Was this translation helpful? Give feedback.
-
Thanks! Good to know. Will be helpful in the future when I have a similar need. Just a small tip. It seems I have to create an empty table first. When I tried to import two CSVs into a new table, I chose "create" for "Mapping" for the first CSV then chose "skip" to the second CSV. But this ended up with an error. So, I created an empty table before importing and the chose "existing" for "Mapping" for two CSVs. Then it worked just fine! |
Beta Was this translation helpful? Give feedback.
-
Is this functionality implemented on macos? That stack overflow only mentions windows, but on macos the "input files" CTA is plural as "Input File(s)", but I can't select multiple files so it's a little confusing |
Beta Was this translation helpful? Give feedback.
DBeaver is able to import multiple files.
Inserting huge batch of data from multiple csv files into distinct tables with Postgresql
https://stackoverflow.com/questions/73100588/inserting-huge-batch-of-data-from-multiple-csv-files-into-distinct-tables-with-p/73125590#73125590
I'm answering this old question as this came up when I was sear…