Subversion Repositories SmartDukaan

Rev

Rev 6560 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 6560 Rev 7203
Line 213... Line 213...
213
      <draw>Y</draw>
213
      <draw>Y</draw>
214
      </GUI>
214
      </GUI>
215
    </step>
215
    </step>
216
 
216
 
217
  <step>
217
  <step>
218
    <name>PhysicalOrder</name>
-
 
219
    <type>TableInput</type>
-
 
220
    <description>PhysicalOrder</description>
-
 
221
    <distribute>Y</distribute>
-
 
222
    <copies>1</copies>
-
 
223
         <partitioning>
-
 
224
           <method>none</method>
-
 
225
           <schema_name/>
-
 
226
           </partitioning>
-
 
227
    <connection>Prod_trans</connection>
-
 
228
    <sql>select o.id as orderId, 
-
 
229
o.customer_id as userId, 
-
 
230
0 as orderType, 
-
 
231
case when o.originalOrderId is null then datediff(o.created_timestamp, &apos;20101231&apos;)
-
 
232
	else datediff((select created_timestamp from `order` where id = o.originalOrderId), &apos;20101231&apos;) end as dateId ,
-
 
233
o.created_timestamp as timestamp, 
-
 
234
0 as repeatType, 
-
 
235
0 as repeatFrequency, 
-
 
236
o.transaction_id as transactionId, 
-
 
237
case when total_amount&lt;250 then 0 when total_amount&lt;500 then 1 when total_amount&lt;1000 then 2 
-
 
238
			 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 
-
 
239
			 when total_amount &lt;20000 then 7 when total_amount &lt; 50000 then 8 else 9 end as amount, 
-
 
240
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 
-
 
241
			 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 
-
 
242
			 when l.transfer_price &lt;20000 then 7 when l.transfer_price &lt; 50000 then 8 else 9 end as transferPrice, 
-
 
243
o.customer_pincode as pincode, 
-
 
244
l.item_id as itemId, 
-
 
245
l.quantity ,
-
 
246
o.status,
-
 
247
0 as firstOrderType,
-
 
248
0 as firstOrderDate 
-
 
249
from `order` o 
-
 
250
join lineitem l on l.order_id = o.id 
-
 
251
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)
-
 
252
</sql>
-
 
253
    <limit>0</limit>
-
 
254
    <lookup/>
-
 
255
    <execute_each_row>N</execute_each_row>
-
 
256
    <variables_active>N</variables_active>
-
 
257
    <lazy_conversion_active>N</lazy_conversion_active>
-
 
258
     <cluster_schema/>
-
 
259
 <remotesteps>   <input>   </input>   <output>   </output> </remotesteps>    <GUI>
-
 
260
      <xloc>126</xloc>
-
 
261
      <yloc>145</yloc>
-
 
262
      <draw>Y</draw>
-
 
263
      </GUI>
-
 
264
    </step>
-
 
265
 
-
 
266
  <step>
-
 
267
    <name>DigitalOrderSelector</name>
218
    <name>DigitalOrderSelector</name>
268
    <type>SelectValues</type>
219
    <type>SelectValues</type>
269
    <description/>
220
    <description/>
270
    <distribute>Y</distribute>
221
    <distribute>Y</distribute>
271
    <copies>1</copies>
222
    <copies>1</copies>
Line 461... Line 412...
461
      <draw>Y</draw>
412
      <draw>Y</draw>
462
      </GUI>
413
      </GUI>
463
    </step>
414
    </step>
464
 
415
 
465
  <step>
416
  <step>
466
    <name>Sort rows</name>
417
    <name>PhysicalOrder</name>
467
    <type>SortRows</type>
-
 
468
    <description/>
-
 
469
    <distribute>Y</distribute>
-
 
470
    <copies>1</copies>
-
 
471
         <partitioning>
-
 
472
           <method>none</method>
-
 
473
           <schema_name/>
-
 
474
           </partitioning>
-
 
475
      <directory>%%java.io.tmpdir%%</directory>
-
 
476
      <prefix>out</prefix>
-
 
477
      <sort_size>1000000</sort_size>
-
 
478
      <free_memory>25</free_memory>
-
 
479
      <compress>N</compress>
-
 
480
      <compress_variable/>
-
 
481
      <unique_rows>N</unique_rows>
-
 
482
    <fields>
-
 
483
      <field>
-
 
484
        <name>userId</name>
-
 
485
        <ascending>Y</ascending>
-
 
486
        <case_sensitive>N</case_sensitive>
-
 
487
      </field>
-
 
488
    </fields>
-
 
489
     <cluster_schema/>
-
 
490
 <remotesteps>   <input>   </input>   <output>   </output> </remotesteps>    <GUI>
-
 
491
      <xloc>566</xloc>
-
 
492
      <yloc>209</yloc>
-
 
493
      <draw>Y</draw>
-
 
494
      </GUI>
-
 
495
    </step>
-
 
496
 
-
 
497
  <step>
-
 
498
    <name>Table output</name>
-
 
499
    <type>TableOutput</type>
418
    <type>TableInput</type>
500
    <description/>
419
    <description>PhysicalOrder</description>
501
    <distribute>Y</distribute>
420
    <distribute>Y</distribute>
502
    <copies>1</copies>
421
    <copies>1</copies>
503
         <partitioning>
422
         <partitioning>
504
           <method>none</method>
423
           <method>none</method>
505
           <schema_name/>
424
           <schema_name/>
506
           </partitioning>
425
           </partitioning>
507
    <connection>sales_local</connection>
426
    <connection>Prod_trans</connection>
508
    <schema>sales</schema>
-
 
509
    <table>commonorders</table>
-
 
510
    <commit>1000</commit>
-
 
511
    <truncate>Y</truncate>
-
 
512
    <ignore_errors>N</ignore_errors>
427
    <sql>select o.id as orderId, 
513
    <use_batch>Y</use_batch>
428
o.customer_id as userId, 
514
    <specify_fields>N</specify_fields>
-
 
515
    <partitioning_enabled>N</partitioning_enabled>
-
 
516
    <partitioning_field/>
-
 
517
    <partitioning_daily>N</partitioning_daily>
-
 
518
    <partitioning_monthly>Y</partitioning_monthly>
-
 
519
    <tablename_in_field>N</tablename_in_field>
-
 
520
    <tablename_field/>
-
 
521
    <tablename_in_table>Y</tablename_in_table>
-
 
522
    <return_keys>N</return_keys>
-
 
523
    <return_field/>
429
0 as orderType, 
524
    <fields>
-
 
525
        <field>
-
 
526
          <column_name>userId</column_name>
-
 
527
          <stream_name>userId</stream_name>
-
 
528
        </field>
-
 
529
        <field>
-
 
530
          <column_name>amount</column_name>
-
 
531
          <stream_name>amount</stream_name>
430
case when o.originalOrderId is null then datediff(o.created_timestamp, &apos;20101231&apos;)
532
        </field>
-
 
533
        <field>
-
 
534
          <column_name>orderId</column_name>
-
 
535
          <stream_name>orderId</stream_name>
431
	else datediff((select created_timestamp from `order` where id = o.originalOrderId), &apos;20101231&apos;) end as dateId ,
536
        </field>
-
 
537
        <field>
-
 
538
          <column_name>dateId</column_name>
-
 
539
          <stream_name>dateId</stream_name>
432
o.created_timestamp as timestamp, 
540
        </field>
433
0 as repeatType, 
541
        <field>
434
0 as repeatFrequency, 
542
          <column_name>orderType</column_name>
435
o.transaction_id as transactionId, 
543
          <stream_name>orderType</stream_name>
436
case when total_amount&lt;250 then 0 when total_amount&lt;500 then 1 when total_amount&lt;1000 then 2 
544
        </field>
-
 
545
        <field>
-
 
546
          <column_name>repeatType</column_name>
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 
547
          <stream_name>repeatType</stream_name>
438
			 when total_amount &lt;20000 then 7 when total_amount &lt; 50000 then 8 else 9 end as amount, 
548
        </field>
-
 
549
        <field>
-
 
550
          <column_name>repeatFrequency</column_name>
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 
551
          <stream_name>repeatFrequency</stream_name>
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 
552
        </field>
-
 
553
        <field>
-
 
554
          <column_name>transactionId</column_name>
441
			 when l.transfer_price &lt;20000 then 7 when l.transfer_price &lt; 50000 then 8 else 9 end as transferPrice, 
555
          <stream_name>transactionId</stream_name>
442
o.customer_pincode as pincode, 
556
        </field>
443
l.item_id as itemId, 
557
        <field>
444
l.quantity ,
558
          <column_name>transferPrice</column_name>
-
 
559
          <stream_name>transferPrice</stream_name>
-
 
560
        </field>
445
o.status,
561
        <field>
446
0 as firstOrderType,
562
          <column_name>pincode</column_name>
-
 
563
          <stream_name>pincode</stream_name>
-
 
564
        </field>
447
0 as firstOrderDate 
565
        <field>
448
from `order` o 
566
          <column_name>itemId</column_name>
-
 
567
          <stream_name>itemId</stream_name>
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)
568
        </field>
451
</sql>
569
        <field>
-
 
570
          <column_name>quantity</column_name>
-
 
571
          <stream_name>quantity</stream_name>
-
 
572
        </field>
452
    <limit>0</limit>
573
        <field>
453
    <lookup/>
574
          <column_name>status</column_name>
-
 
575
          <stream_name>status</stream_name>
454
    <execute_each_row>N</execute_each_row>
576
        </field>
-
 
577
        <field>
-
 
578
          <column_name>firstOrderType</column_name>
-
 
579
          <stream_name>firstOrderType</stream_name>
455
    <variables_active>N</variables_active>
580
        </field>
-
 
581
        <field>
-
 
582
          <column_name>firstOrderDate</column_name>
-
 
583
          <stream_name>firstOrderDate</stream_name>
456
    <lazy_conversion_active>N</lazy_conversion_active>
584
        </field>
-
 
585
    </fields>
-
 
586
     <cluster_schema/>
457
     <cluster_schema/>
587
 <remotesteps>   <input>   </input>   <output>   </output> </remotesteps>    <GUI>
458
 <remotesteps>   <input>   </input>   <output>   </output> </remotesteps>    <GUI>
588
      <xloc>715</xloc>
459
      <xloc>126</xloc>
589
      <yloc>209</yloc>
460
      <yloc>145</yloc>
590
      <draw>Y</draw>
461
      <draw>Y</draw>
591
      </GUI>
462
      </GUI>
592
    </step>
463
    </step>
593
 
464
 
594
  <step>
465
  <step>
Line 788... Line 659...
788
      <yloc>145</yloc>
659
      <yloc>145</yloc>
789
      <draw>Y</draw>
660
      <draw>Y</draw>
790
      </GUI>
661
      </GUI>
791
    </step>
662
    </step>
792
 
663
 
-
 
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
 
793
  <step_error_handling>
793
  <step_error_handling>
794
  </step_error_handling>
794
  </step_error_handling>
795
   <slave-step-copy-partition-distribution>
795
   <slave-step-copy-partition-distribution>
796
</slave-step-copy-partition-distribution>
796
</slave-step-copy-partition-distribution>
797
   <slave_transformation>N</slave_transformation>
797
   <slave_transformation>N</slave_transformation>