Reference

From Kx Wiki
Jump to: navigation, search

301 Permanent move

This article is now at code.kx.com/q/ref/card

Please update your bookmark. The old wiki will remain here for a while. If you prefer it to the new format, please tell the Librarian why.

Contents

kdb+ Function Reference

Symbols

() precedence/list/table [] block/arguments {} function
= equal <> not equal < less/greater..
+ plus - minus * times
% divided by ; separator ` symbol
? find/rand/select/exec . index/apply/trap @ index/apply/trap
^ fill/coalesce $ cond/cast/enum.. ~ match
# take _ drop/cut , join
! dict/update/delete | max & min
/ comment/over/converge \ abort/scan/iterate \\ quit
/: eachright \: eachleft ': eachprior/peach
' signal/eachboth : amend/return :: generic null/global amend

Numbers

0: prepare/save/load text
1: binary/save binary
2: dynamic load
1, -1 write to stdout
2, -2 write to stderr
n, -n send to handle

Names

A abs, acos, aj, aj0, all, and, any, asc, asin, asof, atan, attr, avg, avgs
B bin, binr
C ceiling, cols, cor, cos, count, cov, cross, csv, cut
D delete, deltas, desc, dev, differ, distinct, div, do, dsave
E each, ej, ema, enlist, eval, except, exec, exit, exp
F fby, fills, first, fkeys, flip, floor
G get, getenv, group, gtime
H hclose, hcount, hdel, hopen, hsym
I iasc, idesc, if, ij, in, insert, inter, inv
K key, keys
L last, like, lj, ljf, load, log, lower, lsq, ltime, ltrim
M mavg, max, maxs, mcount, md5, mdev, med, meta, min, mins, mmax, mmin, mmu, mod, msum
N neg, next, not, null
O or, over
P parse, peach, pj, plist, prd, prds, prev, prior
R rand, rank, ratios, raze, read0, read1, reciprocal, reval, reverse, rload, rotate, rsave, rtrim
S save, scan, scov, sdev, select, set, setenv, show, signum, sin, sqrt, ss, ssr, string, sublist, sum, sums, sv, svar, system
T tables, tan, til, trim, txf, type
U uj, ungroup, union, update, upper, upsert
V value, var, view, views, vs
W wavg, where, while, within, wj, wj1, wsum, ww
X xasc, xbar, xcol, xcols, xdesc, xexp, xgroup, xkey, xlog, xprev, xrank

Namespaces

Warning.png The single letter namespaces - upper case and lowercase - are reserved for Kx use and should not be used to store user-written code or data.

.Q namespace

for functions in the .Q namespace see the .Q unreference

.h namespace

for functions in the .h namespace see the .h unreference

.z namespace

.z.a address .z.ac auth from cookie
.z.b dependencies .z.bm bad message
.z.c physical core count .z.e tls connection status
.z.exit action on exit .z.f file
.z.h host .z.i PID
.z.k release date .z.K version
.z.l license .z.n gmt (timespan)
.z.N local (timespan) .z.o OS
.z.p gmt (timestamp) .z.P local (timestamp)
.z.pc close .z.pg get
.z.pd peach handles .z.ph http get
.z.pi input .z.pm http OPTIONS method
.z.po open .z.pp http post
.z.ps set .z.pw validate user
.z.q quiet mode .z.s self
.z.ts timer .z.u userid
.z.vs value set .z.w handle
.z.wc websocket close .z.wo websocket open
.z.W handles .z.ws websockets
.z.x argv .z.X raw command line
.z.z gmt time (datetime) .z.Z local time (datetime)
.z.[tTdD] time/date shortcuts .z.zd zip defaults

Command Line Options and System Commands

\a tables -b block client write access
\b views \B pending views
-c, \c q console size -C, \C web console size
\cd current directory \d namespace
\e error trap clients -E TLS server mode
\f functions -g, \g garbage collect
-[lL] log updates \l load
-o, \o local time offset -p, \p port
-P, \P float precision -q quiet
-r replicate from host/post \r replication master
\r rename file -s use slaves
\s number of slaves -S, \S prng seed
\t time expression -t, \t timer
-T, \T timeout \ts time and space of expression
-u 1 disable system exits \u reload password file
-[uU] usr:pwd file \v variables
-w, \w workspace size -W, \W week offset
\x expunge handler -z, \z date format
\1, \2 redirect stdout/stderr \_ hide q code

Other Reference Pages

adverbs associations and dictionaries
atoms and lists ! internal functions
console size display precision
datatypes q errors
functions grammar
IPC protocol joins
nouns par.txt
parse trees syntax
table verb
glossary language
Personal tools
Namespaces
Variants
Actions
Navigation
Print/export
Toolbox