in my table I am seeing mixed datatypes which I want to fix by running dbmaint
I need to make sure that eventType holds a list of symbols so anything that doesnt match that needs ran against db maint however Im not sure how to do that. Using fnCol or castCol?
With mixed types it is not a simple cast.
You should use: https://github.com/KxSystems/kdb/blob/master/utils/dbmaint.md#fncol
Something along the lines of:
,
in the output)fncol[`:/full/path/to/HDB;
`table;
`eventType;{
@[x;
where 10h=type each x;
{`:/full/path/to/HDB/sym?enlist `$x}]}
]
Make sure to take a backup of your data before attempting this change.
One option on this is to use copycol
and then perform fncol
on the original.
Once you confirm the data is correct after you can deletecol the backup column.
Test on a small dummy HDB first to write and confirm your logic is correct