kdb+ and q
Q+A on all things kdb+ database and the q language
cancel
Showing results for 
Search instead for 
Did you mean: 

Forum Posts

apply dynamic projection to column

Say I've got the following dictionary of functions that I want to calculate on a tableq)t:([]a:10?`aa`bb`cc;b:10?10;c:10?10f)q)d:`av`dv`ma!((avg;`c);(dev;`b);(`mavg;;`c))`av and `dv are easyq)![t;();{x!x}(),`a;-1_ d]But I want to be able to apply the...

abcfoots by New Contributor
  • 1550 Views
  • 2 replies
  • 0 kudos

.Q.s \c limitation workaround

I have a table with lots of cols and output is cutoff because of \c limitation of .Q.s . Is there a way around it ?

cpphey by New Contributor
  • 1513 Views
  • 4 replies
  • 0 kudos

auto convert symbol to string before saving to hdb ?

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 ?

Finding the oldest record in a large partitioned table

Hi all - enjoying this mailgroup a lot - thanks for all the useful input! Two questions:1) Given the below, is there a faster solution to find the oldest record?I'm assuming a large partitioned table and a maximum timeframe of 50 years.2) Is there a ...

Conditional Upsert

Hi Guys, Whats the best way to conditionally upsert two tables? For example if I have two tablest:`sym xkey flip (`sym`val)!(`a`b`c;(1;3;5))t1:`sym xkey flip (`sym`val)!(`b`c`d;(8;1;9))and I want to only update values in table t when there is a highe...