-
Notifications
You must be signed in to change notification settings - Fork 0
/
test.lorenz.xml
198 lines (176 loc) · 8.1 KB
/
test.lorenz.xml
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
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<query xmlns="http://uzh.ch/ddis/katts/query">
<!-- Send a heart beat every 100 milliseconds. -->
<heartBeat interval="100" />
<cachedFileSource id="8897655727763874851" parallelism="3" blockSize="2">
<files>
<!-- <file csvFieldDelimiter=","
mimeType="text/comma-separated-values"
isZipped="true"
zipFileEntry="triples-sample.csv"
path="data/triples-sample.csv.zip"/> -->
<!-- <file csvFieldDelimiter=","
mimeType="text/comma-separated-values"
path="data/triples-sample.1000.csv"/> -->
<file csvFieldDelimiter=","
mimeType="text/comma-separated-values"
path="data/2001_5contracts.sorted.triples"/>
</files>
</cachedFileSource>
<tripleFilter groupOn="subject" applyOnSource="8897655727763874851" id="7061742229678171671">
<conditions>
<condition restriction="PRC" item="predicate"/> <!-- ticker price -->
</conditions>
<produces>
<stream id="tickerPrice">
<variable type="xs:double" name="ticker_price" referencesTo="object"/>
<variable type="xs:string" name="ticker_id" referencesTo="subject"/>
</stream>
</produces>
</tripleFilter>
<tripleFilter groupOn="subject" applyOnSource="8897655727763874851" id="6715347588742850100">
<conditions>
<condition restriction="COMNAM" item="predicate"/> <!-- company name -->
</conditions>
<produces>
<stream id="tickerCompanyName">
<variable type="xs:string" name="ticker_compname" referencesTo="object"/>
<variable type="xs:string" name="ticker_id" referencesTo="subject"/>
</stream>
</produces>
</tripleFilter>
<tripleFilter groupOn="subject" applyOnSource="8897655727763874851" id="6017081644368877778">
<conditions>
<condition restriction="TICKER" item="predicate"/> <!-- ticker symbol -->
</conditions>
<produces>
<stream id="tickerSymbol">
<variable type="xs:string" name="ticker_symbol" referencesTo="object"/>
<variable type="xs:string" name="ticker_id" referencesTo="subject"/>
</stream>
</produces>
</tripleFilter>
<temporalJoin id="5224022090846748332_001">
<consumes>
<stream maxBufferSize="5" streamId="tickerSymbol">
<variableGrouping>
<groupOn variableName="ticker_id"/>
</variableGrouping>
</stream>
<stream maxBufferSize="5" streamId="tickerPrice">
<variableGrouping>
<groupOn variableName="ticker_id"/>
</variableGrouping>
</stream>
<stream maxBufferSize="5" streamId="tickerCompanyName">
<variableGrouping>
<groupOn variableName="ticker_id"/>
</variableGrouping>
</stream>
</consumes>
<evictBefore>
<evict from="*" on="*" if="#from.endDate lt #on.startDate"/>
</evictBefore>
<!-- join condition -->
<sameValue onFields="ticker_id"/>
<!-- <joinCondition>
<sameValue onField="ticker_id"/>
<expressionCondition expression="#stream1.compname.equals(#stream2.company)" />
<regularJoin>
<joinVariable fieldName="ticker_id" streamId="tickerSymbol"/>
<joinVariable fieldName="ticker_id" streamId="tickerPrice"/>
<joinVariable fieldName="ticker_id" streamId="tickerCompanyName"/>
</regularJoin>
</joinCondition>-->
<evictAfter>
<!-- <evict from="*" on="*" if="#from.endDate lt #on.startDate"/> -->
</evictAfter>
<produces>
<stream id="tickerStream">
<variable type="xs:string" name="ticker_symbol" referencesTo="ticker_symbol"/>
<variable type="xs:double" name="ticker_price" referencesTo="ticker_price"/>
<variable type="xs:string" name="ticker_compname" referencesTo="ticker_compname"/>
</stream>
</produces>
</temporalJoin>
<!-- <oneFieldJoin maxBufferSize="20" joinPrecision="20000" joinOn="ticker_id" id="6704494385085301467"> -->
<!-- <consumes> -->
<!-- <stream maxBufferSize="5" streamId="tickerSymbol"> -->
<!-- <variableGrouping> -->
<!-- <groupOn variableName="ticker_id"/> -->
<!-- </variableGrouping> -->
<!-- </stream> -->
<!-- <stream maxBufferSize="5" streamId="tickerPrice"> -->
<!-- <variableGrouping> -->
<!-- <groupOn variableName="ticker_id"/> -->
<!-- </variableGrouping> -->
<!-- </stream> -->
<!-- <stream maxBufferSize="5" streamId="tickerCompanyName"> -->
<!-- <variableGrouping> -->
<!-- <groupOn variableName="ticker_id"/> -->
<!-- </variableGrouping> -->
<!-- </stream> -->
<!-- </consumes> -->
<!-- <produces> -->
<!-- <stream id="tickerStream"> -->
<!-- <variable type="xs:string" name="ticker_symbol" referencesTo="ticker_symbol"/> -->
<!-- <variable type="xs:double" name="ticker_price" referencesTo="ticker_price"/> -->
<!-- <variable type="xs:string" name="ticker_compname" referencesTo="ticker_compname"/> -->
<!-- </stream> -->
<!-- </produces> -->
<!-- </oneFieldJoin> -->
<partitioner slideSize="P1D" windowSize="P20D" partitionOn="ticker_symbol" aggregateOn="ticker_price" id="6208158157315429689">
<consumes>
<stream maxBufferSize="5" streamId="tickerStream">
<variableGrouping>
<groupOn variableName="ticker_symbol"/>
</variableGrouping>
</stream>
</consumes>
<produces>
<stream inheritFrom="tickerStream" id="tickerStreamMinMax">
<variable type="xs:double" name="ticker_min" referencesTo="min"/>
<variable type="xs:double" name="ticker_max" referencesTo="max"/>
</stream>
</produces>
<components>
<minPartitioner/>
<maxPartitioner/>
</components>
</partitioner>
<expressionFunction expression="#ticker_max / #ticker_min" id="7987247596824458125">
<consumes>
<stream maxBufferSize="5" streamId="tickerStreamMinMax">
<variableGrouping>
<groupOn variableName="ticker_symbol"/>
</variableGrouping>
</stream>
</consumes>
<produces>
<stream inheritFrom="tickerStreamMinMax" id="tickerStreamfct">
<variable type="xs:double" name="ticker_fct" referencesTo="result"/>
</stream>
</produces>
</expressionFunction>
<expressionFilter expression="#ticker_fct > 1.2" id="7667630733009882228">
<consumes>
<stream maxBufferSize="5" streamId="tickerStreamfct">
<variableGrouping>
<groupOn variableName="ticker_symbol"/>
</variableGrouping>
</stream>
</consumes>
<produces>
<stream inheritFrom="tickerStreamfct" id="filteredTickerStream"/>
</produces>
</expressionFilter>
<fileOutput filePath="data/test.lorenz.output.csv" id="8970866840183677242">
<consumes>
<stream maxBufferSize="5" streamId="filteredTickerStream">
<shuffleGrouping/>
</stream>
</consumes>
</fileOutput>
<!-- we stop as soon as any heartbeat output by any fileOutput bolt is greater than the current time -->
<termination/>
</query>