If it were me, I wouldn’t worry about trying to upload CSVs you downloaded from your SQL tables. I’d write data conversion server functions that did the SQL queries, and looped through the results adding rows to the data tables. Those would be server functions you’d only need to run once (once you had them working), then you could comment them out.
Linking fields (foreign keys in the SQL tables) are a particular problem area that won’t work well with CSV import. You really need to be in Python code so you can do a separate look up of the foreign key in the other data table to get the row, and use that row for the linking field.