Wednesday, January 28, 2015

SQL database / stdout to kdb

// using mysql as an example
// perhaps a good way to just have parsed output (say from perl) to directly go into kdb

q)(::)test:("*TH"; enlist "\t") 0:system "mysql -u root -e 'select \"string\" str, time(now()) time, 99 short from dual' "
str      time         short
---------------------------
"string" 15:55:11.000 99  
 

q)meta test
c    | t f a
-----| -----
str  | C   
time | t   
short| h    

No comments:

Post a Comment