Tutorials

Datatypes

  • KDB+ has 3 Data Constructs: Atoms, List & Dictionary
  • Every Datatype has an associated Type Number, Type Symbol and a Type Name Associated with it
  • Almost each Datatype has a Null & an Infinite value assigned for itself
  • The Datatypes could be casted from one type to another, wherever it makes sense e.g. Int to Long and vice versa. 

Atoms

  • An Atom is the most fundamental unit of any defined Datatype in KDB.
  • The Type Value of an Atom is the Type Number associated with the Datatype with Negative Sign. e.g. 
type 2022.10.08
-14h
  •  Count of an Atom data will always be 1
count 2022.10.08
1

Following is the list of Datatypes with its corresponding Type Number & Type Symbol.

Type Size Type Symbol Type Number
boolean
1
b
1
byte
1
x
4
short
2
h
5
int
4
i
6
long
8
j
7
real
4
e
8
float
8
f
9
char
1
c
10
symbol
*
s
11
timestamp
8
p
12
month
4
m
13
date
4
d
14
datetime
8
z
15
timespan
8
n
16
minute
4
u
17
second
4
v
18
time
4
t
19
enumeration
20+
table
98
dictionary
99
function
100