KX Technology
Using kdb+/q or any KX development tools? Discuss with our community of users and experts here!
Showing results for 
Search instead for 
Did you mean: 

Forum Posts

Need to rename file placed in network location

HI,So I tried running this command :\r /abc/dd/rrr.csv /abc/dd/ttt.csvThis works perfectly fine but when I try to store in some variable which is of string type and try like this :oldFileName : "rrr.csv";newFIleName : "ttt.csv;\r oldFileName newFileN...

KDB_Dev by New Contributor
  • 2 replies
  • 0 kudos

Introduce vscode-q

Happy Holidays, everyone,If anyone is looking for a different IDE for q in the new year, give a try this extension for vscode.https://marketplace.visualstudio.com/items?itemName=jshinonome.vscode-qThis extension provides kdb+\q language support:q syn...

Hour interval (first step)

Good night!Merry Christmas!I need: 10 items (random) converted to hours and minutes (from 0 to 2 hours)I coded:q) asc 17h$10?0D2`s#00:07 00:22 00:26 00:44 00:50 01:00 01:01 01:11 01:16 01:35I need: 10 items (random) converted to hours and minutes (fr...

Re: [personal kdb+] Simple Query

hello gene,you have two choices:- use the 'like' operatorupdate status:not name like "" from t- use the length of each string:update status:0

Nick by New Contributor
  • 0 replies
  • 0 kudos

Fluctuation in Streaming

Hello,I set a tickerplant and a chained-tickerplant following the official best practices. Pretty straight-forward; a simulate a feed handler to push data into the tickerplant, which forwards the data to the chained-tickerplant and finally I have an ...

upsert a partitioned table

I want to upsert to a (date) partitioned table in the hdbIs the following right way to do it:tab: select from tabletab upsert updated_records{ .Q.dpt[`:hdb;x;tab] } each date_list_from_hdbThanks.

Advent of code2020 day 15 solution improvement

(TL; DR) No improvement in performance despite using unique key dictionary i.e (`u#())!() .. but similar algorithm in python was giving results much much faster. Wondering if I had took a wrong approach in solving the problemQ) https://adventofcode.c...

IPC and guid type

Hi,I have two different kind of TCP/IP clients and both are working very well for all other types than guid.If I want to get 2 xexp 62 from q I’ll send the following bytes to q1 1 0 0 23 0 0 0 10 0 9 0 0 0 50 32 120 101 120 112 32 54 501 1 0 0 23 0 0...

Log Replay with Timing

Hello Kdb+ enthusiasts!I have a binary log file around 100 GB which I want to replay with respect to each line timing. Normally, when we replay the log file, it is simply going quickly over all lines and let's say it will complete in 10 minutes. But ...

kdb+ Tutorial in Chinese

Hi," kdb+ Tutorial in Chinese" , the first kdb+/q guide book in Chinese for kdb+ beginners , is now available at https://kdbcn.github.io and https://kdbcn.gitee.io.Regards,Richard Z.

fby with variable grouped columns

if i want to wrap a fby select statement in to a function with a variable grp keylet's say i have a select queries with fby on 3 columns, `a`b`cselect from tbl where time(max;time) fby ([] a ; b ; c)now if i want to generize to group by a variable of...

Parameterizing Timeframe Window in wj

I'm attempting to parameterize the w component of a traditional window join:wj [w; c; t; (q; (f0;c0); (f1;c1))] I'm hoping to be able to do:variablename: 1;w:-variablename 1+\:t.time instead of... w:-2 1+\:t.time Thanks!

planefan by New Contributor III
  • 1 replies
  • 0 kudos


Hello All! I am new to this forum and this is my first question here. I have been using kdb to develop solutions for my company for about 8 months now.I have a rather simple question:q)a:-3iq)b:0fq)a*b-0fI dont want to see the -0. Note that b can be ...

gshyam by New Contributor
  • 5 replies
  • 0 kudos

Simple Query with string

Hello,Im trying to create a new column(boolean) based on the string value of another column. Heres an example query I'm trying to use.select has_name:?[not name="";1b;0b] from t1Assume that t1 has a column name which is a string that contains names. ...

Gene_K by New Contributor
  • 3 replies
  • 0 kudos

Simple exercicio (novato)

Good evening everyone!Unfortunately I'm not having the time I would like to study KDB + and Q.I am at the very beginning of my studies.Following all indications from the official website (learn section).I'm still thinking of simple examples to solve ...

SSL issue

Hi,I'm having difficulty making a successful SSL connection to stream-api-integration.betfair.com:443.hopen hsym `$"tcps://stream-api-integration.betfair.com:443"I have OpenSsl installed and have a key and cert file specified in the Environment Varia...

Tomás by New Contributor
  • 3 replies
  • 0 kudos

License error

Good afternoon everyone!I was studying and writing some code.When executing ./q the message appears:license error: k4.licThanks for listening!

New to Kdb+/q, question about the tutorial

Hello all,I am completely new to Kdb+, and currently learning with the help of the tutorial.The syntax isn't really easy, and I'm trying to understand as much as I can, but there is one line that I don't understand at all.Here : https://code.kx.com/q...

File not found ( official site )

Good morning everyone!I spent the last weeks dedicating myself to the 100% theoretical subjects of the course.I managed to take some time to resume learning kdb + and q.Can someone help me?I looked for the file below to follow the examples and couldn...

Error while creating table

hi All,I am trying to create a table trade:([]sym:n?`sym;time:10:30:00.0+tiln;price:n?3.3e;size:n?9;ex:n?ex);Can someone please tell me what is wrong with the above statement?Thanks,Nitin

how to encrypt password in kdb q handle.

Hello Masters,I am new to q kdb and so please help with my query.I am trying to open the handle to the test environment like below my question is how I can encrypt my password or if there is any way I can avoid hardcoding it.env:`$":myurl:port:userna...

RE: [personal kdb+] Abridged summary of

v\:* {behavior:url(#default#VML);}o\:* {behavior:url(#default#VML);}w\:* {behavior:url(#default#VML);}.shape {behavior:url(#default#VML);}Thanks Caolan, I appreciate the follow up. I managed to get things working, so thanks for the help. I also found...

how to generate multiple columns

Hi Masters,I have a table T like this:date, close------------------I would like to get this one:date, close, yield1, yield2, yield3, ... ,yield20---------------------------------------------------------------------As you see, I need to get 1-20 days ...

James1 by New Contributor
  • 6 replies
  • 0 kudos

Tables Refusing To Save Down

What would cause a table to refuse to save down and give a `type error?I've checked, definitely a table I'm trying to save down. Something like 139 columns, is that the problem?Thanks!

planefan by New Contributor III
  • 6 replies
  • 0 kudos

matrix convolution

Hi - I'm trying to figure out how to do a convolution on a matrix applied to successive overlapping sub-windows.Say I have a larger matrix q)m4:zpad 4 4#"f"$til 16wherezpad:{0,/:flip 0,/:(flip x,\:0),\:0} / pad w/0s all aroundand a smaller convolutio...

DevonMcC by New Contributor
  • 5 replies
  • 0 kudos

Q Phrasebook

Good Morning!I'm taking advantage of the weekend to study q.Right now I'm at:https://code.kx.com/phrases/shape/#conform-table-x-rows-to-list-yWhen executing the line below ...q) x: 3 3#1+!9'! [0] x: 3 3#1+!9 ^I did not understand.Best RegardsGeraldo