r/DatabaseHelp • • Sep 17 '15

On uploading CSV data to SQL

After searching around on the subject, i found everyone uses the local filesystem and does a bulk insert. As much as i would like to jump on that bandwagon, at my work we don't have access to the local filesystem; only the database. Am i missing something that allows uploads into the filesystem via SQL? or does everyone else also have an FTP set up?

2 Upvotes

9 comments sorted by

View all comments

Show parent comment

1

u/jeffrey_f Sep 17 '15

You can create a python script to do it. I'm not an expert, but I could probably cobble together enough pertinent code (google is my friend) to create a script to connect to the DB, read the CSV and do sql inserts........

At some point, someone will need to nail down where the production db will live (IP or HostName) so that the imports can happen automagically......

You can create a "config" file for your script that will read in the server name, user, password too so you can just change the details for production time.