megan_mcp
Forum Replies Created
-
megan_mcp
AdministratorFebruary 19, 2024 at 12:00 am in reply to: PyKX Project – Netflix – Exercise 2Hi, You are correct for using kx.q.qsql.select, but maybe take a look at the below links to correct the formatting of your query. This will output a pykx.Table which then can easily be converted to a python array. Generating PyKX objects – PyKX Querying – PyKX Hope this helps! Thanks, Megan
-
megan_mcp
AdministratorFebruary 14, 2024 at 12:00 am in reply to: Pagination on query from on-disk/partitioned data (HDB)Hi ,
A suggestion could be to potentially go with a 2 step approach where you first find what the indices are (per partition) for the filter clause being applied – so not pulling the full result into memory. Then, based on all the indices returned, split these up into appropriate pages:
q)n:1000000 q)tbl:([]time:n?.z.t;sym:n?`3;price:n?100f) q).Q.dpft[`:.;;`sym;`tbl]@' 2024.02.12 2024.02.13 / write out two partitions `tbl`tbl q)delete tbl from `. `. q)l . q)s:-100?sym / filter on 100 random symbols q) q)pages:10 q)pageFilters:ungroup select idx:{ceiling[count[x]%y] cut x}[x;pages] by date from select date,i from tbl where sym in s / simple where clause used here on sym q) q).Q.cn tbl q).Q.pn tbl| 10000000 10000000 q) q)pageTable:{.Q.ind[tbl;(sum .Q.pn[`tbl] where date=x[`date])+x[`idx]]} q)pageTable pageFilters[0] / page 0 date sym time price ------------------------------------ 2024.02.12 bbb 03:28:48.269 62.03014 2024.02.12 ghl 05:24:11.985 19.59907 2024.02.12 iah 11:03:44.330 8.724017 q)pageTable pageFilters[1] / page 1 etc date sym time price ------------------------------------ 2024.02.12 iog 07:02:54.903 77.50292 2024.02.12 kec 08:49:43.130 41.2317 2024.02.12 kgi 10:16:09.595 34.10485 q) q)pageTable each pageFilters / page all filters
https://code.kx.com/q/ref/dotq/#qind-partitioned-index
https://code.kx.com/q/ref/dotq/#cn-count-partitioned-table
https://code.kx.com/q/ref/dotq/#pn-partition-countsLet me know if this works!
Many thanks,
Megan
-
Hi ,
Thank you for bringing this to our attention.
Our team are currently working on getting this up and running again.
We will update you as soon as we come to a solution.
Many thanks,
Megan
-
megan_mcp
AdministratorFebruary 6, 2024 at 12:00 am in reply to: How to notify RDB that there’s a new table in the tp that it can subscribe to?Hi ,
Assuming vanilla kdb-tick, without any modifications to pub/sub logic (and this probably advised against), the TP would have to send some sort of signal to the RDB. The RDB would also have to be configured with some logic/callback to then subscribe to new table and instantiate it’s schema. As for data loss, the RDB may also need a customized function to read from the tick log. However, it doesn’t want to replay every entry in the tick log, jut the ones pertaining to the new table (this can be quite expensive depending on size of tick log and can potentially block RDB for significant period of time)There are possible structures that are more advantageous – like using a segmented tick plant where each table has it’s own tick log. In any event, while not supported by vanilla tick setup, it is possible with some custom configuration.
Hope this helps,
Megan
-
Thanks ! And congratulations on completing the capstone!
Best regards,
Megan
-
Hi !
Have you tried navigating to the terminal and running:
cd ..
And then:
rm -rf course-advanced-capstone
This should remove the current instance of the course.
To restart the project, go to the academy and launch the capstone sandbox as normal.
Let me know if this works!
Thanks,
Megan
-
Hi ,
There are currently no immediate plans to offer a matlab client. However, we are constantly monitoring customer needs and adjusting our roadmap accordingly.
If you’re interested Data Intellect have a blog on this topic – https://dataintellect.com/blog/matlab-kdb-and-streaming-data/
Thanks,
Megan
-
megan_mcp
AdministratorJanuary 29, 2024 at 12:00 am in reply to: question about external content of kx dashboardsHi !
The external component is using
<iframe>
to render external content so using “ip:port” is ok.
The problem is that CORS (cross origin resource sharing) policies have changed over time (more restrictive now than they used to be, because of security risks), so accessing other url(ip:port) than of the origin, requires extra http-headers configuration (probably on both sides: origin/iframe).Hope this helps!
Thanks,
Megan
-
Hi ,
When it says it will “avoid some checks and operations” this is due to unix domain sockets (UDS ) avoiding things related to the tcp/ip stack (headers, routing, ) – the kdb+ code itself is the same for both. Tcp/ip loopback interface has gotten more efficient over the years, so its always worth benchmarking your particular use-case against both.
UDS buffers do not auto-tune, unlike tcp, and whilst setting the send buffer size can impact performance, setting the recv buffer has no impact – neither of these are settable from within kdb+ yet. This can impact performance where large data sets (that exceed the uds send buffer size) are being transferred between otherwise busy processes.Hope this helps!
Thanks,
Megan
-
Hi ,
To rename table columns you can use xcol cols, xcol, xcols | Reference | kdb+ and q documentation – Kdb+ and q documentation (kx.com)
Let me know if this works.
Thanks,
Megan
-
megan_mcp
AdministratorDecember 19, 2023 at 12:00 am in reply to: How to link ‘Filters’ across multiple data-grids?Hi !
Have you had a look at our video on Querying Data using KX Dashboards? It includes a tutorial on how to create a view state. https://youtu.be/kTYSScDXDHc
If you still are unsure, let me know and I’ll go in to more detail.
Many thanks,
Megan
-
Hi ,
We took a look at your instance and it was only a matter of reloading the database.
The values were overwritten when you manually ran the datacreation.q file.
It’s fixed now, good luck with the rest of the capstone!
Many thanks,
Megan
-
Hi ,
The q files under FP.Setup should never be ran manually. These run automatically when you first load the capstone.
By running this file again manually it affects the integrity of the data within the tables.
What I suggest is downloading any answers to questions you’ve already passed so that we can wipe your instance and you can start again.
Hope this helps,
Megan
-
Hi !
We actually have a dedicated team that specialises in helping with KDB.AI questions – support@kdbai.com
Hope this helps!
Megan
-
Hi !
In order to execute across a handle, you must either use symbol or string execution.
So instead of having:
hdbH .perm.users
Try using the string method:
hdbH ".perm.users"
Let me know if this works!
Thanks,
Megan