Subversion Repositories SmartDukaan

Rev

Rev 6560 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
6541 anupam.sin 1
<?xml version="1.0" encoding="UTF-8"?>
2
<transformation>
3
  <info>
4
    <name>RepeatSaleAnalysis</name>
5
    <description/>
6
    <extended_description/>
7
    <trans_version/>
8
    <trans_type>Normal</trans_type>
9
    <directory>&#47;</directory>
10
    <parameters>
11
    </parameters>
12
    <log>
13
<trans-log-table><connection/>
14
<schema/>
15
<table/>
16
<size_limit_lines/>
17
<interval/>
18
<timeout_days/>
19
<field><id>ID_BATCH</id><enabled>Y</enabled><name>ID_BATCH</name></field><field><id>CHANNEL_ID</id><enabled>Y</enabled><name>CHANNEL_ID</name></field><field><id>TRANSNAME</id><enabled>Y</enabled><name>TRANSNAME</name></field><field><id>STATUS</id><enabled>Y</enabled><name>STATUS</name></field><field><id>LINES_READ</id><enabled>Y</enabled><name>LINES_READ</name><subject/></field><field><id>LINES_WRITTEN</id><enabled>Y</enabled><name>LINES_WRITTEN</name><subject/></field><field><id>LINES_UPDATED</id><enabled>Y</enabled><name>LINES_UPDATED</name><subject/></field><field><id>LINES_INPUT</id><enabled>Y</enabled><name>LINES_INPUT</name><subject/></field><field><id>LINES_OUTPUT</id><enabled>Y</enabled><name>LINES_OUTPUT</name><subject/></field><field><id>LINES_REJECTED</id><enabled>Y</enabled><name>LINES_REJECTED</name><subject/></field><field><id>ERRORS</id><enabled>Y</enabled><name>ERRORS</name></field><field><id>STARTDATE</id><enabled>Y</enabled><name>STARTDATE</name></field><field><id>ENDDATE</id><enabled>Y</enabled><name>ENDDATE</name></field><field><id>LOGDATE</id><enabled>Y</enabled><name>LOGDATE</name></field><field><id>DEPDATE</id><enabled>Y</enabled><name>DEPDATE</name></field><field><id>REPLAYDATE</id><enabled>Y</enabled><name>REPLAYDATE</name></field><field><id>LOG_FIELD</id><enabled>Y</enabled><name>LOG_FIELD</name></field></trans-log-table>
20
<perf-log-table><connection/>
21
<schema/>
22
<table/>
23
<interval/>
24
<timeout_days/>
25
<field><id>ID_BATCH</id><enabled>Y</enabled><name>ID_BATCH</name></field><field><id>SEQ_NR</id><enabled>Y</enabled><name>SEQ_NR</name></field><field><id>LOGDATE</id><enabled>Y</enabled><name>LOGDATE</name></field><field><id>TRANSNAME</id><enabled>Y</enabled><name>TRANSNAME</name></field><field><id>STEPNAME</id><enabled>Y</enabled><name>STEPNAME</name></field><field><id>STEP_COPY</id><enabled>Y</enabled><name>STEP_COPY</name></field><field><id>LINES_READ</id><enabled>Y</enabled><name>LINES_READ</name></field><field><id>LINES_WRITTEN</id><enabled>Y</enabled><name>LINES_WRITTEN</name></field><field><id>LINES_UPDATED</id><enabled>Y</enabled><name>LINES_UPDATED</name></field><field><id>LINES_INPUT</id><enabled>Y</enabled><name>LINES_INPUT</name></field><field><id>LINES_OUTPUT</id><enabled>Y</enabled><name>LINES_OUTPUT</name></field><field><id>LINES_REJECTED</id><enabled>Y</enabled><name>LINES_REJECTED</name></field><field><id>ERRORS</id><enabled>Y</enabled><name>ERRORS</name></field><field><id>INPUT_BUFFER_ROWS</id><enabled>Y</enabled><name>INPUT_BUFFER_ROWS</name></field><field><id>OUTPUT_BUFFER_ROWS</id><enabled>Y</enabled><name>OUTPUT_BUFFER_ROWS</name></field></perf-log-table>
26
<channel-log-table><connection/>
27
<schema/>
28
<table/>
29
<timeout_days/>
30
<field><id>ID_BATCH</id><enabled>Y</enabled><name>ID_BATCH</name></field><field><id>CHANNEL_ID</id><enabled>Y</enabled><name>CHANNEL_ID</name></field><field><id>LOG_DATE</id><enabled>Y</enabled><name>LOG_DATE</name></field><field><id>LOGGING_OBJECT_TYPE</id><enabled>Y</enabled><name>LOGGING_OBJECT_TYPE</name></field><field><id>OBJECT_NAME</id><enabled>Y</enabled><name>OBJECT_NAME</name></field><field><id>OBJECT_COPY</id><enabled>Y</enabled><name>OBJECT_COPY</name></field><field><id>REPOSITORY_DIRECTORY</id><enabled>Y</enabled><name>REPOSITORY_DIRECTORY</name></field><field><id>FILENAME</id><enabled>Y</enabled><name>FILENAME</name></field><field><id>OBJECT_ID</id><enabled>Y</enabled><name>OBJECT_ID</name></field><field><id>OBJECT_REVISION</id><enabled>Y</enabled><name>OBJECT_REVISION</name></field><field><id>PARENT_CHANNEL_ID</id><enabled>Y</enabled><name>PARENT_CHANNEL_ID</name></field><field><id>ROOT_CHANNEL_ID</id><enabled>Y</enabled><name>ROOT_CHANNEL_ID</name></field></channel-log-table>
31
<step-log-table><connection/>
32
<schema/>
33
<table/>
34
<timeout_days/>
35
<field><id>ID_BATCH</id><enabled>Y</enabled><name>ID_BATCH</name></field><field><id>CHANNEL_ID</id><enabled>Y</enabled><name>CHANNEL_ID</name></field><field><id>LOG_DATE</id><enabled>Y</enabled><name>LOG_DATE</name></field><field><id>TRANSNAME</id><enabled>Y</enabled><name>TRANSNAME</name></field><field><id>STEPNAME</id><enabled>Y</enabled><name>STEPNAME</name></field><field><id>STEP_COPY</id><enabled>Y</enabled><name>STEP_COPY</name></field><field><id>LINES_READ</id><enabled>Y</enabled><name>LINES_READ</name></field><field><id>LINES_WRITTEN</id><enabled>Y</enabled><name>LINES_WRITTEN</name></field><field><id>LINES_UPDATED</id><enabled>Y</enabled><name>LINES_UPDATED</name></field><field><id>LINES_INPUT</id><enabled>Y</enabled><name>LINES_INPUT</name></field><field><id>LINES_OUTPUT</id><enabled>Y</enabled><name>LINES_OUTPUT</name></field><field><id>LINES_REJECTED</id><enabled>Y</enabled><name>LINES_REJECTED</name></field><field><id>ERRORS</id><enabled>Y</enabled><name>ERRORS</name></field><field><id>LOG_FIELD</id><enabled>N</enabled><name>LOG_FIELD</name></field></step-log-table>
36
    </log>
37
    <maxdate>
38
      <connection/>
39
      <table/>
40
      <field/>
41
      <offset>0.0</offset>
42
      <maxdiff>0.0</maxdiff>
43
    </maxdate>
44
    <size_rowset>10000</size_rowset>
45
    <sleep_time_empty>50</sleep_time_empty>
46
    <sleep_time_full>50</sleep_time_full>
47
    <unique_connections>N</unique_connections>
48
    <feedback_shown>Y</feedback_shown>
49
    <feedback_size>50000</feedback_size>
50
    <using_thread_priorities>Y</using_thread_priorities>
51
    <shared_objects_file/>
52
    <capture_step_performance>N</capture_step_performance>
53
    <step_performance_capturing_delay>1000</step_performance_capturing_delay>
54
    <step_performance_capturing_size_limit>100</step_performance_capturing_size_limit>
55
    <dependencies>
56
    </dependencies>
57
    <partitionschemas>
58
    </partitionschemas>
59
    <slaveservers>
60
    </slaveservers>
61
    <clusterschemas>
62
    </clusterschemas>
63
  <created_user>-</created_user>
64
  <created_date>2012&#47;12&#47;21 13:18:30.424</created_date>
65
  <modified_user>-</modified_user>
66
  <modified_date>2012&#47;12&#47;21 13:18:30.424</modified_date>
67
  </info>
68
  <notepads>
69
  </notepads>
70
  <connection>
71
    <name>local_tran</name>
72
    <server>localhost</server>
73
    <type>MYSQL</type>
74
    <access>Native</access>
75
    <database>transaction</database>
76
    <port>3306</port>
77
    <username>root</username>
78
    <password>Encrypted 2be98afc86aa7f2e4b811a1608cc2fd8a</password>
79
    <servername/>
80
    <data_tablespace/>
81
    <index_tablespace/>
82
    <attributes>
83
      <attribute><code>EXTRA_OPTION_MYSQL.defaultFetchSize</code><attribute>500</attribute></attribute>
84
      <attribute><code>EXTRA_OPTION_MYSQL.useCursorFetch</code><attribute>true</attribute></attribute>
85
      <attribute><code>FORCE_IDENTIFIERS_TO_LOWERCASE</code><attribute>N</attribute></attribute>
86
      <attribute><code>FORCE_IDENTIFIERS_TO_UPPERCASE</code><attribute>N</attribute></attribute>
87
      <attribute><code>IS_CLUSTERED</code><attribute>N</attribute></attribute>
88
      <attribute><code>PORT_NUMBER</code><attribute>3306</attribute></attribute>
89
      <attribute><code>QUOTE_ALL_FIELDS</code><attribute>N</attribute></attribute>
90
      <attribute><code>STREAM_RESULTS</code><attribute>Y</attribute></attribute>
91
      <attribute><code>SUPPORTS_BOOLEAN_DATA_TYPE</code><attribute>N</attribute></attribute>
92
      <attribute><code>USE_POOLING</code><attribute>N</attribute></attribute>
93
    </attributes>
94
  </connection>
95
  <connection>
6557 anupam.sin 96
    <name>Prod_trans</name>
97
    <server>192.168.190.113</server>
98
    <type>MYSQL</type>
99
    <access>Native</access>
100
    <database>transaction</database>
101
    <port>3306</port>
102
    <username>pentaho</username>
103
    <password>Encrypted 2be98afc86aa7f2e4cb79ac798cc2fd8a</password>
104
    <servername/>
105
    <data_tablespace/>
106
    <index_tablespace/>
107
    <attributes>
108
      <attribute><code>EXTRA_OPTION_MYSQL.defaultFetchSize</code><attribute>500</attribute></attribute>
109
      <attribute><code>EXTRA_OPTION_MYSQL.useCursorFetch</code><attribute>true</attribute></attribute>
110
      <attribute><code>FORCE_IDENTIFIERS_TO_LOWERCASE</code><attribute>N</attribute></attribute>
111
      <attribute><code>FORCE_IDENTIFIERS_TO_UPPERCASE</code><attribute>N</attribute></attribute>
112
      <attribute><code>IS_CLUSTERED</code><attribute>N</attribute></attribute>
113
      <attribute><code>PORT_NUMBER</code><attribute>3306</attribute></attribute>
114
      <attribute><code>QUOTE_ALL_FIELDS</code><attribute>N</attribute></attribute>
115
      <attribute><code>STREAM_RESULTS</code><attribute>Y</attribute></attribute>
116
      <attribute><code>SUPPORTS_BOOLEAN_DATA_TYPE</code><attribute>N</attribute></attribute>
117
      <attribute><code>USE_POOLING</code><attribute>N</attribute></attribute>
118
    </attributes>
119
  </connection>
120
  <connection>
6541 anupam.sin 121
    <name>sales_local</name>
122
    <server>localhost</server>
123
    <type>MYSQL</type>
124
    <access>Native</access>
125
    <database>sales</database>
126
    <port>3306</port>
127
    <username>root</username>
128
    <password>Encrypted 2be98afc86aa7f2e4b811a1608cc2fd8a</password>
129
    <servername/>
130
    <data_tablespace/>
131
    <index_tablespace/>
132
    <attributes>
133
      <attribute><code>EXTRA_OPTION_MYSQL.defaultFetchSize</code><attribute>500</attribute></attribute>
134
      <attribute><code>EXTRA_OPTION_MYSQL.useCursorFetch</code><attribute>true</attribute></attribute>
135
      <attribute><code>FORCE_IDENTIFIERS_TO_LOWERCASE</code><attribute>N</attribute></attribute>
136
      <attribute><code>FORCE_IDENTIFIERS_TO_UPPERCASE</code><attribute>N</attribute></attribute>
137
      <attribute><code>IS_CLUSTERED</code><attribute>N</attribute></attribute>
138
      <attribute><code>PORT_NUMBER</code><attribute>3306</attribute></attribute>
139
      <attribute><code>QUOTE_ALL_FIELDS</code><attribute>N</attribute></attribute>
140
      <attribute><code>STREAM_RESULTS</code><attribute>Y</attribute></attribute>
141
      <attribute><code>SUPPORTS_BOOLEAN_DATA_TYPE</code><attribute>N</attribute></attribute>
142
      <attribute><code>USE_POOLING</code><attribute>N</attribute></attribute>
143
    </attributes>
144
  </connection>
145
  <order>
6554 anupam.sin 146
  <hop> <from>PhysicalOrder</from><to>PhysicalOrderSelector</to><enabled>Y</enabled> </hop>  <hop> <from>Append streams</from><to>Sort rows</to><enabled>Y</enabled> </hop>  <hop> <from>Sort rows</from><to>Table output</to><enabled>Y</enabled> </hop>  <hop> <from>DigitalOrder</from><to>DigitalOrderSelector</to><enabled>Y</enabled> </hop>  <hop> <from>DigitalOrderSelector</from><to>Append streams</to><enabled>Y</enabled> </hop>  <hop> <from>PhysicalOrderSelector</from><to>Append streams</to><enabled>Y</enabled> </hop>  </order>
6541 anupam.sin 147
  <step>
148
    <name>Append streams</name>
149
    <type>Append</type>
150
    <description/>
151
    <distribute>Y</distribute>
152
    <copies>1</copies>
153
         <partitioning>
154
           <method>none</method>
155
           <schema_name/>
156
           </partitioning>
6554 anupam.sin 157
<head_name>PhysicalOrderSelector</head_name>
158
<tail_name>DigitalOrderSelector</tail_name>
6541 anupam.sin 159
     <cluster_schema/>
160
 <remotesteps>   <input>   </input>   <output>   </output> </remotesteps>    <GUI>
6554 anupam.sin 161
      <xloc>463</xloc>
162
      <yloc>209</yloc>
6541 anupam.sin 163
      <draw>Y</draw>
164
      </GUI>
165
    </step>
166
 
167
  <step>
168
    <name>DigitalOrder</name>
169
    <type>TableInput</type>
170
    <description/>
171
    <distribute>Y</distribute>
172
    <copies>1</copies>
173
         <partitioning>
174
           <method>none</method>
175
           <schema_name/>
176
           </partitioning>
6557 anupam.sin 177
    <connection>Prod_trans</connection>
6547 anupam.sin 178
    <sql>select b.id as orderId, 
179
b.userId, 
180
1 as orderType, 
181
datediff(b.creationTimestamp, &apos;20101231&apos;) as dateId,
6560 anupam.sin 182
b.creationTimestamp as timestamp,
6547 anupam.sin 183
 
184
 
6557 anupam.sin 185
1000000000 + b.transaction_id as transactionId, 
6554 anupam.sin 186
case when b.totalAmount&lt;250 then 0 when b.totalAmount&lt;500 then 1 when b.totalAmount&lt;1000 then 2 
187
			 when b.totalAmount&lt;2000 then 3 when b.totalAmount &lt; 5000 then 4 when b.totalAmount &lt; 10000 then 5 when b.totalAmount &lt; 15000 then 6 
188
			 when b.totalAmount &lt;20000 then 7 when b.totalAmount &lt; 50000 then 8 else 9 end as amount,
189
case when b.totalAmount&lt;250 then 0 when b.totalAmount&lt;500 then 1 when b.totalAmount&lt;1000 then 2 
190
			 when b.totalAmount&lt;2000 then 3 when b.totalAmount &lt; 5000 then 4 when b.totalAmount &lt; 10000 then 5 when b.totalAmount &lt; 15000 then 6 
191
			 when b.totalAmount &lt;20000 then 7 when b.totalAmount &lt; 50000 then 8 else 9 end as transferPrice, 
192
&apos;000000&apos; as pincode, 
193
case when d.dthOperatorId is null then 100000 + m.mobileOperatorId else 100000 + d.dthOperatorId end as itemId, 
6547 anupam.sin 194
1 as quantity,
195
1005 as status,
196
 
197
 
198
from baseorder b 
199
join rechargeorder r on b.id = r.immediateconsumedorder_digitalorder_baseorder_id 
6554 anupam.sin 200
left join mobilerechargeorder m on m.rechargeorder_immediateconsumedorder_digitalorder_baseorder_id = b.id 
201
left join dthrechargeorder d on d.rechargeorder_immediateconsumedorder_digitalorder_baseorder_id = b.id 
6547 anupam.sin 202
where r.status = 5;
203
</sql>
6541 anupam.sin 204
    <limit>0</limit>
205
    <lookup/>
206
    <execute_each_row>N</execute_each_row>
207
    <variables_active>N</variables_active>
208
    <lazy_conversion_active>N</lazy_conversion_active>
209
     <cluster_schema/>
210
 <remotesteps>   <input>   </input>   <output>   </output> </remotesteps>    <GUI>
6560 anupam.sin 211
      <xloc>120</xloc>
212
      <yloc>278</yloc>
6541 anupam.sin 213
      <draw>Y</draw>
214
      </GUI>
215
    </step>
216
 
217
  <step>
6554 anupam.sin 218
    <name>DigitalOrderSelector</name>
6541 anupam.sin 219
    <type>SelectValues</type>
220
    <description/>
221
    <distribute>Y</distribute>
222
    <copies>1</copies>
223
         <partitioning>
224
           <method>none</method>
225
           <schema_name/>
226
           </partitioning>
227
    <fields>        <select_unspecified>N</select_unspecified>
228
      <meta>        <name>orderId</name>
229
        <rename>orderId</rename>
230
        <type>-</type>
231
        <length>9</length>
232
        <precision>0</precision>
233
        <conversion_mask/>
234
        <date_format_lenient>false</date_format_lenient>
235
        <encoding/>
236
        <decimal_symbol/>
237
        <grouping_symbol/>
238
        <currency_symbol/>
239
        <storage_type/>
6547 anupam.sin 240
      </meta>      <meta>        <name>userId</name>
241
        <rename>userId</rename>
242
        <type>-</type>
243
        <length>9</length>
244
        <precision>0</precision>
245
        <conversion_mask/>
246
        <date_format_lenient>false</date_format_lenient>
247
        <encoding/>
248
        <decimal_symbol/>
249
        <grouping_symbol/>
250
        <currency_symbol/>
251
        <storage_type/>
252
      </meta>      <meta>        <name>orderType</name>
253
        <rename>orderType</rename>
254
        <type>-</type>
255
        <length>15</length>
256
        <precision>0</precision>
257
        <conversion_mask/>
258
        <date_format_lenient>false</date_format_lenient>
259
        <encoding/>
260
        <decimal_symbol/>
261
        <grouping_symbol/>
262
        <currency_symbol/>
263
        <storage_type/>
6541 anupam.sin 264
      </meta>      <meta>        <name>dateId</name>
265
        <rename>dateId</rename>
266
        <type>-</type>
267
        <length>15</length>
268
        <precision>0</precision>
269
        <conversion_mask/>
270
        <date_format_lenient>false</date_format_lenient>
271
        <encoding/>
272
        <decimal_symbol/>
273
        <grouping_symbol/>
274
        <currency_symbol/>
275
        <storage_type/>
6547 anupam.sin 276
      </meta>      <meta>        <name>repeatType</name>
277
        <rename>repeatType</rename>
6541 anupam.sin 278
        <type>-</type>
6547 anupam.sin 279
        <length>15</length>
6541 anupam.sin 280
        <precision>0</precision>
281
        <conversion_mask/>
282
        <date_format_lenient>false</date_format_lenient>
283
        <encoding/>
284
        <decimal_symbol/>
285
        <grouping_symbol/>
286
        <currency_symbol/>
287
        <storage_type/>
6547 anupam.sin 288
      </meta>      <meta>        <name>repeatFrequency</name>
289
        <rename>repeatFrequency</rename>
6541 anupam.sin 290
        <type>-</type>
291
        <length>15</length>
292
        <precision>0</precision>
293
        <conversion_mask/>
294
        <date_format_lenient>false</date_format_lenient>
295
        <encoding/>
296
        <decimal_symbol/>
297
        <grouping_symbol/>
298
        <currency_symbol/>
299
        <storage_type/>
6547 anupam.sin 300
      </meta>      <meta>        <name>transactionId</name>
301
        <rename>transactionId</rename>
6557 anupam.sin 302
        <type>Integer</type>
303
        <length>11</length>
6547 anupam.sin 304
        <precision>0</precision>
305
        <conversion_mask/>
306
        <date_format_lenient>false</date_format_lenient>
307
        <encoding/>
308
        <decimal_symbol/>
309
        <grouping_symbol/>
310
        <currency_symbol/>
311
        <storage_type/>
6541 anupam.sin 312
      </meta>      <meta>        <name>amount</name>
313
        <rename>amount</rename>
314
        <type>Number</type>
315
        <length>9</length>
316
        <precision>0</precision>
317
        <conversion_mask/>
318
        <date_format_lenient>false</date_format_lenient>
319
        <encoding/>
320
        <decimal_symbol/>
321
        <grouping_symbol/>
322
        <currency_symbol/>
323
        <storage_type/>
6547 anupam.sin 324
      </meta>      <meta>        <name>transferPrice</name>
325
        <rename>transferPrice</rename>
326
        <type>Number</type>
327
        <length>9</length>
328
        <precision>0</precision>
329
        <conversion_mask/>
330
        <date_format_lenient>false</date_format_lenient>
331
        <encoding/>
332
        <decimal_symbol/>
333
        <grouping_symbol/>
334
        <currency_symbol/>
335
        <storage_type/>
336
      </meta>      <meta>        <name>pincode</name>
337
        <rename>pincode</rename>
338
        <type>-</type>
339
        <length>3</length>
340
        <precision>-2</precision>
341
        <conversion_mask/>
342
        <date_format_lenient>false</date_format_lenient>
343
        <encoding/>
344
        <decimal_symbol/>
345
        <grouping_symbol/>
346
        <currency_symbol/>
347
        <storage_type/>
348
      </meta>      <meta>        <name>itemId</name>
349
        <rename>itemId</rename>
6554 anupam.sin 350
        <type>Integer</type>
351
        <length>9</length>
6547 anupam.sin 352
        <precision>0</precision>
353
        <conversion_mask/>
354
        <date_format_lenient>false</date_format_lenient>
355
        <encoding/>
356
        <decimal_symbol/>
357
        <grouping_symbol/>
358
        <currency_symbol/>
359
        <storage_type/>
360
      </meta>      <meta>        <name>quantity</name>
361
        <rename>quantity</rename>
362
        <type>Number</type>
363
        <length>15</length>
364
        <precision>0</precision>
365
        <conversion_mask/>
366
        <date_format_lenient>false</date_format_lenient>
367
        <encoding/>
368
        <decimal_symbol/>
369
        <grouping_symbol/>
370
        <currency_symbol/>
371
        <storage_type/>
372
      </meta>      <meta>        <name>status</name>
373
        <rename>status</rename>
374
        <type>-</type>
375
        <length>9</length>
376
        <precision>0</precision>
377
        <conversion_mask/>
378
        <date_format_lenient>false</date_format_lenient>
379
        <encoding/>
380
        <decimal_symbol/>
381
        <grouping_symbol/>
382
        <currency_symbol/>
383
        <storage_type/>
384
      </meta>      <meta>        <name>firstOrderType</name>
385
        <rename>firstOrderType</rename>
386
        <type>-</type>
387
        <length>15</length>
388
        <precision>0</precision>
389
        <conversion_mask/>
390
        <date_format_lenient>false</date_format_lenient>
391
        <encoding/>
392
        <decimal_symbol/>
393
        <grouping_symbol/>
394
        <currency_symbol/>
395
        <storage_type/>
396
      </meta>      <meta>        <name>firstOrderDate</name>
397
        <rename>firstOrderDate</rename>
398
        <type>-</type>
399
        <length>15</length>
400
        <precision>0</precision>
401
        <conversion_mask/>
402
        <date_format_lenient>false</date_format_lenient>
403
        <encoding/>
404
        <decimal_symbol/>
405
        <grouping_symbol/>
406
        <currency_symbol/>
407
        <storage_type/>
6541 anupam.sin 408
      </meta>    </fields>     <cluster_schema/>
409
 <remotesteps>   <input>   </input>   <output>   </output> </remotesteps>    <GUI>
410
      <xloc>316</xloc>
411
      <yloc>278</yloc>
412
      <draw>Y</draw>
413
      </GUI>
414
    </step>
415
 
416
  <step>
7203 anupam.sin 417
    <name>PhysicalOrder</name>
418
    <type>TableInput</type>
419
    <description>PhysicalOrder</description>
6541 anupam.sin 420
    <distribute>Y</distribute>
421
    <copies>1</copies>
422
         <partitioning>
423
           <method>none</method>
424
           <schema_name/>
425
           </partitioning>
7203 anupam.sin 426
    <connection>Prod_trans</connection>
427
    <sql>select o.id as orderId, 
428
o.customer_id as userId, 
429
 
430
case when o.originalOrderId is null then datediff(o.created_timestamp, &apos;20101231&apos;)
431
	else datediff((select created_timestamp from `order` where id = o.originalOrderId), &apos;20101231&apos;) end as dateId ,
432
o.created_timestamp as timestamp, 
433
 
434
 
435
o.transaction_id as transactionId, 
436
case when total_amount&lt;250 then 0 when total_amount&lt;500 then 1 when total_amount&lt;1000 then 2 
437
			 when total_amount&lt;2000 then 3 when total_amount &lt; 5000 then 4 when total_amount &lt; 10000 then 5 when total_amount &lt; 15000 then 6 
438
			 when total_amount &lt;20000 then 7 when total_amount &lt; 50000 then 8 else 9 end as amount, 
439
case when l.transfer_price&lt;250 then 0 when l.transfer_price&lt;500 then 1 when l.transfer_price&lt;1000 then 2 
440
			 when l.transfer_price&lt;2000 then 3 when l.transfer_price &lt; 5000 then 4 when l.transfer_price &lt; 10000 then 5 when l.transfer_price &lt; 15000 then 6 
441
			 when l.transfer_price &lt;20000 then 7 when l.transfer_price &lt; 50000 then 8 else 9 end as transferPrice, 
442
o.customer_pincode as pincode, 
443
l.item_id as itemId, 
444
l.quantity ,
445
o.status,
446
 
447
 
448
from `order` o 
449
join lineitem l on l.order_id = o.id 
450
where o.status in(2,3,4,5,6,7,9,10,12,13,14,16,17,19,20,21,22,23,24,25,26,27,31,32,33,35,36,37,38,39,40,41,42,43,44,45,46,48,50,51,52,54,56,57,58,59,60,61,62,63,64,65,66,67,68,70,72,74,76,77,79,80,81)
451
</sql>
452
    <limit>0</limit>
453
    <lookup/>
454
    <execute_each_row>N</execute_each_row>
455
    <variables_active>N</variables_active>
456
    <lazy_conversion_active>N</lazy_conversion_active>
6541 anupam.sin 457
     <cluster_schema/>
458
 <remotesteps>   <input>   </input>   <output>   </output> </remotesteps>    <GUI>
7203 anupam.sin 459
      <xloc>126</xloc>
460
      <yloc>145</yloc>
6541 anupam.sin 461
      <draw>Y</draw>
462
      </GUI>
463
    </step>
464
 
465
  <step>
6554 anupam.sin 466
    <name>PhysicalOrderSelector</name>
467
    <type>SelectValues</type>
468
    <description/>
469
    <distribute>Y</distribute>
470
    <copies>1</copies>
471
         <partitioning>
472
           <method>none</method>
473
           <schema_name/>
474
           </partitioning>
475
    <fields>        <select_unspecified>N</select_unspecified>
476
      <meta>        <name>orderId</name>
477
        <rename>orderId</rename>
478
        <type>-</type>
479
        <length>9</length>
480
        <precision>0</precision>
481
        <conversion_mask/>
482
        <date_format_lenient>false</date_format_lenient>
483
        <encoding/>
484
        <decimal_symbol/>
485
        <grouping_symbol/>
486
        <currency_symbol/>
487
        <storage_type/>
488
      </meta>      <meta>        <name>userId</name>
489
        <rename>userId</rename>
490
        <type>-</type>
491
        <length>9</length>
492
        <precision>0</precision>
493
        <conversion_mask/>
494
        <date_format_lenient>false</date_format_lenient>
495
        <encoding/>
496
        <decimal_symbol/>
497
        <grouping_symbol/>
498
        <currency_symbol/>
499
        <storage_type/>
500
      </meta>      <meta>        <name>orderType</name>
501
        <rename>orderType</rename>
502
        <type>-</type>
503
        <length>15</length>
504
        <precision>0</precision>
505
        <conversion_mask/>
506
        <date_format_lenient>false</date_format_lenient>
507
        <encoding/>
508
        <decimal_symbol/>
509
        <grouping_symbol/>
510
        <currency_symbol/>
511
        <storage_type/>
512
      </meta>      <meta>        <name>dateId</name>
513
        <rename>dateId</rename>
514
        <type>-</type>
515
        <length>15</length>
516
        <precision>0</precision>
517
        <conversion_mask/>
518
        <date_format_lenient>false</date_format_lenient>
519
        <encoding/>
520
        <decimal_symbol/>
521
        <grouping_symbol/>
522
        <currency_symbol/>
523
        <storage_type/>
524
      </meta>      <meta>        <name>repeatType</name>
525
        <rename>repeatType</rename>
526
        <type>-</type>
527
        <length>15</length>
528
        <precision>0</precision>
529
        <conversion_mask/>
530
        <date_format_lenient>false</date_format_lenient>
531
        <encoding/>
532
        <decimal_symbol/>
533
        <grouping_symbol/>
534
        <currency_symbol/>
535
        <storage_type/>
536
      </meta>      <meta>        <name>repeatFrequency</name>
537
        <rename>repeatFrequency</rename>
538
        <type>-</type>
539
        <length>15</length>
540
        <precision>0</precision>
541
        <conversion_mask/>
542
        <date_format_lenient>false</date_format_lenient>
543
        <encoding/>
544
        <decimal_symbol/>
545
        <grouping_symbol/>
546
        <currency_symbol/>
547
        <storage_type/>
548
      </meta>      <meta>        <name>transactionId</name>
549
        <rename>transactionId</rename>
6557 anupam.sin 550
        <type>Integer</type>
551
        <length>11</length>
6554 anupam.sin 552
        <precision>0</precision>
553
        <conversion_mask/>
554
        <date_format_lenient>false</date_format_lenient>
555
        <encoding/>
556
        <decimal_symbol/>
557
        <grouping_symbol/>
558
        <currency_symbol/>
559
        <storage_type/>
560
      </meta>      <meta>        <name>amount</name>
561
        <rename>amount</rename>
562
        <type>Number</type>
563
        <length>9</length>
564
        <precision>0</precision>
565
        <conversion_mask/>
566
        <date_format_lenient>false</date_format_lenient>
567
        <encoding/>
568
        <decimal_symbol/>
569
        <grouping_symbol/>
570
        <currency_symbol/>
571
        <storage_type/>
572
      </meta>      <meta>        <name>transferPrice</name>
573
        <rename>transferPrice</rename>
574
        <type>Number</type>
575
        <length>9</length>
576
        <precision>0</precision>
577
        <conversion_mask/>
578
        <date_format_lenient>false</date_format_lenient>
579
        <encoding/>
580
        <decimal_symbol/>
581
        <grouping_symbol/>
582
        <currency_symbol/>
583
        <storage_type/>
584
      </meta>      <meta>        <name>pincode</name>
585
        <rename>pincode</rename>
586
        <type>-</type>
587
        <length>10</length>
588
        <precision>-2</precision>
589
        <conversion_mask/>
590
        <date_format_lenient>false</date_format_lenient>
591
        <encoding/>
592
        <decimal_symbol/>
593
        <grouping_symbol/>
594
        <currency_symbol/>
595
        <storage_type/>
596
      </meta>      <meta>        <name>itemId</name>
597
        <rename>itemId</rename>
598
        <type>Integer</type>
599
        <length>9</length>
600
        <precision>0</precision>
601
        <conversion_mask/>
602
        <date_format_lenient>false</date_format_lenient>
603
        <encoding/>
604
        <decimal_symbol/>
605
        <grouping_symbol/>
606
        <currency_symbol/>
607
        <storage_type/>
608
      </meta>      <meta>        <name>quantity</name>
609
        <rename>quantity</rename>
610
        <type>-</type>
611
        <length>-2</length>
612
        <precision>-2</precision>
613
        <conversion_mask/>
614
        <date_format_lenient>false</date_format_lenient>
615
        <encoding/>
616
        <decimal_symbol/>
617
        <grouping_symbol/>
618
        <currency_symbol/>
619
        <storage_type/>
620
      </meta>      <meta>        <name>status</name>
621
        <rename>status</rename>
622
        <type>-</type>
623
        <length>9</length>
624
        <precision>0</precision>
625
        <conversion_mask/>
626
        <date_format_lenient>false</date_format_lenient>
627
        <encoding/>
628
        <decimal_symbol/>
629
        <grouping_symbol/>
630
        <currency_symbol/>
631
        <storage_type/>
632
      </meta>      <meta>        <name>firstOrderType</name>
633
        <rename>firstOrderType</rename>
634
        <type>-</type>
635
        <length>15</length>
636
        <precision>0</precision>
637
        <conversion_mask/>
638
        <date_format_lenient>false</date_format_lenient>
639
        <encoding/>
640
        <decimal_symbol/>
641
        <grouping_symbol/>
642
        <currency_symbol/>
643
        <storage_type/>
644
      </meta>      <meta>        <name>firstOrderDate</name>
645
        <rename>firstOrderDate</rename>
646
        <type>-</type>
647
        <length>15</length>
648
        <precision>0</precision>
649
        <conversion_mask/>
650
        <date_format_lenient>false</date_format_lenient>
651
        <encoding/>
652
        <decimal_symbol/>
653
        <grouping_symbol/>
654
        <currency_symbol/>
655
        <storage_type/>
656
      </meta>    </fields>     <cluster_schema/>
657
 <remotesteps>   <input>   </input>   <output>   </output> </remotesteps>    <GUI>
658
      <xloc>274</xloc>
659
      <yloc>145</yloc>
660
      <draw>Y</draw>
661
      </GUI>
662
    </step>
663
 
7203 anupam.sin 664
  <step>
665
    <name>Sort rows</name>
666
    <type>SortRows</type>
667
    <description/>
668
    <distribute>Y</distribute>
669
    <copies>1</copies>
670
         <partitioning>
671
           <method>none</method>
672
           <schema_name/>
673
           </partitioning>
674
      <directory>%%java.io.tmpdir%%</directory>
675
      <prefix>out</prefix>
676
      <sort_size>1000000</sort_size>
677
      <free_memory>25</free_memory>
678
      <compress>N</compress>
679
      <compress_variable/>
680
      <unique_rows>N</unique_rows>
681
    <fields>
682
      <field>
683
        <name>userId</name>
684
        <ascending>Y</ascending>
685
        <case_sensitive>N</case_sensitive>
686
      </field>
687
    </fields>
688
     <cluster_schema/>
689
 <remotesteps>   <input>   </input>   <output>   </output> </remotesteps>    <GUI>
690
      <xloc>566</xloc>
691
      <yloc>209</yloc>
692
      <draw>Y</draw>
693
      </GUI>
694
    </step>
695
 
696
  <step>
697
    <name>Table output</name>
698
    <type>TableOutput</type>
699
    <description/>
700
    <distribute>Y</distribute>
701
    <copies>1</copies>
702
         <partitioning>
703
           <method>none</method>
704
           <schema_name/>
705
           </partitioning>
706
    <connection>sales_local</connection>
707
    <schema>sales</schema>
708
    <table>commonorders</table>
709
    <commit>1000</commit>
710
    <truncate>Y</truncate>
711
    <ignore_errors>N</ignore_errors>
712
    <use_batch>Y</use_batch>
713
    <specify_fields>N</specify_fields>
714
    <partitioning_enabled>N</partitioning_enabled>
715
    <partitioning_field/>
716
    <partitioning_daily>N</partitioning_daily>
717
    <partitioning_monthly>Y</partitioning_monthly>
718
    <tablename_in_field>N</tablename_in_field>
719
    <tablename_field/>
720
    <tablename_in_table>Y</tablename_in_table>
721
    <return_keys>N</return_keys>
722
    <return_field/>
723
    <fields>
724
        <field>
725
          <column_name>userId</column_name>
726
          <stream_name>userId</stream_name>
727
        </field>
728
        <field>
729
          <column_name>amount</column_name>
730
          <stream_name>amount</stream_name>
731
        </field>
732
        <field>
733
          <column_name>orderId</column_name>
734
          <stream_name>orderId</stream_name>
735
        </field>
736
        <field>
737
          <column_name>dateId</column_name>
738
          <stream_name>dateId</stream_name>
739
        </field>
740
        <field>
741
          <column_name>orderType</column_name>
742
          <stream_name>orderType</stream_name>
743
        </field>
744
        <field>
745
          <column_name>repeatType</column_name>
746
          <stream_name>repeatType</stream_name>
747
        </field>
748
        <field>
749
          <column_name>repeatFrequency</column_name>
750
          <stream_name>repeatFrequency</stream_name>
751
        </field>
752
        <field>
753
          <column_name>transactionId</column_name>
754
          <stream_name>transactionId</stream_name>
755
        </field>
756
        <field>
757
          <column_name>transferPrice</column_name>
758
          <stream_name>transferPrice</stream_name>
759
        </field>
760
        <field>
761
          <column_name>pincode</column_name>
762
          <stream_name>pincode</stream_name>
763
        </field>
764
        <field>
765
          <column_name>itemId</column_name>
766
          <stream_name>itemId</stream_name>
767
        </field>
768
        <field>
769
          <column_name>quantity</column_name>
770
          <stream_name>quantity</stream_name>
771
        </field>
772
        <field>
773
          <column_name>status</column_name>
774
          <stream_name>status</stream_name>
775
        </field>
776
        <field>
777
          <column_name>firstOrderType</column_name>
778
          <stream_name>firstOrderType</stream_name>
779
        </field>
780
        <field>
781
          <column_name>firstOrderDate</column_name>
782
          <stream_name>firstOrderDate</stream_name>
783
        </field>
784
    </fields>
785
     <cluster_schema/>
786
 <remotesteps>   <input>   </input>   <output>   </output> </remotesteps>    <GUI>
787
      <xloc>715</xloc>
788
      <yloc>209</yloc>
789
      <draw>Y</draw>
790
      </GUI>
791
    </step>
792
 
6541 anupam.sin 793
  <step_error_handling>
794
  </step_error_handling>
795
   <slave-step-copy-partition-distribution>
796
</slave-step-copy-partition-distribution>
797
   <slave_transformation>N</slave_transformation>
798
</transformation>