Skip to content

samkennerly/q_practice

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

43 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

q_practice

Join the continuum.

Mariachi band

abstract

Example scripts written in q, the query language for kdb+ databases.

basics

  1. Clone this repo or use it as a template.
  2. Open a terminal and cd to this folder.
  3. Start q and enter \l src/init.q to load src/init.q.

contents

Comments, lists, symbols, functions, show, delete, each, 0N!, ?.

Functions, iterators, lambdas, projections, dot apply, etc.

Pseudorandom normal samples with a Box-Muller transform similar to qtips/stat.q.

System commmands, navigation, file handles, current time.

Example dictionaries, tables, and keys.

One script to run them all and to test/output write them.

dependencies

  • q 3.4+ 64-bit or 32-bit version

examples

Create an alias in a startup file to run q with rlwrap.

export QARCH='m32'
export QHOME="$HOME/q"
alias q='rlwrap --complete-filenames --remember "$QHOME/$QARCH/q"'

Run a q script and interact with it.

q src/tables.q

Run a q script and close the interpreter.

q src/tables.q < /dev/null

Run a q script and save [STDOUT] to a file.

q src/init.q > test/output/init.txt

faq

Where else can I find Q tutorials?

WTF are all these cryptic type values?

I never remember them, so I made a table of datatypes.

About

Introduction to Q, the scripting language for KDB+ databases.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages