kdb+qpython

What is the kdb+ capital C type?


While trying to query a kdb instance I ran into some type conversion problems (using qPython). When getting the meta data of the table using meta <tablename> it returns the following:

c          | t f a
-----------| -----
time       | t
sym        | s   g
OrderID    | C
ClOrderID  | g
OrigClOrdID| g
SecurityID | s
Symbol     | s
Side       | c
OrderQty   | f
CumQty     | f
LeavesQty  | f
AvgPx      | f
Currency   | s
Commission | f
CommType   | c
CommValue  | f
Account    | s
MsgType    | s
OrdStatus  | s
OrderTime  | t

Now the OrderID column is the one causing me some trouble. I've looked at the kdb docs I can find te c type which indicates the column type is a char, but I can't find anything on the (capital) C type.

I've tried treating it like a char, but that didn't work.

Any ideas on what this C means?


Solution

  • Capital types are nested lists - so the OrderID column in is a list, where each element of the list is a list of type character e.g

    q)meta ([]OrderID:("hello";"there");charlist:"ht")
    c       | t f a
    --------| -----
    OrderID | C
    charlist| c