account_account Normal / ID_BATCHYID_BATCHCHANNEL_IDYCHANNEL_IDTRANSNAMEYTRANSNAMESTATUSYSTATUSLINES_READYLINES_READLINES_WRITTENYLINES_WRITTENLINES_UPDATEDYLINES_UPDATEDLINES_INPUTYLINES_INPUTLINES_OUTPUTYLINES_OUTPUTLINES_REJECTEDYLINES_REJECTEDERRORSYERRORSSTARTDATEYSTARTDATEENDDATEYENDDATELOGDATEYLOGDATEDEPDATEYDEPDATEREPLAYDATEYREPLAYDATELOG_FIELDYLOG_FIELD
ID_BATCHYID_BATCHSEQ_NRYSEQ_NRLOGDATEYLOGDATETRANSNAMEYTRANSNAMESTEPNAMEYSTEPNAMESTEP_COPYYSTEP_COPYLINES_READYLINES_READLINES_WRITTENYLINES_WRITTENLINES_UPDATEDYLINES_UPDATEDLINES_INPUTYLINES_INPUTLINES_OUTPUTYLINES_OUTPUTLINES_REJECTEDYLINES_REJECTEDERRORSYERRORSINPUT_BUFFER_ROWSYINPUT_BUFFER_ROWSOUTPUT_BUFFER_ROWSYOUTPUT_BUFFER_ROWS
ID_BATCHYID_BATCHCHANNEL_IDYCHANNEL_IDLOG_DATEYLOG_DATELOGGING_OBJECT_TYPEYLOGGING_OBJECT_TYPEOBJECT_NAMEYOBJECT_NAMEOBJECT_COPYYOBJECT_COPYREPOSITORY_DIRECTORYYREPOSITORY_DIRECTORYFILENAMEYFILENAMEOBJECT_IDYOBJECT_IDOBJECT_REVISIONYOBJECT_REVISIONPARENT_CHANNEL_IDYPARENT_CHANNEL_IDROOT_CHANNEL_IDYROOT_CHANNEL_ID
ID_BATCHYID_BATCHCHANNEL_IDYCHANNEL_IDLOG_DATEYLOG_DATETRANSNAMEYTRANSNAMESTEPNAMEYSTEPNAMESTEP_COPYYSTEP_COPYLINES_READYLINES_READLINES_WRITTENYLINES_WRITTENLINES_UPDATEDYLINES_UPDATEDLINES_INPUTYLINES_INPUTLINES_OUTPUTYLINES_OUTPUTLINES_REJECTEDYLINES_REJECTEDERRORSYERRORSLOG_FIELDNLOG_FIELD
0.0 0.0 10000 50 50 N Y 50000 Y N 1000 100 - 2012/12/22 11:21:53.267 - 2012/12/22 11:21:53.267 TODO: map user_type => type 250 392 191 26 Arial 10 N N 0 0 0 255 165 0 100 100 100 Y source ${source_host} POSTGRESQL Native ${source} ${source_port} ${source_user} ${source_password} FORCE_IDENTIFIERS_TO_LOWERCASEN FORCE_IDENTIFIERS_TO_UPPERCASEN IS_CLUSTEREDN PORT_NUMBER${source_port} QUOTE_ALL_FIELDSN SUPPORTS_BOOLEAN_DATA_TYPEN USE_POOLINGN target ${target_host} POSTGRESQL Native ${target} ${target_port} ${target_user} ${target_password} FORCE_IDENTIFIERS_TO_LOWERCASEN FORCE_IDENTIFIERS_TO_UPPERCASEN IS_CLUSTEREDN PORT_NUMBER${target_port} QUOTE_ALL_FIELDSN SUPPORTS_BOOLEAN_DATA_TYPEY USE_POOLINGN Table inputsourceN create_uidwrite_uidY write_uidtarget_accountY account_idwaitY sourcerename_idY account_idprep2Y prepunionY prep2unionY unionmappingY targetSelect values 2N Tax Mapcreate_uidY target_accountexistY existaccount_idY existcopyY copyprepY copyUpdate fieldsY Select values 2Table outputN Database join 3Set field valueY Filter rows 2Database join 3Y Filter rows 2Value MapperY Select values 4Select values 3Y Set field valueSelect values 4Y Select values 3 2Select values 3Y parentparent_4Y parent_1get_parentY parent_2parent_1Y parent_3parent_2Y parent_4parent_3Y waitparentY get_parentget_parent 2Y rename_idjoinY joinTax MapY get digitsjoinY Database lookupAdd constants 2Y Add constants 2Filter rows 2Y Select values 3Unique rowsY Unique rowstargetY Add constantsSelect values 3 2Y prep 2Add constantsY copyUnique rows 2Y Unique rows 2Add constants 3Y Add constants 3default_typeY Value MapperStream lookupY Stream lookupprep 2Y default_typeStream lookupY get_parent 2siblingY siblingDatabase lookupY Unique rowsDummy (do nothing)Y Dummy (do nothing)code lookupY code lookupStream lookup 2Y Stream lookup 2Update mappingY mappingStream lookup 2Y Stream lookup 2duplicated_outputY Add constants Constant Y 1 none deferral Boolean True -1 -1 1284 171 Y Add constants 2 Constant Y 1 none left Integer 0 -1 -1 right Integer 0 -1 -1 938 266 Y Add constants 3 Constant Y 1 none type_name String Migration Type -1 -1 type_display_balance String debit-credit -1 -1 income_statement Boolean False -1 -1 908 12 Y Database join 3 DBJoin Y 1 none target 0 SELECT kind, type AS sibling_type, reconcile AS sibling_reconcile, deferral FROM account_account WHERE id = ? N N sibling_id - 1129 265 Y Database lookup DBLookup Y 1 none target N N 0 public
account_account
N N sibling_code code = id sibling_id Integer 839 264 Y Dummy (do nothing) Dummy Y 1 none 1292 359 Y Filter rows 2 FilterRows Y 1 none Database join 3 Value Mapper N sibling_id IS NOT NULL 1027 266 Y Select values 2 SelectValues Y 1 none left left -2 -2 right right -2 -2 create_uid create_uid -2 -2 create_date create_date -2 -2 write_date write_date -2 -2 write_uid write_uid -2 -2 code code -2 -2 reconcile reconcile -2 -2 currency_id second_currency -2 -2 kind kind -2 -2 active active -2 -2 name name -2 -2 company company -2 -2 note note -2 -2 parent_id parent -2 -2 type type -2 -2 id id -2 -2 N 1404 498 Y Select values 3 SelectValues Y 1 none N create_uid write_uid account_id id Integer -2 -2 false create_uid_target create_uid Integer -2 -2 false write_uid_target write_uid Integer -2 -2 false company_id company Integer -2 -2 false parent_id parent Integer -2 -2 false target_type type Integer -2 -2 false 1405 265 Y Select values 3 2 SelectValues Y 1 none N sibling_code sibling_id type default_account_type 1403 171 Y Select values 4 SelectValues Y 1 none N sibling_code sibling_id sibling_reconcile type sibling_type target_type Integer -2 -2 false 1307 265 Y Set field value SetValueField Y 1 none reconcile sibling_reconcile 1218 265 Y Stream lookup StreamLookup Y 1 none default_type N Y N N company_id company_id default_account_type default_account_type Integer 1108 170 Y Stream lookup 2 StreamLookup N 1 none mapping N Y N N openerp_id source target new_target Integer 1039 359 Y Table input TableInput Y 1 none source SELECT * FROM account_account where code in ('4720000221', '4720000321','4770000121'); 0 N N N 29 265 Y Table output TableOutput Y 1 none target account_account
1000 N N N N N N Y N Y N 1404 580 Y
Tax Map ScriptValueMod Y 1 none N 9 0 Script 1 //Script here var code = source_code; if (source_code.length > 4) { var start = substr(source_code,0,4); if (start == '4720' || start == '4721' || start == '4770' || start == '4771' || start == '4730' || start == '4751'){ var digit = substr(source_code,4,2); if(digit!='00') code = rpad(substr(source_code,0,4),'0', source_code.length-3) + digit; } } code code String -1 -1 N 277 264 Y Unique rows UniqueRowsByHashSet Y 1 none N Y company code 1407 345 Y Unique rows 2 UniqueRowsByHashSet Y 1 none N N company_id 776 15 Y Update fields Update Y 1 none target N 100 N N public account_account
target_account_id id = reconcile reconcile
385 99 Y
Update mapping Update Y 1 none target N 100 N N migration account_account_mapping
openerp_id source = target new_target
865 359 Y
Value Mapper ValueMapper Y 1 none type kind other payable payable other other view view receivable receivable 1022 170 Y account_id Sequence N 1 none account_id Y target account_account_id_seq N 1 1 999999999 610 265 Y code lookup DBLookup Y 4 none source N N 0 account_account
N Y source_code code = openerp_id id <> id new_source_id Integer
1177 359 Y
copy Dummy N 1 none 486 100 Y create_uid DBLookup Y 4 none target Y Y 0 migration user_mapping
N N create_uid source = target create_uid_target Integer
338 266 Y
default_type TableOutput Y 1 none target account_account_type
1000 N N N Y N N Y N Y Y default_account_type income_statement income_statement display_balance type_display_balance name type_name company company_id 1098 14 Y
exist FilterRows Y 1 none copy account_id N target_account_id IS NOT NULL 543 264 Y get digits TableInput Y 1 none source select max(length(code)) as code_digits from account_account; 0100 N N N 225 176 Y get_parent ScriptValueMod Y 1 none N 9 0 Script 1 var parent_id = parent_id4 || parent_id3 || parent_id2 || parent_id1; var parent_type = parent_type4 || parent_type3 || parent_type2 || parent_type1; parent_id parent_id Integer -1 -1 N parent_type parent_type Integer -1 -1 N 779 457 Y get_parent 2 ScriptValueMod Y 1 none N 9 0 Script 1 if (target_parent_id4) { var parent_id = target_parent_id4; } parent_id parent_id Integer -1 -1 Y 779 377 Y join JoinRows Y 1 none %%java.io.tmpdir%% out 500
get digits
N code_digits = code_digits 226 264 Y
mapping TableOutput Y 1 none target migration account_account_mapping
1000 N N N N N N Y N Y N target_id 754 98 Y
parent ScriptValueMod Y 1 none N 9 0 Script 1 //Script here pare4=trim(rpad(substr(code,0,code.length-3),"0",code_digits-2)); pare3=trim(substr(code,0,4)) pare2=trim(substr(code,0,3)) pare1=trim(substr(code,0,2)) -1 substr_Sample // Perform the substring function // // Usage: // substr(var, from); // substr(var, from, to); // // 2007-01-25 // var str1= "Hello Pentaho!"; var str2= substr(str1, 6); var str3= substr(str1, 6, 7); Alert("Input : " + str1); Alert("From position 6: " + str2); Alert("From position 6 for 7 long : " + str3); pare4 pare4 String -1 -1 N pare3 pare3 String -1 -1 N pare2 pare2 String -1 -1 N pare1 pare1 String -1 -1 N 624 380 Y parent_1 DBLookup Y 4 none target Y N 0 public account_account
N N pare1 code = company_id company = id parent_id1 Integer type parent_type1 Integer
779 535 Y
parent_2 DBLookup Y 4 none target Y N 0 public account_account
N N pare2 code = company_id company = id parent_id2 Integer type parent_type2 Integer
697 535 Y
parent_3 DBLookup Y 4 none target Y N 0 public account_account
N N pare3 code = company_id company = id parent_id3 Integer type parent_type3 Integer
624 535 Y
parent_4 DBLookup Y 4 none target Y N 0 public account_account
N N pare4 code = company_id company = id parent_id4 Integer parent target_parent_id4 Integer type parent_type4 Integer
624 460 Y
prep SelectValues Y 1 none openerp_id source -2 -2 target_account_id target -2 -2 N 571 99 Y prep 2 ScriptValueMod Y 1 none N 9 0 Script 1 //Script here var target_type = parent_type != null ? parent_type : default_account_type; target_type target_type Integer -1 -1 N 1182 169 Y prep2 SelectValues Y 1 none openerp_id source -2 -2 account_id target -2 -2 N 645 178 Y rename_id SelectValues Y 1 none N id openerp_id Integer -2 -2 false code source_code String -2 -2 false 169 265 Y sibling ScriptValueMod Y 1 none N 9 0 Script 1 //Script here var sibling_code = trim(rpad(substr(code,0,3),"0",code_digits)); sibling_code sibling_code String -1 -1 N 763 264 Y source Dummy Y 1 none 100 265 Y target Dummy N 1 none 1404 418 Y target_account DBLookup Y 4 none target N Y 0 account_account
N N code code = id target_account_id Integer
471 265 Y
union Dummy Y 1 none 642 98 Y wait BlockUntilStepsFinish Y 1 none mapping 0 688 265 Y write_uid DBLookup Y 4 none target Y Y 0 migration user_mapping
N N write_uid source = target write_uid_target Integer
397 265 Y
duplicated_output TextFileOutput Y 1 none ; " N N
Y
N
DOS None N Y /tmp/duplicated_accounts.csv N N N txt N N N N N N Y N N 0 openerp_id Integer none 9 0 new_target Integer none 9 0 source_code String none 64 -1 code String none -1 -1 954 410 Y
Unique rows Dummy (do nothing) Y N