3eaa73bf4bd44e05f5c33b0298d135ff9aa66c3f..e1cae7066469335c221206940a9554fa4ea5cbab
9 days ago vineeth
EPD-27-Test
e1cae7 diff | tree
9 days ago vineeth
EPD-27- Remove duplicates from brandnames
b9c5fb diff | tree
1 files added
1031 ■■■■■ changed files
etl/brand_Name_Duplate_remove.ktr 1031 ●●●●● patch | view | raw | blame | history
etl/brand_Name_Duplate_remove.ktr
....@@ -0,0 +1,1031 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<transformation>
3
+ <info>
4
+ <name>test</name>
5
+ <description/>
6
+ <extended_description/>
7
+ <trans_version/>
8
+ <trans_type>Normal</trans_type>
9
+ <trans_status>0</trans_status>
10
+ <directory>&#x2f;</directory>
11
+ <parameters>
12
+ </parameters>
13
+ <log>
14
+ <trans-log-table>
15
+ <connection/>
16
+ <schema/>
17
+ <table/>
18
+ <size_limit_lines/>
19
+ <interval/>
20
+ <timeout_days/>
21
+ <field>
22
+ <id>ID_BATCH</id>
23
+ <enabled>Y</enabled>
24
+ <name>ID_BATCH</name>
25
+ </field>
26
+ <field>
27
+ <id>CHANNEL_ID</id>
28
+ <enabled>Y</enabled>
29
+ <name>CHANNEL_ID</name>
30
+ </field>
31
+ <field>
32
+ <id>TRANSNAME</id>
33
+ <enabled>Y</enabled>
34
+ <name>TRANSNAME</name>
35
+ </field>
36
+ <field>
37
+ <id>STATUS</id>
38
+ <enabled>Y</enabled>
39
+ <name>STATUS</name>
40
+ </field>
41
+ <field>
42
+ <id>LINES_READ</id>
43
+ <enabled>Y</enabled>
44
+ <name>LINES_READ</name>
45
+ <subject/>
46
+ </field>
47
+ <field>
48
+ <id>LINES_WRITTEN</id>
49
+ <enabled>Y</enabled>
50
+ <name>LINES_WRITTEN</name>
51
+ <subject/>
52
+ </field>
53
+ <field>
54
+ <id>LINES_UPDATED</id>
55
+ <enabled>Y</enabled>
56
+ <name>LINES_UPDATED</name>
57
+ <subject/>
58
+ </field>
59
+ <field>
60
+ <id>LINES_INPUT</id>
61
+ <enabled>Y</enabled>
62
+ <name>LINES_INPUT</name>
63
+ <subject/>
64
+ </field>
65
+ <field>
66
+ <id>LINES_OUTPUT</id>
67
+ <enabled>Y</enabled>
68
+ <name>LINES_OUTPUT</name>
69
+ <subject/>
70
+ </field>
71
+ <field>
72
+ <id>LINES_REJECTED</id>
73
+ <enabled>Y</enabled>
74
+ <name>LINES_REJECTED</name>
75
+ <subject/>
76
+ </field>
77
+ <field>
78
+ <id>ERRORS</id>
79
+ <enabled>Y</enabled>
80
+ <name>ERRORS</name>
81
+ </field>
82
+ <field>
83
+ <id>STARTDATE</id>
84
+ <enabled>Y</enabled>
85
+ <name>STARTDATE</name>
86
+ </field>
87
+ <field>
88
+ <id>ENDDATE</id>
89
+ <enabled>Y</enabled>
90
+ <name>ENDDATE</name>
91
+ </field>
92
+ <field>
93
+ <id>LOGDATE</id>
94
+ <enabled>Y</enabled>
95
+ <name>LOGDATE</name>
96
+ </field>
97
+ <field>
98
+ <id>DEPDATE</id>
99
+ <enabled>Y</enabled>
100
+ <name>DEPDATE</name>
101
+ </field>
102
+ <field>
103
+ <id>REPLAYDATE</id>
104
+ <enabled>Y</enabled>
105
+ <name>REPLAYDATE</name>
106
+ </field>
107
+ <field>
108
+ <id>LOG_FIELD</id>
109
+ <enabled>Y</enabled>
110
+ <name>LOG_FIELD</name>
111
+ </field>
112
+ <field>
113
+ <id>EXECUTING_SERVER</id>
114
+ <enabled>N</enabled>
115
+ <name>EXECUTING_SERVER</name>
116
+ </field>
117
+ <field>
118
+ <id>EXECUTING_USER</id>
119
+ <enabled>N</enabled>
120
+ <name>EXECUTING_USER</name>
121
+ </field>
122
+ <field>
123
+ <id>CLIENT</id>
124
+ <enabled>N</enabled>
125
+ <name>CLIENT</name>
126
+ </field>
127
+ </trans-log-table>
128
+ <perf-log-table>
129
+ <connection/>
130
+ <schema/>
131
+ <table/>
132
+ <interval/>
133
+ <timeout_days/>
134
+ <field>
135
+ <id>ID_BATCH</id>
136
+ <enabled>Y</enabled>
137
+ <name>ID_BATCH</name>
138
+ </field>
139
+ <field>
140
+ <id>SEQ_NR</id>
141
+ <enabled>Y</enabled>
142
+ <name>SEQ_NR</name>
143
+ </field>
144
+ <field>
145
+ <id>LOGDATE</id>
146
+ <enabled>Y</enabled>
147
+ <name>LOGDATE</name>
148
+ </field>
149
+ <field>
150
+ <id>TRANSNAME</id>
151
+ <enabled>Y</enabled>
152
+ <name>TRANSNAME</name>
153
+ </field>
154
+ <field>
155
+ <id>STEPNAME</id>
156
+ <enabled>Y</enabled>
157
+ <name>STEPNAME</name>
158
+ </field>
159
+ <field>
160
+ <id>STEP_COPY</id>
161
+ <enabled>Y</enabled>
162
+ <name>STEP_COPY</name>
163
+ </field>
164
+ <field>
165
+ <id>LINES_READ</id>
166
+ <enabled>Y</enabled>
167
+ <name>LINES_READ</name>
168
+ </field>
169
+ <field>
170
+ <id>LINES_WRITTEN</id>
171
+ <enabled>Y</enabled>
172
+ <name>LINES_WRITTEN</name>
173
+ </field>
174
+ <field>
175
+ <id>LINES_UPDATED</id>
176
+ <enabled>Y</enabled>
177
+ <name>LINES_UPDATED</name>
178
+ </field>
179
+ <field>
180
+ <id>LINES_INPUT</id>
181
+ <enabled>Y</enabled>
182
+ <name>LINES_INPUT</name>
183
+ </field>
184
+ <field>
185
+ <id>LINES_OUTPUT</id>
186
+ <enabled>Y</enabled>
187
+ <name>LINES_OUTPUT</name>
188
+ </field>
189
+ <field>
190
+ <id>LINES_REJECTED</id>
191
+ <enabled>Y</enabled>
192
+ <name>LINES_REJECTED</name>
193
+ </field>
194
+ <field>
195
+ <id>ERRORS</id>
196
+ <enabled>Y</enabled>
197
+ <name>ERRORS</name>
198
+ </field>
199
+ <field>
200
+ <id>INPUT_BUFFER_ROWS</id>
201
+ <enabled>Y</enabled>
202
+ <name>INPUT_BUFFER_ROWS</name>
203
+ </field>
204
+ <field>
205
+ <id>OUTPUT_BUFFER_ROWS</id>
206
+ <enabled>Y</enabled>
207
+ <name>OUTPUT_BUFFER_ROWS</name>
208
+ </field>
209
+ </perf-log-table>
210
+ <channel-log-table>
211
+ <connection/>
212
+ <schema/>
213
+ <table/>
214
+ <timeout_days/>
215
+ <field>
216
+ <id>ID_BATCH</id>
217
+ <enabled>Y</enabled>
218
+ <name>ID_BATCH</name>
219
+ </field>
220
+ <field>
221
+ <id>CHANNEL_ID</id>
222
+ <enabled>Y</enabled>
223
+ <name>CHANNEL_ID</name>
224
+ </field>
225
+ <field>
226
+ <id>LOG_DATE</id>
227
+ <enabled>Y</enabled>
228
+ <name>LOG_DATE</name>
229
+ </field>
230
+ <field>
231
+ <id>LOGGING_OBJECT_TYPE</id>
232
+ <enabled>Y</enabled>
233
+ <name>LOGGING_OBJECT_TYPE</name>
234
+ </field>
235
+ <field>
236
+ <id>OBJECT_NAME</id>
237
+ <enabled>Y</enabled>
238
+ <name>OBJECT_NAME</name>
239
+ </field>
240
+ <field>
241
+ <id>OBJECT_COPY</id>
242
+ <enabled>Y</enabled>
243
+ <name>OBJECT_COPY</name>
244
+ </field>
245
+ <field>
246
+ <id>REPOSITORY_DIRECTORY</id>
247
+ <enabled>Y</enabled>
248
+ <name>REPOSITORY_DIRECTORY</name>
249
+ </field>
250
+ <field>
251
+ <id>FILENAME</id>
252
+ <enabled>Y</enabled>
253
+ <name>FILENAME</name>
254
+ </field>
255
+ <field>
256
+ <id>OBJECT_ID</id>
257
+ <enabled>Y</enabled>
258
+ <name>OBJECT_ID</name>
259
+ </field>
260
+ <field>
261
+ <id>OBJECT_REVISION</id>
262
+ <enabled>Y</enabled>
263
+ <name>OBJECT_REVISION</name>
264
+ </field>
265
+ <field>
266
+ <id>PARENT_CHANNEL_ID</id>
267
+ <enabled>Y</enabled>
268
+ <name>PARENT_CHANNEL_ID</name>
269
+ </field>
270
+ <field>
271
+ <id>ROOT_CHANNEL_ID</id>
272
+ <enabled>Y</enabled>
273
+ <name>ROOT_CHANNEL_ID</name>
274
+ </field>
275
+ </channel-log-table>
276
+ <step-log-table>
277
+ <connection/>
278
+ <schema/>
279
+ <table/>
280
+ <timeout_days/>
281
+ <field>
282
+ <id>ID_BATCH</id>
283
+ <enabled>Y</enabled>
284
+ <name>ID_BATCH</name>
285
+ </field>
286
+ <field>
287
+ <id>CHANNEL_ID</id>
288
+ <enabled>Y</enabled>
289
+ <name>CHANNEL_ID</name>
290
+ </field>
291
+ <field>
292
+ <id>LOG_DATE</id>
293
+ <enabled>Y</enabled>
294
+ <name>LOG_DATE</name>
295
+ </field>
296
+ <field>
297
+ <id>TRANSNAME</id>
298
+ <enabled>Y</enabled>
299
+ <name>TRANSNAME</name>
300
+ </field>
301
+ <field>
302
+ <id>STEPNAME</id>
303
+ <enabled>Y</enabled>
304
+ <name>STEPNAME</name>
305
+ </field>
306
+ <field>
307
+ <id>STEP_COPY</id>
308
+ <enabled>Y</enabled>
309
+ <name>STEP_COPY</name>
310
+ </field>
311
+ <field>
312
+ <id>LINES_READ</id>
313
+ <enabled>Y</enabled>
314
+ <name>LINES_READ</name>
315
+ </field>
316
+ <field>
317
+ <id>LINES_WRITTEN</id>
318
+ <enabled>Y</enabled>
319
+ <name>LINES_WRITTEN</name>
320
+ </field>
321
+ <field>
322
+ <id>LINES_UPDATED</id>
323
+ <enabled>Y</enabled>
324
+ <name>LINES_UPDATED</name>
325
+ </field>
326
+ <field>
327
+ <id>LINES_INPUT</id>
328
+ <enabled>Y</enabled>
329
+ <name>LINES_INPUT</name>
330
+ </field>
331
+ <field>
332
+ <id>LINES_OUTPUT</id>
333
+ <enabled>Y</enabled>
334
+ <name>LINES_OUTPUT</name>
335
+ </field>
336
+ <field>
337
+ <id>LINES_REJECTED</id>
338
+ <enabled>Y</enabled>
339
+ <name>LINES_REJECTED</name>
340
+ </field>
341
+ <field>
342
+ <id>ERRORS</id>
343
+ <enabled>Y</enabled>
344
+ <name>ERRORS</name>
345
+ </field>
346
+ <field>
347
+ <id>LOG_FIELD</id>
348
+ <enabled>N</enabled>
349
+ <name>LOG_FIELD</name>
350
+ </field>
351
+ </step-log-table>
352
+ <metrics-log-table>
353
+ <connection/>
354
+ <schema/>
355
+ <table/>
356
+ <timeout_days/>
357
+ <field>
358
+ <id>ID_BATCH</id>
359
+ <enabled>Y</enabled>
360
+ <name>ID_BATCH</name>
361
+ </field>
362
+ <field>
363
+ <id>CHANNEL_ID</id>
364
+ <enabled>Y</enabled>
365
+ <name>CHANNEL_ID</name>
366
+ </field>
367
+ <field>
368
+ <id>LOG_DATE</id>
369
+ <enabled>Y</enabled>
370
+ <name>LOG_DATE</name>
371
+ </field>
372
+ <field>
373
+ <id>METRICS_DATE</id>
374
+ <enabled>Y</enabled>
375
+ <name>METRICS_DATE</name>
376
+ </field>
377
+ <field>
378
+ <id>METRICS_CODE</id>
379
+ <enabled>Y</enabled>
380
+ <name>METRICS_CODE</name>
381
+ </field>
382
+ <field>
383
+ <id>METRICS_DESCRIPTION</id>
384
+ <enabled>Y</enabled>
385
+ <name>METRICS_DESCRIPTION</name>
386
+ </field>
387
+ <field>
388
+ <id>METRICS_SUBJECT</id>
389
+ <enabled>Y</enabled>
390
+ <name>METRICS_SUBJECT</name>
391
+ </field>
392
+ <field>
393
+ <id>METRICS_TYPE</id>
394
+ <enabled>Y</enabled>
395
+ <name>METRICS_TYPE</name>
396
+ </field>
397
+ <field>
398
+ <id>METRICS_VALUE</id>
399
+ <enabled>Y</enabled>
400
+ <name>METRICS_VALUE</name>
401
+ </field>
402
+ </metrics-log-table>
403
+ </log>
404
+ <maxdate>
405
+ <connection/>
406
+ <table/>
407
+ <field/>
408
+ <offset>0.0</offset>
409
+ <maxdiff>0.0</maxdiff>
410
+ </maxdate>
411
+ <size_rowset>10000</size_rowset>
412
+ <sleep_time_empty>50</sleep_time_empty>
413
+ <sleep_time_full>50</sleep_time_full>
414
+ <unique_connections>N</unique_connections>
415
+ <feedback_shown>Y</feedback_shown>
416
+ <feedback_size>50000</feedback_size>
417
+ <using_thread_priorities>Y</using_thread_priorities>
418
+ <shared_objects_file/>
419
+ <capture_step_performance>N</capture_step_performance>
420
+ <step_performance_capturing_delay>1000</step_performance_capturing_delay>
421
+ <step_performance_capturing_size_limit>100</step_performance_capturing_size_limit>
422
+ <dependencies>
423
+ </dependencies>
424
+ <partitionschemas>
425
+ </partitionschemas>
426
+ <slaveservers>
427
+ </slaveservers>
428
+ <clusterschemas>
429
+ </clusterschemas>
430
+ <created_user>-</created_user>
431
+ <created_date>2017&#x2f;04&#x2f;14 16&#x3a;52&#x3a;44.414</created_date>
432
+ <modified_user>-</modified_user>
433
+ <modified_date>2017&#x2f;04&#x2f;14 16&#x3a;52&#x3a;44.414</modified_date>
434
+ <key_for_session_key>H4sIAAAAAAAAAAMAAAAAAAAAAAA&#x3d;</key_for_session_key>
435
+ <is_key_private>N</is_key_private>
436
+ </info>
437
+ <notepads>
438
+ </notepads>
439
+ <order>
440
+ <hop>
441
+ <from>Text file input</from>
442
+ <to>Select values</to>
443
+ <enabled>Y</enabled>
444
+ </hop>
445
+ <hop>
446
+ <from>Select values</from>
447
+ <to>Text file output</to>
448
+ <enabled>N</enabled>
449
+ </hop>
450
+ <hop>
451
+ <from>User Defined Java Class</from>
452
+ <to>Text file output</to>
453
+ <enabled>Y</enabled>
454
+ </hop>
455
+ <hop>
456
+ <from>Select values</from>
457
+ <to>User Defined Java Class</to>
458
+ <enabled>Y</enabled>
459
+ </hop>
460
+ </order>
461
+ <step>
462
+ <name>Select values</name>
463
+ <type>SelectValues</type>
464
+ <description/>
465
+ <distribute>Y</distribute>
466
+ <custom_distribution/>
467
+ <copies>1</copies>
468
+ <partitioning>
469
+ <method>none</method>
470
+ <schema_name/>
471
+ </partitioning>
472
+ <fields> <field> <name>Field1</name>
473
+ </field> <field> <name>Field2</name>
474
+ </field> <field> <name>Field3</name>
475
+ </field> <select_unspecified>N</select_unspecified>
476
+ </fields> <cluster_schema/>
477
+ <remotesteps>
478
+ <input>
479
+ </input>
480
+ <output>
481
+ </output>
482
+ </remotesteps>
483
+ <GUI>
484
+ <xloc>464</xloc>
485
+ <yloc>144</yloc>
486
+ <draw>Y</draw>
487
+ </GUI>
488
+ </step>
489
+
490
+ <step>
491
+ <name>Text file input</name>
492
+ <type>TextFileInput</type>
493
+ <description/>
494
+ <distribute>Y</distribute>
495
+ <custom_distribution/>
496
+ <copies>1</copies>
497
+ <partitioning>
498
+ <method>none</method>
499
+ <schema_name/>
500
+ </partitioning>
501
+ <accept_filenames>N</accept_filenames>
502
+ <passing_through_fields>N</passing_through_fields>
503
+ <accept_field/>
504
+ <accept_stepname/>
505
+ <separator> </separator>
506
+ <enclosure/>
507
+ <enclosure_breaks>N</enclosure_breaks>
508
+ <escapechar/>
509
+ <header>N</header>
510
+ <nr_headerlines>1</nr_headerlines>
511
+ <footer>N</footer>
512
+ <nr_footerlines>1</nr_footerlines>
513
+ <line_wrapped>N</line_wrapped>
514
+ <nr_wraps>1</nr_wraps>
515
+ <layout_paged>N</layout_paged>
516
+ <nr_lines_per_page>80</nr_lines_per_page>
517
+ <nr_lines_doc_header>0</nr_lines_doc_header>
518
+ <noempty>Y</noempty>
519
+ <include>N</include>
520
+ <include_field/>
521
+ <rownum>N</rownum>
522
+ <rownumByFile>N</rownumByFile>
523
+ <rownum_field/>
524
+ <format>Unix</format>
525
+ <encoding/>
526
+ <add_to_result_filenames>Y</add_to_result_filenames>
527
+ <file>
528
+ <name>C&#x3a;&#x5c;Users&#x5c;misha&#x5c;AppData&#x5c;Roaming&#x5c;Skype&#x5c;My Skype Received Files&#x5c;boom2.txt</name>
529
+ <filemask/>
530
+ <exclude_filemask/>
531
+ <file_required>N</file_required>
532
+ <include_subfolders>N</include_subfolders>
533
+ <type>CSV</type>
534
+ <compression>None</compression>
535
+ </file>
536
+ <filters>
537
+ </filters>
538
+ <fields>
539
+ <field>
540
+ <name>Field1</name>
541
+ <type>Integer</type>
542
+ <format>&#x23;</format>
543
+ <currency/>
544
+ <decimal>.</decimal>
545
+ <group>,</group>
546
+ <nullif/>
547
+ <ifnull/>
548
+ <position>-1</position>
549
+ <length>15</length>
550
+ <precision>0</precision>
551
+ <trim_type>none</trim_type>
552
+ <repeat>N</repeat>
553
+ </field>
554
+ <field>
555
+ <name>Field2</name>
556
+ <type>String</type>
557
+ <format/>
558
+ <currency/>
559
+ <decimal/>
560
+ <group/>
561
+ <nullif/>
562
+ <ifnull/>
563
+ <position>-1</position>
564
+ <length>50</length>
565
+ <precision>-1</precision>
566
+ <trim_type>none</trim_type>
567
+ <repeat>N</repeat>
568
+ </field>
569
+ <field>
570
+ <name>Field3</name>
571
+ <type>String</type>
572
+ <format/>
573
+ <currency/>
574
+ <decimal/>
575
+ <group/>
576
+ <nullif/>
577
+ <ifnull/>
578
+ <position>-1</position>
579
+ <length>26</length>
580
+ <precision>-1</precision>
581
+ <trim_type>none</trim_type>
582
+ <repeat>N</repeat>
583
+ </field>
584
+ </fields>
585
+ <limit>0</limit>
586
+ <error_ignored>N</error_ignored>
587
+ <skip_bad_files>N</skip_bad_files>
588
+ <file_error_field/>
589
+ <file_error_message_field/>
590
+ <error_line_skipped>N</error_line_skipped>
591
+ <error_count_field/>
592
+ <error_fields_field/>
593
+ <error_text_field/>
594
+ <bad_line_files_destination_directory/>
595
+ <bad_line_files_extension>warning</bad_line_files_extension>
596
+ <error_line_files_destination_directory/>
597
+ <error_line_files_extension>error</error_line_files_extension>
598
+ <line_number_files_destination_directory/>
599
+ <line_number_files_extension>line</line_number_files_extension>
600
+ <date_format_lenient>Y</date_format_lenient>
601
+ <date_format_locale>en_US</date_format_locale>
602
+ <shortFileFieldName/>
603
+ <pathFieldName/>
604
+ <hiddenFieldName/>
605
+ <lastModificationTimeFieldName/>
606
+ <uriNameFieldName/>
607
+ <rootUriNameFieldName/>
608
+ <extensionFieldName/>
609
+ <sizeFieldName/>
610
+ <cluster_schema/>
611
+ <remotesteps>
612
+ <input>
613
+ </input>
614
+ <output>
615
+ </output>
616
+ </remotesteps>
617
+ <GUI>
618
+ <xloc>192</xloc>
619
+ <yloc>160</yloc>
620
+ <draw>Y</draw>
621
+ </GUI>
622
+ </step>
623
+
624
+ <step>
625
+ <name>Text file output</name>
626
+ <type>TextFileOutput</type>
627
+ <description/>
628
+ <distribute>Y</distribute>
629
+ <custom_distribution/>
630
+ <copies>1</copies>
631
+ <partitioning>
632
+ <method>none</method>
633
+ <schema_name/>
634
+ </partitioning>
635
+ <separator> </separator>
636
+ <enclosure/>
637
+ <enclosure_forced>N</enclosure_forced>
638
+ <enclosure_fix_disabled>N</enclosure_fix_disabled>
639
+ <header>N</header>
640
+ <footer>N</footer>
641
+ <format>DOS</format>
642
+ <compression>None</compression>
643
+ <encoding>windows-1252</encoding>
644
+ <endedLine/>
645
+ <fileNameInField>N</fileNameInField>
646
+ <fileNameField/>
647
+ <create_parent_folder>Y</create_parent_folder>
648
+ <file>
649
+ <name>C&#x3a;&#x5c;Users&#x5c;misha&#x5c;Downloads&#x5c;TEST</name>
650
+ <is_command>N</is_command>
651
+ <servlet_output>N</servlet_output>
652
+ <do_not_open_new_file_init>N</do_not_open_new_file_init>
653
+ <extention>txt</extention>
654
+ <append>N</append>
655
+ <split>N</split>
656
+ <haspartno>N</haspartno>
657
+ <add_date>N</add_date>
658
+ <add_time>N</add_time>
659
+ <SpecifyFormat>N</SpecifyFormat>
660
+ <date_time_format/>
661
+ <add_to_result_filenames>Y</add_to_result_filenames>
662
+ <pad>N</pad>
663
+ <fast_dump>N</fast_dump>
664
+ <splitevery>0</splitevery>
665
+ </file>
666
+ <fields>
667
+ <field>
668
+ <name>Field1</name>
669
+ <type>Integer</type>
670
+ <format>&#x23;</format>
671
+ <currency/>
672
+ <decimal>.</decimal>
673
+ <group>,</group>
674
+ <nullif/>
675
+ <trim_type>none</trim_type>
676
+ <length>15</length>
677
+ <precision>0</precision>
678
+ </field>
679
+ <field>
680
+ <name>Field2</name>
681
+ <type>String</type>
682
+ <format/>
683
+ <currency/>
684
+ <decimal/>
685
+ <group/>
686
+ <nullif/>
687
+ <trim_type>none</trim_type>
688
+ <length>50</length>
689
+ <precision>-1</precision>
690
+ </field>
691
+ <field>
692
+ <name>Field3</name>
693
+ <type>String</type>
694
+ <format/>
695
+ <currency/>
696
+ <decimal/>
697
+ <group/>
698
+ <nullif/>
699
+ <trim_type>none</trim_type>
700
+ <length>26</length>
701
+ <precision>-1</precision>
702
+ </field>
703
+ <field>
704
+ <name>Field5</name>
705
+ <type>String</type>
706
+ <format/>
707
+ <currency/>
708
+ <decimal/>
709
+ <group/>
710
+ <nullif/>
711
+ <trim_type>none</trim_type>
712
+ <length>-1</length>
713
+ <precision>-1</precision>
714
+ </field>
715
+ </fields>
716
+ <cluster_schema/>
717
+ <remotesteps>
718
+ <input>
719
+ </input>
720
+ <output>
721
+ </output>
722
+ </remotesteps>
723
+ <GUI>
724
+ <xloc>928</xloc>
725
+ <yloc>240</yloc>
726
+ <draw>Y</draw>
727
+ </GUI>
728
+ </step>
729
+
730
+ <step>
731
+ <name>User Defined Java Class</name>
732
+ <type>UserDefinedJavaClass</type>
733
+ <description/>
734
+ <distribute>Y</distribute>
735
+ <custom_distribution/>
736
+ <copies>1</copies>
737
+ <partitioning>
738
+ <method>none</method>
739
+ <schema_name/>
740
+ </partitioning>
741
+
742
+ <definitions>
743
+ <definition>
744
+ <class_type>TRANSFORM_CLASS</class_type>
745
+
746
+ <class_name>Processor</class_name>
747
+
748
+ <class_source><![CDATA[
749
+import java.util.ArrayList;
750
+
751
+import java.util.HashMap;
752
+
753
+import java.util.LinkedHashMap;
754
+
755
+import java.util.List;
756
+
757
+import java.util.Map;
758
+
759
+import java.util.Map.Entry;
760
+
761
+import java.util.regex.Matcher;
762
+
763
+import java.util.regex.Pattern;
764
+
765
+
766
+public boolean processRow(StepMetaInterface smi, StepDataInterface sdi) throws KettleException {
767
+ if (first) {
768
+ first = false;
769
+
770
+ /* TODO: Your code here. (Using info fields)
771
+
772
+ FieldHelper infoField = get(Fields.Info, "info_field_name");
773
+
774
+ RowSet infoStream = findInfoRowSet("info_stream_tag");
775
+
776
+ Object[] infoRow = null;
777
+
778
+ int infoRowCount = 0;
779
+
780
+ // Read all rows from info step before calling getRow() method, which returns first row from any
781
+ // input rowset. As rowMeta for info and input steps varies getRow() can lead to errors.
782
+ while((infoRow = getRowFrom(infoStream)) != null){
783
+
784
+ // do something with info data
785
+ infoRowCount++;
786
+ }
787
+ */
788
+ }
789
+
790
+ Object[] r = getRow();
791
+
792
+ if (r == null) {
793
+ setOutputDone();
794
+ return false;
795
+ }
796
+
797
+ // It is always safest to call createOutputRow() to ensure that your output row's Object[] is large
798
+ // enough to handle any new fields you are creating in this step.
799
+ r = createOutputRow(r, data.outputRowMeta.size());
800
+
801
+ /* TODO: Your code here. (See Sample)
802
+
803
+ // Get the value from an input field
804
+ String foobar = get(Fields.In, "a_fieldname").getString(r);
805
+
806
+ foobar += "bar";
807
+
808
+ // Set a value in a new output field
809
+ get(Fields.Out, "output_fieldname").setValue(r, foobar);
810
+
811
+
812
+ */
813
+String Field2 = get(Fields.In, "Field2").getString(r);
814
+
815
+get(Fields.Out, "Field5").setValue(r, duplicated(Field2));
816
+String Field5 = get(Fields.Out, "Field5").getString(r);
817
+
818
+ // Send the row on to the next step.
819
+ putRow(data.outputRowMeta, r);
820
+
821
+ return true;
822
+}
823
+public static String duplicated(String input) {
824
+if(input==null || "".equals(input)){
825
+return null;
826
+}
827
+ String output=input;
828
+
829
+
830
+Pattern p = Pattern.compile("[^a-zA-Z0-9 ]", Pattern.CASE_INSENSITIVE);
831
+
832
+ Matcher m = p.matcher(output);
833
+
834
+ boolean b = m.find();
835
+
836
+
837
+
838
+ if (b)
839
+
840
+ return output;
841
+ for (int i = 1; i <= input.length(); i++) {
842
+
843
+ String s=input.substring(0, i);
844
+
845
+ p=Pattern.compile(s,Pattern.CASE_INSENSITIVE);
846
+
847
+ m = p.matcher(input);
848
+
849
+
850
+
851
+ m.find();
852
+
853
+
854
+
855
+ //System.out.println("Previous one: "+m);
856
+
857
+ while (m.find()) {
858
+
859
+// System.out.println("m.group(1): "+m.group(1));
860
+
861
+ // output = m.group(0);
862
+
863
+ boolean setOutPut=true;
864
+
865
+ for(int groupIndex=0;groupIndex<m.group().length();groupIndex++){
866
+
867
+
868
+
869
+ if(m.group().charAt(groupIndex)!=input.charAt(m.group().length()+groupIndex)){
870
+
871
+ setOutPut=false;
872
+
873
+ break;
874
+
875
+ }
876
+
877
+ }
878
+
879
+ //System.out.println("setOutPut: "+setOutPut);
880
+
881
+ if(setOutPut)
882
+
883
+ output=m.group();
884
+
885
+
886
+
887
+ }
888
+
889
+ }
890
+
891
+ System.out.println(output);
892
+
893
+
894
+
895
+ // System.out.println(output.length());
896
+
897
+ List maxDividents=new ArrayList();
898
+
899
+ for(int i=output.length()/2;i>=1;i--)
900
+
901
+ {
902
+
903
+
904
+
905
+ if(output.length()%i==0){
906
+
907
+ //System.out.println(i);
908
+
909
+ maxDividents.add(i);
910
+
911
+ }
912
+
913
+
914
+
915
+ }
916
+
917
+
918
+
919
+
920
+
921
+ for( int dividentIndex=0; dividentIndex<maxDividents.size(); dividentIndex++){
922
+
923
+
924
+ int divident=Integer.parseInt(maxDividents.get(dividentIndex).toString());
925
+
926
+ // System.out.println("divident: "+divident);
927
+
928
+ int multiplicant=1;
929
+
930
+ boolean equal=false;
931
+
932
+ String temp=output;
933
+
934
+ // System.out.println(output);
935
+
936
+ while(multiplicant< output.length()/2){
937
+
938
+ //System.out.println(output);
939
+
940
+ if((output.length() / divident)*multiplicant < output.length() && (output.length()/divident)*(multiplicant*2) <output.length()){
941
+
942
+ String firsHalf=output.substring(0, (output.length()/divident)*multiplicant);
943
+
944
+ String secondHalf=output.substring(output.length()/divident,(output.length()/divident)*2);
945
+
946
+ // System.out.println("firsHalf: "+firsHalf);
947
+
948
+ // System.out.println("secondHalf: "+secondHalf);
949
+
950
+ if(!firsHalf.equals(secondHalf)){
951
+
952
+ equal=false;
953
+
954
+ break;
955
+
956
+ }
957
+
958
+ else{
959
+
960
+ equal=true;
961
+
962
+ }
963
+
964
+
965
+
966
+
967
+
968
+
969
+
970
+ }
971
+
972
+
973
+
974
+ if(equal){
975
+
976
+ //System.out.println("firsHalf: "+output.substring(0, output.length()/divident));
977
+
978
+ return output.substring(0, output.length()/divident);
979
+
980
+ }
981
+
982
+ multiplicant=multiplicant*2;
983
+
984
+ }
985
+
986
+ //System.out.println(output);
987
+
988
+ }
989
+
990
+
991
+
992
+ return output;
993
+
994
+
995
+
996
+ }
997
+]]></class_source>
998
+ </definition>
999
+ </definitions>
1000
+ <fields>
1001
+ <field>
1002
+ <field_name>Field5</field_name>
1003
+
1004
+ <field_type>String</field_type>
1005
+
1006
+ <field_length>-1</field_length>
1007
+
1008
+ <field_precision>-1</field_precision>
1009
+
1010
+ </field>
1011
+ </fields><clear_result_fields>N</clear_result_fields>
1012
+<info_steps></info_steps><target_steps></target_steps><usage_parameters></usage_parameters> <cluster_schema/>
1013
+ <remotesteps>
1014
+ <input>
1015
+ </input>
1016
+ <output>
1017
+ </output>
1018
+ </remotesteps>
1019
+ <GUI>
1020
+ <xloc>704</xloc>
1021
+ <yloc>16</yloc>
1022
+ <draw>Y</draw>
1023
+ </GUI>
1024
+ </step>
1025
+
1026
+ <step_error_handling>
1027
+ </step_error_handling>
1028
+ <slave-step-copy-partition-distribution>
1029
+ </slave-step-copy-partition-distribution>
1030
+ <slave_transformation>N</slave_transformation>
1031
+</transformation>