blob: 2247aa8e0bbf2268df7f1c26252a30bcc0ceba6a (
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
|
(
(import aggregate_module '"/lib/yql/aggregate.yql")
(import window_module '"/lib/yql/window.yql")
(let world (block '(
(let x (Read! world (DataSource '"yt" '"plato") (MrTableConcat (Key '('table (String '"InputSelf")))) '('"key" '"value") '()))
(let world (Left! x))
(let table0 (Right! x))
(let output (block '(
(let select (block '(
(let core (block '(
(let select (block '(
(let core (Map (EquiJoin '((block '(
(let select (block '(
(let core (EquiJoin '((block '(
(let select (block '(
(let core (EquiJoin '((block '(
(let select (block '(
(let core table0)
(let core (FlatMap core (lambda '(row) (block '(
(let res (AsStruct '('"DeviceID" (Member row '"key"))))
(let res (AsList res))
(return res)
)))))
(return core)
)))
(return select)
)) '"rutaxi") '((block '(
(let select (block '(
(let core table0)
(let core (FlatMap core (lambda '(row) (block '(
(let res (AsStruct '('"devid" (Member row '"key")) '('"mmetric_devid" (Member row '"key"))))
(let res (AsList res))
(return res)
)))))
(return core)
)))
(return select)
)) '"hash") '('RightSemi '"rutaxi" '"hash" '('"rutaxi" '"DeviceID") '('"hash" '"mmetric_devid") '()) '()))
(let core (FlatMap core (lambda '(row) (block '(
(let res (AsStruct '('"devid" (Member row '"hash.devid"))))
(let res (AsList res))
(return res)
)))))
(return core)
)))
(return select)
)) '"x") '((block '(
(let select (block '(
(let core table0)
(let core (FlatMap core (lambda '(row) (block '(
(let res (AsStruct '('"devid" (Member row '"key")) '('"yuid" (Member row '"key"))))
(let res (AsList res))
(return res)
)))))
(return core)
)))
(return select)
)) '"device") '('RightSemi '"x" '"device" '('"x" '"devid") '('"device" '"devid") '()) '()))
(let core (FlatMap core (lambda '(row) (block '(
(let res (AsStruct '('"yuid" (Member row '"device.yuid"))))
(let res (AsList res))
(return res)
)))))
(return core)
)))
(return select)
)) '"y") '((Map (block '(
(let select (block '(
(let core table0)
(let core (FlatMap core (lambda '(row) (block '(
(let res (AsStruct '('"yuid" (Member row '"key")) '('"phones" (Member row '"value"))))
(let res (AsList res))
(return res)
)))))
(return core)
)))
(return select)
)) (lambda '(row) (block '(
(let row (AddMember row '"_equijoin_column_0" ("Concat" (Member row '"yuid") (String '""))))
(return row)
)))) '"cripta") '('RightSemi '"y" '"cripta" '('"y" '"yuid") '('"cripta" '"_equijoin_column_0") '()) '()) (lambda '(row) (block '(
(let row (ForceRemoveMember row '"cripta._equijoin_column_0"))
(return row)
)))))
(let core (FlatMap core (lambda '(row) (block '(
(let res (AsStruct '('"phones" (Member row '"cripta.phones"))))
(let res (AsList res))
(return res)
)))))
(return core)
)))
(return select)
)))
(let core (FlatMap core (lambda '(row) (block '(
(let res (AsStruct '('"phone" (Member row '"phones"))))
(let res (AsList res))
(return res)
)))))
(return core)
)))
(let select (Sort select (Bool 'true) (lambda '(row) (Member row '"phone"))))
(return select)
)))
(let world (block '(
(let result_sink (DataSink 'result))
(let world (Write! world result_sink (Key) output '('('type) '('autoref) '('columns '('"phone")))))
(return (Commit! world result_sink))
)))
(return world)
)))
(let world (block '(
(let plato_sink (DataSink '"yt" '"plato"))
(let world (Commit! world plato_sink))
(return world)
)))
(return world)
)
|