

megan_mcp
Forum Replies Created
-
megan_mcp
AdministratorMarch 19, 2024 at 12:39 pm in reply to: Functional Statement Practical Guide in KDB+/Q Developer Level 3Hi @trinity,
Thank you for bringing this to our attention.
You are correct and I will have this updated immediately.
Many thanks,
Megan
-
thanks so much for all the advice ! Now looking back at my own solution and your examples, I should have took advantage of using a function. I can see how using a lamba is more effective than reading in the values. I will most definitely take this on board in the future as I understand the fewer the lines of code the better debugged.
-
Along with ‘s help on how to convert to degrees, thanks for showing me a quicker way of solving it!
q)ab: 10 q)bc: 10 q)atan ab%bc 0.7853982 q)atan[ab%bc]*180%acos -1 45f
-
Perfect! What’s more effective than one line of code?
Can you explain the start of the code? :
q)-1 "0123456789"
-
Thank you for your reply! I forgot about the casting.
-
megan_mcp
AdministratorFebruary 22, 2024 at 12:00 am in reply to: KX Dashboards: An Introduction to the Overlay Panel componentThank you for sharing !
-
Hi !
Have you had a look at the template for returnN ?
I think a key feature that you could use is sublist – Sublist of a list | Reference | kdb+ and q documentation – Kdb+ and q documentation (kx.com)
So simply order the table by the column provided in ascending order then subset the first/last N records from the newly ordered table.
If you are still unsure, please feel free to reach out.
Many thanks,
Megan
-
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 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
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
-
Thanks ! And congratulations on completing the capstone!
Best regards,
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
-
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