aboutsummaryrefslogtreecommitdiffstats
path: root/yql/essentials/tests/s-expressions/suites/Epochs/CopySorted.yql
blob: 110b23d6ed269b8894e1cd5867391bd52e85734f (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
31
(
(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 world (Write! world sink (Key '('table (String 'Output))) input '('('mode 'renew))))
(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 '"020")) (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)
)