I have a kdb session running in machine A, and a CSV file on machine B. I need to pass the content of the csv file to the kdb session. How to do this?
?
apparently I can do a scp and then load the csv in machine A using the normal file IO function.? Or, I have a R-q library, so I can read the csv into R and parse csv’s content into R command and insert into A.
?
But is there a more light-weight solution here? Can I do this through Shell and qcon?
scp is prob your easiest option.but if you wanna do it over q, maybe something like this:q server (port 12345):q)get_my_csv:{ read0`:/tmp/test.txt }…q client:q)h:hopen 12345q)h"get_my_csv"“a,b”"1,2""2,3"q)it becomes of course a lot more complex if the file is much bigger, inwhich case scp is prob the right choice anyway.regardswalterOn Mon, Jul 22, 2013 at 10:02 PM, CHEN, Cheng wrote:> Hi guys,>> I have a kdb session running in machine A, and a CSV file on machine B. I> need to pass the content of the csv file to the kdb session. How to do this?>> apparently I can do a scp and then load the csv in machine A using the> normal file IO function. Or, I have a R-q library, so I can read the csv> into R and parse csv’s content into R command and insert into A.>> But is there a more light-weight solution here? Can I do this through Shell> and qcon?>> Any comments?>> –> CHEN, Cheng>> –>