Using LOAD DATA INFILE with byte stream
Posted by: Carlo Bos
Date: November 30, 2005 02:59PM

Can you please help me with the following problem:

I'm currently looking at the LOAD DATA INFILE statement to load a csv file into a table. This statement requires a filename and the database to access this file on the filesystem. (I've used this statement successfully on my development machine)

However in the production environment, the csv file is received through a web form on a JBoss 4.0.2 server and the MySQL 4.1 server resides on a different machine.

So to solve this issue I'm wondering if there a way to specify a byte stream through a jdbc connection to accomplish this. Meaning that the uploaded file does not need to be created on the server, but is directly streamed to the database. I'd really like to use the automatic parsing ability that comes with the LOAD DATA INFILE command though. Any solution is welcome!

So in short: I'd like an uploaded csv file to be imported to a MySQL table which resides on a different machine than the web app server.

Code examples are appreciated.

Thanks,
Carlo

Options: ReplyQuote


Subject
Written By
Posted
Using LOAD DATA INFILE with byte stream
November 30, 2005 02:59PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.