davidcrossey
Forum Replies Created
-
Thanks for sharing Leah!
-
Thanks for sharing @dhodgins.
Whilst I don’t necessarily agreed with all of the points based on personal preference, I do agree with the overall theme of keep it simple and consistent – both for readability and performance.
I find it’s a balancing act, for example on the projection performance, one may prefer a more tacit style approach as it can be cleaner/easier to read right-to-left the following expression:
aggFunc projFunc[var1;] calcFunc
vs
aggFunc projFunc[var1;calcFunc]
Especially if calcFunc has a longer definition and if the small performance overhead justifies it.
Your blog post and notes on style can be eye-opening and help to develop good code hygiene over the long term.
-
Hi ,
Check out the downloads page here for more information: Download kdb+ Free Personal Edition | KX
-
I can’t comment in an official capacity, but I’m sure there will continue to be conda package releases into the future.
-
Hi Dan,
There was a recent release, if you try updating now you should see the following version:
Regards,
David
-
A quick solution could be utilise something like wget to download the json data instead.
Server
$ q -p 5000 -q q)show data:([]a:1+til 10;b:10?`4) a b ------- 1 milg 2 igfb 3 kaod 4 bafc 5 kfho 6 jecp 7 kfmo 8 lkkl 9 kfif 10 fglg q )`:html/test.json 0: enlist .j.j data
Client
$ wget http://localhost:5000/test.json --2023-09-12 10:46:40-- http://localhost:5000/test.json Resolving localhost (localhost)... 127.0.0.1 Connecting to localhost (localhost)|127.0.0.1|:5000... connected. HTTP request sent, awaiting response... 200 OK Length: 193 [application/json] Saving to: test.json test.json 100%[====================================================>] 193 --.-KB/s in 0s 2023-09-12 10:46:40 (61.1 MB/s)- test.json saved [193/193] $ q -q q)first .j.k each read0 `:test.json a b --------- 1 "milg" 2 "igfb" 3 "kaod" 4 "bafc" 5 "kfho" 6 "jecp" 7 "kfmo" 8 "lkkl" 9 "kfif" 10 "fglg"
-
You can do this in one call without saving the table to the filesystem from the client machine, and without needing to tweak the .z.ph (or .h.val) handlers
Note, if you run the same URL via the brower you’ll see the JSON there, it won’t automatically download like CSV files though.
Hope this helps, in lieu of more community suggestions
-
Thanks for sharing the latest from KX Dashboards Kieran!
-
Note, this was just a quick attempt:
q)testfile:flip {(1#x),"t",'/:1_x} csv vs' csv 0: t save `:testfile.csv
-
Hi ,
Your question isn’t very clear. Do you want to export a table to a csv, or a table with column headers that include tabs?
-
I’m not following your request. I read it as follows, which I don’t think is what you mean?
q)t:([]c1:`a`b`c;c2:1 2 3) q){cc:count cols t;x:csv 0: x;(1#x),enlist[(csv sv cc# enlist enlist "t")],1_x} t "c1,c2" "t,t" "a,1" "b,2" "c,3" q)(count[cols t]#"*";enlist csv) 0: {cc:count cols t;x:csv 0: x;(1#x),enlist[(csv sv cc# enlist enlist "t")],1_x} t c1 c2 ----------- ,"t" ,"t" ,"a" ,"1" ,"b" ,"2" ,"c" ,"3"
If you prepare you csv data and read from disk, you’ll recreate a table without needing to add tabs:
q)csv 0: t “c1,c2” “a,1” “b,2” “c,3″ q)(count[cols t]#”*”;enlist csv) 0: csv 0: t c1 c2 ——— ,”a” ,”1″ ,”b” ,”2″ ,”c” ,”3″
Can you provide a before and after example of what you mean?
-
davidcrossey
MemberJuly 24, 2023 at 12:00 am in reply to: Information needed for Kdb Insights Personal Edition LicenseHi Cristian,
A bunch of questions that might help us guide you;
- What version of JuypterQ do you have?
- What format is your licence? i.e. k[x,4,c].lic?
- What flags have you got in your Insights lic? (Can you share your banner information here?)
- What are your QLIC and QHOME env var pointing to?
q).z.l "" "2024.01.13" "2024.01.13" ,"1" "insights.lib.embedq insights.lib.pykx insights.lib.sql insights.lib.qlog ins.. ,"0" ,"0" "dcrossey..." ,"0" q)" " vs .z.l 4 "insights.lib.embedq" "insights.lib.pykx" "insights.lib.sql" "insights.lib.qlog" "insights.lib.kurl" "insights.lib.objstore" "insights.lib.bigquery" "insights.lib.restserver"
Have you installed your licence as per: Install kdb Insights Core – kdb products (kx.com) ?
-
Yes it can be used on w64, however there are differences in terms of the libraries needed for linking: kdb/w64 at master KxSystems/kdb (github.com)
This repo: kxcontrib/capi (github.com) only supports Linux based environments. You could fork it and add Windows support yourself, or a more straight forward solution would be to setup WSL2 with a *nix distribution (such as Ubuntu), and use that environment for your local development – works with VS Code.