I am trying to set up using named pipes to load data into the db using the java connector. I am stuck at the fact that if I try to start writing to the pipe it waits for the read to finish, or if i start reading from the pipe first, it hangs waiting for the input. I have y sample code in scala below:
val query = "LOAD DATA INFILE '/ebs_raid/pipes/date_dim.pipe' INTO TABLE " + DB.t("tmp_date_dim") + " FIELDS TERMINATED BY '|';"
val out = new OutputStreamWriter(new FileOutputStream("/ebs_raid/pipes/date_dim.pipe"))
out.write(values)
out.flush();
out.close();
st.asInstanceOf[com.mysql.jdbc.Statement].executeUpdate(query)

