cancel
Showing results for 
Search instead for 
Did you mean: 

auto convert symbol to string before saving to hdb ?

newstudent2017
New Contributor
I know you can save dpft to save to hdb but symbols affect the sym file. Is there a kdb function which will auto detect a symbol column to string and save it ?

I can write custom code but was wondering if something like that already exists ?
3 REPLIES 3

Jamie_O__Mahony
New Contributor
New Contributor
Something like this could be applied before calling .Q.dpft

@[`t;cols[t]where "s"=(0!meta t)`t;string]

cpphey
New Contributor
Jamie, Can you put this code in a try/catch so an error handler can be invoked. Maybe in a . or a @

Flying
New Contributor III
Sure you can. Using t as an argument, you can wrap the above expression into a function. With this function, it's trivial to construct the try-catch expression.