

eteague
Forum Replies Created
-
Just following up in on this, there is a keyword for this hdel – here is more info and usage examples for it:
hdel deletes a file or folder | reference | q and kdb+ documentation – Kdb+ and q documentation (kx.com) -
For deleting a previously created file, I don’t think q has an keyword/operator for that. However you can use the system keyword to execute a system command (see more here – (system keyword executes a system command | Reference | kdb+ and q documentation – Kdb+ and q documentation (kx.com))
So for your example of deleting a file here’s a quick example. In the first line I’m writing some text to a file test.txt in a directory test and the following line I use a system command to delete it
q)`:test/test.txt 0: enlist "text to save" `:test/test.txt q)system"del test\test.txt"
-
eteague
MemberMarch 15, 2022 at 12:00 am in reply to: What does the w dictionary look like in a tick set up?The .u.w dictionary is a dictionary of table names and (handle;subscribed syms). Timestored have a tutorial on tick with the example:
q).u.w
quote | ()
trade | ,(396;`IBM`AA )Here there is one subscription to the trade table for the `IBM and `AA symbols on handle 396 and no subscriptions to the quote table. The link to the Timestored tutorial is here:
Kdb Tick Data Storage Kdb+ Tutorials (timestored.com)Here’s a guide to helping start kdb+ tick:
Realtime database Starting kdb+ Learn kdb+ and q documentation – Kdb+ and q documentation (kx.com)
It may be beneficial for you to try starting tick with a couple of different rdb processes and try different variations using .u.sub. In standard tick the rdb subscribes to all tables and all syms, using .u.sub[ ` ; ` ], but you can change this to subscribe to specific tables/syms. The first argument is the table name the second is the list of syms you want to subscribe to. For the example above it would look like:
.u.sub[`trade;`IBM`AA]
It may be helpful for you to see for yourself.Hope that helps.
`