Normal download and installation visit here.
You may request academic license (not necessary).
I installed the q with a machine-learning environment setup.
Jupyter kernel for kdb+ introduction: https://code.kx.com/q/ml/jupyterq/
The three Kx packages can be downloaded from anaconda.org/kx:
kdbembedpyjupyterq
These are available for Linux, Windows and macOS.
They are in a dependency tree.
- jupyterq
- embedpy
- kdb
So we use command
conda install -c kx jupyterqBefore starting q, run the following commands:
source deactivate base
source activate baseWhen you first run q it will ask for your name and email for generating license.
Call kdb+ within the rlwrap command, which will allow you to call back and edit previous lines.
Use homebrew to install rlwrap
brew install rlwrapVerify installation. Type command to see the version of rlwrap if installed successfully.
rlwrap -vDefine q as a command alias, allowing you to invoke kdb+ without specifying the path to it.
Use vim or IDE of your choice to open ~/.bash_profile:
vim ~/.bash_profile
open -a "Sublime Text" ~/.bash_profileappend the following line
alias q='QHOME=~/anaconda3/q rlwrap -r ~/anaconda3/q/m64/q'and save it. Start a new Terminal session, or tell Bash to use the revised profile:
source ~/.bash_profileType q in Terminal and hit enter.
Now you can type an expression and recall it using the up-arrow key.
q)til 6 / first 6 integers
0 1 2 3 4 5
q)til 6 / first 6 integers
0 1 2 3 4 5
q)\\
$Datafeed Toolbox™ functions enable you to create a Kx Systems, Inc. kdb+ database connection and retrieve data from and write data into a Kx Systems, Inc. kdb+ database.
To retrieve data, first create a Kx Systems, Inc. kdb+ database connection by using the kx function, and then use the fetch function. To write data into the database, use the write function.
For details about the interface, see MATLAB client for kdb+.
For macOS, you need to set PATH for Finder-launched applications .
PATH = getenv('PATH');
setenv('PATH', [PATH ':/Users/<usename>/anaconda3/q/m64')];Download java support files as MATLAB client for kdb+ suggests.
javaaddpath /home/myusername/jdbc.jar
javaaddpath /home/myusername/c.jarWe can confirm that we’ve added this successfully using the javaclasspath function. In Matlab command window:
>> javaclasspath
STATIC JAVA PATH
...
/opt/matlab/2015b/java/jar/toolbox/stats.jar
/opt/matlab/2015b/java/jar/toolbox/symbol.jar
DYNAMIC JAVA PATH
/home/myusername/jdbc.jar
/home/myusername/c.jar