-
Notifications
You must be signed in to change notification settings - Fork 0
/
m2p.kjb
460 lines (460 loc) · 18.4 KB
/
m2p.kjb
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
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
<?xml version="1.0" encoding="UTF-8"?>
<job>
<name>global</name>
<description/>
<extended_description/>
<job_version/>
<job_status>0</job_status>
<directory>/</directory>
<created_user>-</created_user>
<created_date>2011/07/08 22:22:48.259</created_date>
<modified_user>-</modified_user>
<modified_date>2011/07/08 22:22:48.259</modified_date>
<parameters>
<parameter>
<name>COMMENT</name>
<default_value>Commenting from M2P</default_value>
<description>The comment that will be set for the new revisions of the transformations and jobs caused by the import.</description>
</parameter>
<parameter>
<name>DIRECTION</name>
<default_value>DEV2ACC</default_value>
<description>The direction of the migration. Possible values are DEV2ACC and ACC2PRD (case insensitive). Deprecated. </description>
</parameter>
<parameter>
<name>ENV_SRC</name>
<default_value/>
<description>The environment to export ETL code from.</description>
</parameter>
<parameter>
<name>ENV_TRG</name>
<default_value/>
<description>THe environment to import ETL code into.</description>
</parameter>
<parameter>
<name>RULES_FILE</name>
<default_value/>
<description>The path to the rules file that you want to use during the import.</description>
</parameter>
<parameter>
<name>SRCFOLDER</name>
<default_value>/public/Hera</default_value>
<description>The folder that needs to be exported from the source repository. Defaults to /. </description>
</parameter>
<parameter>
<name>TMP_FOLDER</name>
<default_value>/tmp/m2p</default_value>
<description>A folder where the export will be stored intermediately. If not used, a temporary folder will be created in the executing user’s home</description>
</parameter>
<parameter>
<name>TRGFOLDER</name>
<default_value>/</default_value>
<description>The folder in the target repository that the export needs to be imported in. Defaults to /. </description>
</parameter>
</parameters>
<slaveservers>
<slaveserver><name>CARTE</name><hostname>${CARTE_HOSTNAME}</hostname><port>${CARTE_PORT}</port><webAppName/><username>${CARTE_USER}</username><password>${CARTE_PWD}</password><proxy_hostname>${CARTE_PROXY_HOST}</proxy_hostname><proxy_port>${CARTE_PROXY_PORT}</proxy_port><non_proxy_hosts>${CARTE_NON_PROXY}</non_proxy_hosts><master>Y</master></slaveserver>
</slaveservers>
<job-log-table><connection/>
<schema/>
<table/>
<size_limit_lines/>
<interval/>
<timeout_days/>
<field><id>ID_JOB</id><enabled>Y</enabled><name>ID_JOB</name></field><field><id>CHANNEL_ID</id><enabled>Y</enabled><name>CHANNEL_ID</name></field><field><id>JOBNAME</id><enabled>Y</enabled><name>JOBNAME</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></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>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></job-log-table>
<jobentry-log-table><connection/>
<schema/>
<table/>
<timeout_days/>
<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>JOBNAME</id><enabled>Y</enabled><name>TRANSNAME</name></field><field><id>JOBENTRYNAME</id><enabled>Y</enabled><name>STEPNAME</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>RESULT</id><enabled>Y</enabled><name>RESULT</name></field><field><id>NR_RESULT_ROWS</id><enabled>Y</enabled><name>NR_RESULT_ROWS</name></field><field><id>NR_RESULT_FILES</id><enabled>Y</enabled><name>NR_RESULT_FILES</name></field><field><id>LOG_FIELD</id><enabled>N</enabled><name>LOG_FIELD</name></field><field><id>COPY_NR</id><enabled>N</enabled><name>COPY_NR</name></field></jobentry-log-table>
<channel-log-table><connection/>
<schema/>
<table/>
<timeout_days/>
<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>
<pass_batchid>N</pass_batchid>
<shared_objects_file/>
<entries>
<entry>
<name>START</name>
<description/>
<type>SPECIAL</type>
<start>Y</start>
<dummy>N</dummy>
<repeat>N</repeat>
<schedulerType>0</schedulerType>
<intervalSeconds>0</intervalSeconds>
<intervalMinutes>60</intervalMinutes>
<hour>12</hour>
<minutes>0</minutes>
<weekDay>1</weekDay>
<DayOfMonth>1</DayOfMonth>
<parallel>N</parallel>
<draw>Y</draw>
<nr>0</nr>
<xloc>120</xloc>
<yloc>110</yloc>
</entry>
<entry>
<name>Parse Repositories</name>
<description/>
<type>TRANS</type>
<specification_method>filename</specification_method>
<trans_object_id/>
<filename>${Internal.Job.Filename.Directory}/parseRepositories.ktr</filename>
<transname/>
<arg_from_previous>N</arg_from_previous>
<params_from_previous>N</params_from_previous>
<exec_per_row>N</exec_per_row>
<clear_rows>N</clear_rows>
<clear_files>N</clear_files>
<set_logfile>N</set_logfile>
<logfile/>
<logext/>
<add_date>N</add_date>
<add_time>N</add_time>
<loglevel>Basic</loglevel>
<cluster>N</cluster>
<slave_server_name/>
<set_append_logfile>N</set_append_logfile>
<wait_until_finished>Y</wait_until_finished>
<follow_abort_remote>N</follow_abort_remote>
<create_parent_folder>N</create_parent_folder>
<logging_remote_work>N</logging_remote_work>
<parameters> <pass_all_parameters>Y</pass_all_parameters>
</parameters> <parallel>N</parallel>
<draw>Y</draw>
<nr>0</nr>
<xloc>520</xloc>
<yloc>110</yloc>
</entry>
<entry>
<name>Success</name>
<description/>
<type>SUCCESS</type>
<parallel>N</parallel>
<draw>Y</draw>
<nr>0</nr>
<xloc>1410</xloc>
<yloc>110</yloc>
</entry>
<entry>
<name>Incorrect Parameters</name>
<description/>
<type>ABORT</type>
<message>At least one of the parameters was missing or incorrect.</message>
<parallel>N</parallel>
<draw>Y</draw>
<nr>0</nr>
<xloc>400</xloc>
<yloc>380</yloc>
</entry>
<entry>
<name>Export Source Repo Folder</name>
<description/>
<type>EXPORT_REPOSITORY</type>
<repositoryname>${SRCNAME}</repositoryname>
<username>${SRCUSER}</username>
<password>${SRCPASS}</password>
<targetfilename>${TMP_FOLDER}/export.xml</targetfilename>
<iffileexists>if_file_exists_overwrite</iffileexists>
<export_type>export_one_folder</export_type>
<directoryPath>${SRCFOLDER}</directoryPath>
<add_date>N</add_date>
<add_time>N</add_time>
<SpecifyFormat>N</SpecifyFormat>
<date_time_format/>
<createfolder>Y</createfolder>
<newfolder>N</newfolder>
<add_result_filesname>N</add_result_filesname>
<nr_errors_less_than>10</nr_errors_less_than>
<success_condition>success_if_no_errors</success_condition>
<parallel>N</parallel>
<draw>Y</draw>
<nr>0</nr>
<xloc>700</xloc>
<yloc>110</yloc>
</entry>
<entry>
<name>Linux</name>
<description/>
<type>SIMPLE_EVAL</type>
<valuetype>variable</valuetype>
<fieldname/>
<variablename>${OS}</variablename>
<fieldtype>string</fieldtype>
<mask/>
<comparevalue>Linux</comparevalue>
<minvalue/>
<maxvalue/>
<successcondition>contains</successcondition>
<successnumbercondition>equal</successnumbercondition>
<successbooleancondition>false</successbooleancondition>
<successwhenvarset>N</successwhenvarset>
<parallel>N</parallel>
<draw>Y</draw>
<nr>0</nr>
<xloc>850</xloc>
<yloc>110</yloc>
</entry>
<entry>
<name>Windows? Nah...</name>
<description/>
<type>SIMPLE_EVAL</type>
<valuetype>variable</valuetype>
<fieldname/>
<variablename>${OS}</variablename>
<fieldtype>string</fieldtype>
<mask/>
<comparevalue>Windows</comparevalue>
<minvalue/>
<maxvalue/>
<successcondition>contains</successcondition>
<successnumbercondition>equal</successnumbercondition>
<successbooleancondition>false</successbooleancondition>
<successwhenvarset>N</successwhenvarset>
<parallel>N</parallel>
<draw>Y</draw>
<nr>0</nr>
<xloc>850</xloc>
<yloc>220</yloc>
</entry>
<entry>
<name>Get yourself a Linux box!</name>
<description/>
<type>ABORT</type>
<message/>
<parallel>N</parallel>
<draw>Y</draw>
<nr>0</nr>
<xloc>850</xloc>
<yloc>380</yloc>
</entry>
<entry>
<name>Import Exported Repository</name>
<description/>
<type>SHELL</type>
<filename>${Internal.Job.Filename.Directory}/m2p.sh</filename>
<work_directory>${user.dir}</work_directory>
<arg_from_previous>N</arg_from_previous>
<exec_per_row>N</exec_per_row>
<set_logfile>N</set_logfile>
<logfile/>
<set_append_logfile>N</set_append_logfile>
<logext/>
<add_date>N</add_date>
<add_time>N</add_time>
<insertScript>N</insertScript>
<script/>
<loglevel>Basic</loglevel>
<argument0>${WORKING_DIR}</argument0>
<argument1>${TRGNAME}</argument1>
<argument2>${TRGUSER}</argument2>
<argument3>${TRGPASS}</argument3>
<argument4>${TRGFOLDER}</argument4>
<argument5>${TMP_FOLDER}</argument5>
<argument6>${COMMENT}</argument6>
<argument7>${RULES_FILE}</argument7>
<parallel>N</parallel>
<draw>Y</draw>
<nr>0</nr>
<xloc>1040</xloc>
<yloc>110</yloc>
</entry>
<entry>
<name>Parse Parameters</name>
<description/>
<type>TRANS</type>
<specification_method>filename</specification_method>
<trans_object_id/>
<filename>${Internal.Job.Filename.Directory}/parseParams.ktr</filename>
<transname/>
<arg_from_previous>N</arg_from_previous>
<params_from_previous>N</params_from_previous>
<exec_per_row>N</exec_per_row>
<clear_rows>N</clear_rows>
<clear_files>N</clear_files>
<set_logfile>N</set_logfile>
<logfile/>
<logext/>
<add_date>N</add_date>
<add_time>N</add_time>
<loglevel>Basic</loglevel>
<cluster>N</cluster>
<slave_server_name/>
<set_append_logfile>N</set_append_logfile>
<wait_until_finished>Y</wait_until_finished>
<follow_abort_remote>N</follow_abort_remote>
<create_parent_folder>N</create_parent_folder>
<logging_remote_work>N</logging_remote_work>
<parameters> <pass_all_parameters>Y</pass_all_parameters>
</parameters> <parallel>N</parallel>
<draw>Y</draw>
<nr>0</nr>
<xloc>300</xloc>
<yloc>110</yloc>
</entry>
<entry>
<name>Import Failed</name>
<description/>
<type>ABORT</type>
<message/>
<parallel>N</parallel>
<draw>Y</draw>
<nr>0</nr>
<xloc>1040</xloc>
<yloc>380</yloc>
</entry>
<entry>
<name>Cleanup: Delete TMP_FOLDER</name>
<description/>
<type>DELETE_FOLDERS</type>
<arg_from_previous>N</arg_from_previous>
<success_condition>success_if_no_errors</success_condition>
<limit_folders>10</limit_folders>
<fields>
<field>
<name>${TMP_FOLDER}</name>
</field>
</fields>
<parallel>N</parallel>
<draw>Y</draw>
<nr>0</nr>
<xloc>1270</xloc>
<yloc>110</yloc>
</entry>
</entries>
<hops>
<hop>
<from>Parse Repositories</from>
<to>Incorrect Parameters</to>
<from_nr>0</from_nr>
<to_nr>0</to_nr>
<enabled>Y</enabled>
<evaluation>N</evaluation>
<unconditional>N</unconditional>
</hop>
<hop>
<from>Parse Repositories</from>
<to>Export Source Repo Folder</to>
<from_nr>0</from_nr>
<to_nr>0</to_nr>
<enabled>Y</enabled>
<evaluation>Y</evaluation>
<unconditional>N</unconditional>
</hop>
<hop>
<from>Export Source Repo Folder</from>
<to>Linux</to>
<from_nr>0</from_nr>
<to_nr>0</to_nr>
<enabled>Y</enabled>
<evaluation>Y</evaluation>
<unconditional>N</unconditional>
</hop>
<hop>
<from>Linux</from>
<to>Windows? Nah...</to>
<from_nr>0</from_nr>
<to_nr>0</to_nr>
<enabled>Y</enabled>
<evaluation>N</evaluation>
<unconditional>N</unconditional>
</hop>
<hop>
<from>Windows? Nah...</from>
<to>Get yourself a Linux box!</to>
<from_nr>0</from_nr>
<to_nr>0</to_nr>
<enabled>Y</enabled>
<evaluation>N</evaluation>
<unconditional>N</unconditional>
</hop>
<hop>
<from>Linux</from>
<to>Import Exported Repository</to>
<from_nr>0</from_nr>
<to_nr>0</to_nr>
<enabled>Y</enabled>
<evaluation>Y</evaluation>
<unconditional>N</unconditional>
</hop>
<hop>
<from>START</from>
<to>Parse Parameters</to>
<from_nr>0</from_nr>
<to_nr>0</to_nr>
<enabled>Y</enabled>
<evaluation>Y</evaluation>
<unconditional>Y</unconditional>
</hop>
<hop>
<from>Parse Parameters</from>
<to>Parse Repositories</to>
<from_nr>0</from_nr>
<to_nr>0</to_nr>
<enabled>Y</enabled>
<evaluation>Y</evaluation>
<unconditional>N</unconditional>
</hop>
<hop>
<from>Import Exported Repository</from>
<to>Import Failed</to>
<from_nr>0</from_nr>
<to_nr>0</to_nr>
<enabled>Y</enabled>
<evaluation>N</evaluation>
<unconditional>N</unconditional>
</hop>
<hop>
<from>Import Exported Repository</from>
<to>Cleanup: Delete TMP_FOLDER</to>
<from_nr>0</from_nr>
<to_nr>0</to_nr>
<enabled>Y</enabled>
<evaluation>Y</evaluation>
<unconditional>N</unconditional>
</hop>
<hop>
<from>Cleanup: Delete TMP_FOLDER</from>
<to>Success</to>
<from_nr>0</from_nr>
<to_nr>0</to_nr>
<enabled>Y</enabled>
<evaluation>Y</evaluation>
<unconditional>N</unconditional>
</hop>
<hop>
<from>Parse Parameters</from>
<to>Incorrect Parameters</to>
<from_nr>0</from_nr>
<to_nr>0</to_nr>
<enabled>Y</enabled>
<evaluation>N</evaluation>
<unconditional>N</unconditional>
</hop>
</hops>
<notepads>
<notepad>
<note>#####
TODO:
#####
- improve m2p.sh 
- rules file as parameter
- handle coe
- handle multiple folders (limitdir?)
- comment 
- version 
- exclude folders</note>
<xloc>190</xloc>
<yloc>630</yloc>
<width>238</width>
<heigth>180</heigth>
<fontname>Ariel</fontname>
<fontsize>10</fontsize>
<fontbold>N</fontbold>
<fontitalic>N</fontitalic>
<fontcolorred>0</fontcolorred>
<fontcolorgreen>0</fontcolorgreen>
<fontcolorblue>0</fontcolorblue>
<backgroundcolorred>255</backgroundcolorred>
<backgroundcolorgreen>165</backgroundcolorgreen>
<backgroundcolorblue>0</backgroundcolorblue>
<bordercolorred>100</bordercolorred>
<bordercolorgreen>100</bordercolorgreen>
<bordercolorblue>100</bordercolorblue>
<drawshadow>Y</drawshadow>
</notepad>
</notepads>
</job>