Reputation: 159
I have the following table saved in the disk
`:t/ upsert ([] v1:10 20 30; v2:1.1 2.2 3.3; v3:1 2 3)
how can I delete column v3
for instance?
Upvotes: 0
Views: 817
Reputation: 381
dbmaint.q is another option: https://github.com/KxSystems/kdb/blob/master/utils/dbmaint.q
This includes the function delete1col for this purpose. This can be used as so:
delete1col[tabledir;col]
in your case this would be:
delete1col[`:t/;`v3]
This script also includes a whole host of other functionality you may find useful in the future.
Upvotes: 4
Reputation: 649
This line should achieve what you are looking to do:
`:/t/.d set `v1`v2
Additionally, you should delete your v3 file.
Hope that helps!
Upvotes: 2