You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This operation is used internally by kdb+ to represent the flip of a memory-mapped splayed table. When loading a database with [`\l`](../basics/syscmds.md#l-load-file-or-directory), the tables in the database are added to the root namespace in this representation.
17
17
18
-
- an **hsym symbol atom** denoting a **splayed** table
19
-
- a **non-hsym symbol atom** denoting a **partitioned** table
18
+
Where `x` is a symbol list containing the names of the table columns and `y` is
20
19
21
-
returns the flip of `y`.
20
+
- an **hsym symbol atom** denoting the path to a **splayed** table
21
+
- a **non-hsym symbol atom** denoting the name of a **partitioned** table
22
+
23
+
returns an object that must be [flipped](flip.md) in order to use it as a table. After flipping, queries will use the memory-mapped on-disk table. Certain operations (including the extra-argument overloads of [`select`](select.md)) will throw a `par` or `nyi` error when used on a partitioned table.
24
+
25
+
```q
26
+
q)`:db/t/ set ([]a:1 2)
27
+
`:db/t/
28
+
q)\l db
29
+
q).Q.s1 t
30
+
"+(,`a)!`:./t/"
31
+
q)t
32
+
a
33
+
-
34
+
1
35
+
2
36
+
```
37
+
38
+
It is possible to manually create this representation:
39
+
40
+
```q
41
+
q)enlist[`a]!`:./t/
42
+
(,`a)!`:./t/
43
+
q)flip enlist[`a]!`:./t/
44
+
a
45
+
-
46
+
1
47
+
2
48
+
```
49
+
50
+
The equivalent for a partitioned table:
51
+
52
+
```q
53
+
q)`:db/2001.01.01/t/ set ([]a:1 2)
54
+
`:db/2001.01.01/t/
55
+
q)`:db/2001.01.02/t/ set ([]a:3 4)
56
+
`:db/2001.01.02/t/
57
+
q)\l db
58
+
q).Q.s1 t
59
+
"+(,`a)!`t"
60
+
q)enlist[`a]!`t
61
+
(,`a)!`t
62
+
q)flip enlist[`a]!`t
63
+
date a
64
+
------------
65
+
2001.01.01 1
66
+
2001.01.01 2
67
+
2001.01.02 3
68
+
2001.01.02 4
69
+
q)select[1] from flip enlist[`a]!`t
70
+
'nyi
71
+
[0] select[1] from flip enlist[`a]!`t
72
+
^
73
+
```
74
+
75
+
If the specified table does not exist on disk, the expression remains unresolved and any attempt to query it fails:
0 commit comments