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

Q/KDB+ Create new column through a query

I have data in a table where there are "Buys" and "Sells" alongside the Quantity. I want query so that if it equals a "SELL" i multiply the Quantity column to negative. so far i am just selecting the data and taking from a certain timeframe. Nothing…
KieranC97
  • 47
  • 5
0
votes
0 answers

Able to launch cmd file from python IDE, but not when launching the python script via a cmd file

I have a python script that starts by launching 2 KDB instances (2 cmd files launching KDB and setting up the ports). I launch them using the subprocess module like this subprocess.Popen([os.path.join(os.getcwd(),q.cmd)]) Although it works like a…
Victor Gl
  • 81
  • 1
  • 8
0
votes
1 answer

kdb: What is the meaning of this command line prompt q.Q)

The normal prompt is q), what is the meaning of q.Q)? I think I got stuck in this after pressing Ctrl-C while a query is running.
kgf3JfUtW
  • 13,702
  • 10
  • 57
  • 80
0
votes
1 answer

Building a data subscriber. How to loop hopen through IPs

I am trying to build a subscriber function that goes like this: Every user register his machine name to a list using hostname:enlist .z.h The function loops through the hostname list, creates connection and do some function…
Victor Gl
  • 81
  • 1
  • 8
0
votes
1 answer

KDB:issue using recursive function with two variables

I have tried to do the following in several different ways but haven't succeeded so far. I have a list of tables that goes like this: .rsk.list extract1.csv | +`date`code etc. ... I can call the table like this .rsk.list[`extract1.csv] Or I can…
Victor Gl
  • 81
  • 1
  • 8
0
votes
1 answer

How do I remove quotation mark in columns in KDB

I have a table t which contains a column called CMYN. But every cell in that column is enclosed by quotation marks. How can I update that column to get rid of the double quotation marks? e.g. I want to change the column value from "APPLE" to…
Alison Park
  • 21
  • 1
  • 4
0
votes
1 answer

.Q.chk gives a "type" error when ran on a hdb. how can I debug or what should I check?

.Q.chk gives a type error when ran on one of our hdb . any ideas what can cause that ? the same hdb format works on a different host .
user10165841
0
votes
1 answer

Read a csv file with comments and empty lines in q/kdb

I'm trying to read a csv file with comments and empty lines, from which I need to fetch lines which are not empty or commented. File looks like this: Test File for dry run: #This is a comment # This is a comment with, comma # This,is,a,comment with…
Utsav
  • 5,572
  • 2
  • 29
  • 43
0
votes
0 answers

KDB: failed to load TLS certificates

when trying to load a q instance with TLS support with 'q -E 1 -p 65000' on linux I get failed to load TLS certificates This command works fine in several other boxes. I suspect either something wrong with this specific certificate generation or…
filimon
  • 61
  • 4
0
votes
1 answer

KDB how to update a table by reference without getting an assign error?

I would like to update a table by reference without getting an assign error in kdb i.e. q)tab:1!(flip`a`b`c!(til 10;10?50;10?100)); q)k:2#key[tab]; q)(`tab[k;`b`c])*:2; parse error assign or q)[.:][`tab][k;`b`c]*:2; parse error …
0
votes
1 answer

How do I join a table with a column in kdb

I have a table with column:time for every 3 minutes starting from 14:30 to 16:00. i.e, (14:30;14:33;....;16:00). However, I want my time column to start from 9:30. i.e, (9:30;9:33.....;16:00). I created a new column containing all timestamps I want,…
Alison Park
  • 21
  • 1
  • 4
0
votes
2 answers

How do I adds a substring to every column in kdb

My current columns in kdb is (Time;Buy;Sell). What should I do to change my column names to (Time_hist;Buy_hist;Sell_hist)? Thank you!
Alison Park
  • 21
  • 1
  • 4
0
votes
1 answer

kdb - persisting functions on kdb server & Context management

I see a lot of info regarding serializing tables on kdb but is there a suggested best practice on getting functions to persist on a kdb server? At present, I and loading a number of .q files in my startup q.q on my local and have duplicated those .q…
Jason_L
  • 427
  • 1
  • 3
  • 12
0
votes
1 answer

How do I window join across different dates in kdb

I am a beginner in kdb. As I was practicing window join on test data from NYSE, I came across issues with window join across different dates. Basically, my table looks like: t:([] sym:10#`AAPL;date:2021.03.21 2021.03.21 2021.03.21 2021.03.21…
Alison Park
  • 21
  • 1
  • 4
0
votes
1 answer

How to get the length of every column in a kdb database?

We've seen issues where a kdb database is corrupted and are looking for a way to implement a check that every kdb column is the same length in a particular table. Any recommendation on how to do this? i.e., would like to get a return value of each…
KDBbruh
  • 3
  • 1