renumerating only one column and keeping the rest of sym

9 views
Skip to first unread message

rkapoor

unread,
Mar 27, 2023, 3:20:57 AM3/27/23
to AquaQ kdb+/TorQ
Hi,
I have an hdb of 2-3 years of historical data, and recently changed the schema of a table by a single column (a column that used to be a sym is now a string). The reason for this change was that this column was bloating the sym file as the field had several permutations.

Alas, now that I have cast the type of the column to string (using fncol in dbmaint,q), made the schema change, and have a functional hdb, the only problem is that sym file is still very large with the remnants of that previous column that used to be a sym.

My first idea was to use the code here https://code.kx.com/q/kb/compacting-hdb-sym/ 
to reenumerate every column of every table that is a sym, but this operation takes a very long time because I have some tables that have several syms (6-7 syms, which we are working on phasing out to another type).

So, is there a quick way to retain the syms of my previous sym file, but just exclude the values of the column that I changed to string? In other words, I just want the sym file - old sym column.

Thanks
Reply all
Reply to author
Forward
0 new messages