kdb 5.0 – The Roadmap Ahead
In 1998 kdb+ was released and changed the finance database industry. We want to do it again.
Today we are releasing kdb+ 5.0 that Works Easily for Everyone, Everywhere, with Everything.
- A Data Platform that Easily Works for
- Everyone – Is the most user friendly q ever
- Everywhere – Finance and beyond
- Works with Everything
- Works with every major database tool seamlessly.
- Interoperates with R/Python and almost every major data tool using high speed standards
The Past – What we have done
15 years ago we had a product that was light years ahead of our competition. When you download q today it looks fundamentally similar to how it looked then. Users are presented with a bare q prompt and left to create a tickerplant, a framework and various parts themselves to get real work done.
The landscape has changed and we need to change faster with it. Today we address that. How?
1. We are going to listen and embed ourselves with customers. Pierre and Oleg have been sitting and working with kdb teams at every major bank and hedge fund. They have seen the problems that are being solved, what amazing work those teams have done and where we can improve the core to help them.
2. We are working with the community. Data Intellect invented the marvellous Torq framework, Jo Shinonome has created Kola, Daniel Nugent wrote a wonderful testing framework and numerous others have written useful q modules. They’ve written some great useful components and provided us with lots of insight.
3. We are learning from the competition. Andrew and Ashok have gone round every database and technology similar to ours and examined their strengths and weaknesses. They coded on each and have found some amazing parts but going further they have looked at how those businesses operate and how they attract users.
The Past
Previously. Someone downloaded kdb then needed to email us to use commercially and wait months for their company to negotiate a contract.
Previously. Someone starting with kdb has to recreate a lot of the framework work teams in banks have done and they have to discover and adapt the wonderful work the community has done. We want to unleash that creativity.
Previously. Someone trying to use kdb with tableau, pulse, java, c# has to learn our own driver and struggle to get it to communicate.
Previously. Someone trying to write queries has to write qSQL.
Today we are releasing an amazing version of kdb+ that Works Easily for Everyone, Everywhere with Everything.
Everyone = Modules
Today: We are revealing a Module Framework built into kdb+. This is going to make it easier for everyone to get started.
Bringing the current enterprise quality code to everyone AND enabling existing community contributions to be reused easily.
The great news is, we’ve worked with partners to already have production quality modules available from day zero:
- Torq – from Data Intellect
- qSpec – Testing framework from Daniel Nugent
- QML – q math library – by Andrey Zholos
- qTips – analytics library from Nick Psaris
- S3 – querying from KX
import `qml
import `:https://github.com/nugend/qspec as qspec
import `torq/utils
import `log
q).qml.nicdf .25 .5 .975
-0.6744898 0 1.959964
The framework is documented and public, so you can even load modules from github or your own git URL. (This has required making namespaces stricter to prevent one module from being able to affect another. No more IPC vs local loading oddities). Kdb now ships with a packaging tool called qpm based on concepts similar to NPM.
This will allow both KX and the community to experiment in modules and if successful to integrate those libraries into core.
It will allow you to get up and running with kdb+ faster, at less cost and receive production quality maintenance and feature updates for larger parts of your stack.
Everyone = SQL = Becoming as SQL compatible as possible.
Before – piv:{…….} ij -100 sublist.
- Example: Select *
- Example: Select * from t inner join v LIMIT 50
- Example: Pivot using duckdb notation
- Example: sums, prods, finance functions.
- Query it as if standard postresql database – The old driver is loadable via module.
- Partitioned databases now all “date=…” to be placed anywhere in the query. If it’s not a nice clear error message is sent.
q)select * from partitionedtable where (price<10) AND (date=.z.d) q)PIVOT Cities ON Year USING first Population as POP,Population as P Country Name | 2000_POP 2000_P 2010_POP 2010_P 2020_POP 2020_P --------------------|---------------------------------------------------------------------- NL Amsterdam | 1005 [1005] 1065 [1065] 1158 [1158] US Seattle | 564 [564] 608 [608] 738 [738] US New York City | 8015 [8015] 8175 [8175] 8772 [8772]
With Everything = Postgres Wire Compatible
We’ve listened to user problems with ODBC, tableau, kx drivers over the years and we are now bundling pgwire compatibility within the default kdb engine.
Anything that bundles a postgres driver will now work with kdb+.
With Everything = PyArrow + Parquet
Select from and save to a wide range of open standards: parquet, arrow, delta lake, iceberg.
q)select * from file.parquet q)select * from s3://blah.com/foo q)select * from http://homer.internal/data.csv q)`:asd.parquet 0: table `:asd.parquet
Type Hints
func:{ [argA;argB] if[not -6h=type argA;'wrongType] if[not -9h=type argB;'wrongTypeB] } / now func:{ [argA:int; argB:real] }
This will provide: runtime checking, optimization of code and we’ve worked with qStudio and vs code to automate checks in the UI.
Previously
You had to spend months getting kdb+, then setting it up and building a platform, integrating it with other systems, finding experts.
Today
Download, reuse the existing modules, it works with all existing tools, and the greater SQL and typing support allows more people to safely run queries.
Works Easily for Everyone, Everywhere with Everything.
- Everyone = friendlier SQL, type hints, more functions builtin including PIVOT.
- With Everything = S3 / Parquet / HTTP / Postresql wire compatible.
With modules to allowing greater community contribution and reuse.
One Last Thing: Everywhere = We are releasing the 32 bit version of q FREE for all usages including commercial.
Disclaimer: The above is entirely fictional based on some wishes of the author, no proprietary information is known nor being shared. If you like the ideas let KX know. If you dislike the ideas, let me know and post your thoughts for improvement.