Most of the examples seem to be run in REPL mode. Is it possible to load myprog.q from disk?
请帮助我写一份职务,以找到包括重复内容在内的两个清单的差异。
Most of the examples seem to be run in REPL mode. Is it possible to load myprog.q from disk?
Sure, you just need to provide the name of the .q script as an argument to the q process:
/opt/app/KX/q2.7/q /opt/app/path/to/script/myprog.q -p 5000
would start a q process on port 5000. On startup it will execute the contents of your script.
Alternatively, from inside a running REPL,
l myprog.q
will load the script.
Also note that you can persist the root workspace to disk and resume later:
$ q
q)a:1
q)`:workspace set get`.
`:workspace
q)\
$ q workspace
q)a
1
请帮助我写一份职务,以找到包括重复内容在内的两个清单的差异。
Say I have a list of symbols like so... q) list `hello_world.q `hello_world_2.q I d like to split this so I end up with this list of strings... q) new_list "hello_world" "hello_world_2&...
I can append a string with number. temp:30 text:"Current temperature is ",string temp show text type text Result "Current temperature is 30" 10h However, if I append one more ...
Most of the examples seem to be run in REPL mode. Is it possible to load myprog.q from disk?
What are the ways to in Q to use the results of a nested query in a where clause? I m looking for something similar to SQL statement. select from food where type_id in ( select type_id from ...
I m writing a q script that loads a db in a particular path and does some processing on it. The location of the db is currently hardcoded in the script, but I want to pass the db path as an argument ...
I am learning KDB+ and have loaded the tic data into the table W as below. My question is, how to transfer the data into 5 (or n) minutes OHLCVA? "Stk_ID","Date","Time","Price","Chg","Vol","Amt","Ty" ...
I am trying to find first date where we have data available per process over IPC. I tried below but it isn t efficient. Is there a better way to find this? select min date from ({select date from x ...