Reputation: 14926
In examples provided by https://code.kx.com/q4m3/11_IO/#1113-serializing-and-deserializing-q-entities
I found that I can use \l
to load back a table, but cannot load back a list. Am I missing something, or does \l
only support loading back data of certain types?
`:/tmp/data/t set ([] c1:`a`b`c; c2:10 20 30)
get `:/tmp/data/t
\l /tmp/data/t / OK
`:/tmp/data/L set 10 20 30
get `:/tmp/data/L
\l /tmp/data/L / 'type
Upvotes: 0
Views: 1645
Reputation: 1550
I believe this may be a genuine bug, from the documentation \l
should load in any q serialized file. However I would advise against using \l
to load in files, for the following reasons
get
q)t:.Q.en[`:tmp;([] c1:`a`b`c; c2:10 20 30)]
q)`:/tmp/data3/t/ set t
`:/tmp/data3/t/
q)\\
C:\Users\cbiggs\Documents>q
KDB+ 4.0 2020.05.04 Copyright (C) 1993-2020 Kx Systems
w64/ 8(16)core 16227MB cbiggs lptp633 192.168.56.1 EXPIRE 2021.05.18 [email protected] KOD #4170988
q)\l /tmp/data3/t
`t
q)t
c1 c2
-----
0 10
1 20
2 30
Upvotes: 1
Reputation: 3179
You can load the list into memory by loading the directory in which it lies
q)`:/tmp/data/L set 10 20 30
`:/tmp/data/L
q)\l /tmp/data/
q)L
10 20 30
Upvotes: 2