

davidcrossey
Forum Replies Created
-
davidcrossey
MemberAugust 14, 2024 at 12:53 am in reply to: Dashboard permissions using dashboard directAh sorry, I’m re-reading your original post.
Your admin user lands on the Error page, because they are permissioned to view that dash, and that happens to be the dashboard in the list (.api.dashList).
You can change the ‘home’ dashboard screen to another by re-ordering the above variable for the ‘admin’ usergroup, or leave your workaround change. It just means that the ‘admin’ usergroup won’t be able to edit the Error dashboard (if you need to)
-
davidcrossey
MemberAugust 13, 2024 at 2:24 pm in reply to: Dashboard permissions using dashboard directHi Swapnil,
IIRC, you should check you have a user in the admin usergroup and ensure they aren’t also in the default restricted usergroup. The latter will direct you to the Error dashboard as that’s to prevent non-defined users (and users added to the restricted group) from accessing any of the dashboards.
See this note: https://github.com/davidcrossey/dash-direct-perms/blob/main/README.md#accessing-the-dashboards-direct-application
Cheers,
David
-
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.
-
Thanks for sharing Leah!
-
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"
-
Thanks for sharing the latest from KX Dashboards Kieran!
-
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
-
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?
-
Note, this was just a quick attempt:
q)testfile:flip {(1#x),"t",'/:1_x} csv vs' csv 0: t save `:testfile.csv