blob: b3f57179c34a002b1d9e7c2639df6adec18ed1b3 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
(
(let source (DataSource '"yt" '"plato"))
(let sink (DataSink '"yt" '"plato"))
(let result (DataSink 'result))
(let r (Read! world source (Key '('table (String '"Input"))) (Void) '()))
(let world (Left! r))
(let input (Right! r))
(let sorted (Sort input (Bool 'true) (lambda '(item) (Member item '"key"))))
(let world (Write! world sink (Key '('table (String 'Output))) sorted '('('mode 'append))))
(let world (Commit! world sink))
(let r (Read! world source (Key '('table (String '"Output"))) (Void) '()))
(let world (Left! r))
(let input (Right! r))
(let filter (lambda '(item) (block '(
(let key (Member item '"key"))
(let res (Coalesce (< key (String '"100")) (Bool 'false)))
(return res)
)
)))
(let out (Filter input filter))
(let world (Write! world result (Key) out '('('type))))
(let world (Commit! world sink))
(let world (Commit! world result))
(return world)
)
|