Questions tagged [kdb]

kdb+ is a proprietary high-performance database developed by Kx Systems.

kdb+ is a proprietary high-performance database developed by KX.

Features

  • Scalable column-oriented database for massive data volumes
  • Manages real-time and historical data in one platform
  • A single system allowing for low latency communication between kdb+ processes
  • Coupled with the expressive q programming and query language

It comes with a programming language called q (or kdb/q). Both q and kdb are written in the k language which has the tag on this site.

More Information

KX have recently launched the KX Community, a site moderated daily by KX employees to ensure all questions are answered. For any questions, on q/kdb+ or any of the KX technology and products, our KX experts are on hand to help!

2014 questions
0
votes
1 answer

kdb: calling parse on a list of variables

I learned from here that [...] in a parse tree a variable is represented by a symbol containing its name. Thus to distinguish a symbol or a list of symbols from a variable it is necessary to enlist that expression. Given that, why does below…
kgf3JfUtW
  • 13,702
  • 10
  • 57
  • 80
0
votes
1 answer

KX developer installation port setting error for Q/Kdb+

KDB+ 4.0 2020.05.04 Copyright (C) 1993-2020 Kx Systems l64/ 8(16)core 7843MB n3 n3-n550jk 127.0.1.1 EXPIRE 2022.02.11 nikhil.exec@gmail.com KOD #4174xyz [developer] version 1.4.3 [developer] loading... [developer] setting q…
0
votes
1 answer

Table transformation, table as list of dicts

Please help me with t1 transformation through the following path: t1:enlist `a`b!1 2; t2:exec val from ([]val:t1); -3!t1 // +`a`b!(,1;,2) -3!t2 // ,`a`b!1 2 t1~t2[;] // 1b I expect that the 2nd line (exec) returns the same object as t1, but…
egor7
  • 4,678
  • 7
  • 31
  • 55
0
votes
1 answer

Extracting data from a table in kdb

Kdb question: They're multiple rows in a table and I want to check if all the rows if the column meets a condition. So the column StartDay = *** How can I check each single row for that column? Select from t where StartDay = '$"***" Just gives me…
K grass
  • 1
  • 1
0
votes
1 answer

kdb: avoid escaping double quotation mark in string

I have a JSON string literal as below, needing many backslashes. "{\"key1\":\"value1\",\"key2\":\"value2\"}" Is there a way to avoid writing these backslashes? For example in Python we can use single quotation marks to delimit a string.
kgf3JfUtW
  • 13,702
  • 10
  • 57
  • 80
0
votes
1 answer

Accumulator gives different result then direct function applying

Trying to combine two result sets I've faced with different behavior when joining two keyed tables: q)show t:([a:1 1 2]b:011b) a| b -| - 1| 0 1| 1 2| 1 q)t,t a| b -| - 1| 1 1| 1 2| 1 q)(,/)(t;t) a| b -| - 1| 1 2| 1 Why does the accumulator ,/…
egor7
  • 4,678
  • 7
  • 31
  • 55
0
votes
1 answer

Is there a way to macro unit test in kdb+?

I have seen a few different unit testing approaches online using qunit and k4unit but I can only get them testing on single functions. I was hoping that I could run a unit test that check the daily checks I execute each day such as, "has the…
Michael
  • 3
  • 4
0
votes
2 answers

reopen a connection on same port results in bad file descriptor handle

I have a proc which spawns a child process on port 2600. it connects to the process with handle 6, extracts some data, kills the process and then it starts another child process on the same port, I connect to it and when I try to run my commands on…
user10165841
0
votes
3 answers

JupyterQ license Check Failed

Upon loading a JupyterQ notebook for a kdb project, I got an unfamiliar error. License check failed. There's an issue with the license manager. Check your installation carefully and/or reinstall your application. I googled it and there's no…
0
votes
2 answers

q project structure, files, modules, testing and github

I created a project with 2 folders src/ and test/. The src/ directory contains 1 file for each module, and all functions in a given file are prefixed with \d .mymodule The test/ directory contains some tests using the QCumber framework My problem…
Will
  • 910
  • 7
  • 17
0
votes
1 answer

KDB/Q: compute the percentage by group

Is there a quick way to get the proportion/percentage of each item in a group? right now, I first compute the sum of the values by group, and then merge this total table to the original table, and then compute the proportion. Does Q have a quick…
duckman
  • 687
  • 1
  • 15
  • 30
0
votes
1 answer

Getting a sublist using regex

I have a list as such: myList: ("ab";"bc";"cd","de"); I would like to get a sublist like that contains "b" I know i can do this: myList like "*b*" However this returns a binary list. 1100b; How can I return a list of ("ab";"bc") instead?
delita
  • 1,571
  • 1
  • 19
  • 25
0
votes
2 answers

kdb - how to create sum a list of dynamic columns using functional select

I want to be able to construct (+; (+; `a; `b); `c) given a list of `a`b`c Similarly if I have a list of `a`b`c`d, I want to be able to construct another nest and so on and so fourth. I've been trying to use scan but I cant get it right
kkudi
  • 1,625
  • 4
  • 25
  • 47
0
votes
1 answer

kdb: get column names of non-keyed table

Given a non-keyed table like t:([]c1:`a`b;c2:10 20), is cols t always equivalent to key flip t? (Asking as I saw several key flip t's in a repo I'm working on)
kgf3JfUtW
  • 13,702
  • 10
  • 57
  • 80
0
votes
1 answer

Why does not work select from a keyed table

A query result looks good if I break keyed table apart into key-value pair and combine them together: key!value. But a straight select from it gives an error. I constructed that keyed table in a slightly weird manner: q)show t:([n:1 2] m:(`a`b!3…
egor7
  • 4,678
  • 7
  • 31
  • 55