Questions tagged [q-lang]

The q language is a programming language by kx.com for querying kdb+ databases.

Q was developed by Arthur Whitney in 2003 and is built on top of the K programming language. The names q and kdb+ are often used interchangeably, but generally q refers to the programming language and kdb+ refers to the entire runtime environment.

245 questions
0
votes
2 answers

Fill secondly data from Q KDB+

I have a csv file with some high frequency stock price data, and I'd like to get a secondly price data from the table. In each file, there are columns named date, time, symbol, price, volume, and etc. There are some seconds with no trading so…
Demi
  • 1
  • 1
0
votes
1 answer

How can I 'unparse' a parse tree in q/kdb+?

I am trying to create an automatic 'debugger' for tracing function flow. Because I'm not a god, I do make mistakes, and when I do, I normally end up throwing a bunch of "show" in my functions. What I'm looking to do is create a function that will…
0
votes
2 answers

kdb splayed table meta error

I have a splayed table which I can select data from just fine. When I try to view the meta data I get a `sym error. Can anyone suggest reasons why this might happen? q)meta tablename k){$[(20h>t)|77h@. t:!x;`;t]} 'sym .: `sym …
Hopper06
  • 89
  • 2
  • 10
-1
votes
3 answers

extracting number from character array

How do you extract numbers from a particular column composed of strings eg: (`category:"abc 124M def 154M" ; "hij 120M hij 174M" ; "stu 126M def 166M" ; "abx 67M def 66M" ) Answer: 124,154 120,174 126,166 67,66
-1
votes
2 answers

efficient equi join in Q

How do I optimize equijoin? Table 1 has 500000 rows, Table 2 has 200,000 rows and I need to do equi join between them. The resulting table should have about 20,000,000 rows. It takes about 20 seconds currently to run - ej[`key;Table1;Table2] I…
1 2 3
16
17