aboutsummaryrefslogtreecommitdiffstats
path: root/yql/essentials/tests/s-expressions/suites/ManyInputTables/SkipTakeThenMapTreeTables.yql
blob: a4b1c5f1c6bbe7b186e3cd7b95adea7a9437b898 (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
(
#comment
(let mr_source (DataSource 'yt 'plato))
(let x (Read! world mr_source (Key '('table (String 'Input1))) '('key 'subkey 'value) '()))
(let world (Left! x))
(let table1 (Right! x))
(let x (Read! world mr_source (Key '('table (String 'Input2))) '('key 'subkey 'value) '()))
(let world (Left! x))
(let table2 (Right! x))
(let x (Read! world mr_source (Key '('table (String 'Input3))) '('key 'subkey 'value) '()))
(let world (Left! x))
(let table3 (Right! x))
(let e (Extend table1 (Extend table2 table3)))
(let e (Skip e (Uint64 '5))) 
(let e (Take e (Uint64 '6))) 
(let table1map (Map e (lambda '(item) (block '(
   (let value (Member item 'value))
   (let s (Struct))
   (let s (AddMember s 'key (Member item 'key)))
   (let s (AddMember s 'subkey (String '"")))
   (let s (AddMember s 'value value))
   (return s)
)))))
(let mr_sink (DataSink 'yt (quote plato)))
(let world (Write! world mr_sink (Key '('table (String 'Output))) table1map '('('mode 'append))))
(let world (Commit! world mr_sink))
(return world)
)