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

Reducing RAM usage when re-enumerating symbol columns

Hi, Is there a method to re-enumerate symbol columns in a splayed table without loading in the entire column file? This is part of a data copy between two HDBs, and we want to avoid pulling the entire column into memory if possible. Looked at using 1...

eohara_kdb by New Contributor III
  • 283 Views
  • 1 replies
  • 0 kudos

Resolved! How can I apply a function with 'if' to a table?

Hi! I'm trying to apply a function to a table. The basic idea is that if the 2 prices adds up to 0, then the new column gets 0, otherwise it gets the product of the 2 prices. However I encountered 'type error. The codes I wrote were: //This is for cr...

iShot2024-02-01 16.31.47.png
voiddump by New Contributor
  • 577 Views
  • 4 replies
  • 0 kudos

Resolved! Selecting date from table

Hi, I'm having trouble selecting the column TRADE_DT. I don't even know what's wrong here...

iShot2024-01-17 17.13.03.png
voiddump by New Contributor
  • 721 Views
  • 6 replies
  • 0 kudos

Bug in Drop with Right-Cross-Tabs and Keyed Tables?

Although take with lists seems to work fine, drop seems to have an issue. Thoughts? q)show rct:(`a`b`c!1 2 3;`a`b`c!4 5 6)!`x`ya b c| -----| -1 2 3| x4 5 6| y / produce dictionary (bug?)q)(enlist 1 2 3)_rct1 2 3| x 4 5 6| y / produce right-cross-tabq...

erik_friis by New Contributor III
  • 1127 Views
  • 5 replies
  • 0 kudos

Resolved! update column name in partitioned table

I have a partitioned table t with columns date, class, nan. I want to update the column "nan" to "name".I am trying this: `date`class`name xcol t This is not working. Please help me out here guys:)

KB by New Contributor
  • 1026 Views
  • 1 replies
  • 0 kudos