hi, i have input data as acctid acctno status ----------------------- 1 IS1234 A 2 IS1234 A 3 BS1234 A 4 BS1234 A 5 IS129 A I want data as acctid acctno status ----------------------- 1 IS1234 A 2 IS1234 A 3 BS1234 A 4 BS1234 A 5 IS129 A new empty row created after new account no exists. so, to differentiate between account nos, we need to insert a new empty row. how to do this? pls reply.
Hi Here is a screnario which may help you. Use tLoop to iterate each row of input file and insert into target file. The aim of tJavaRow is to compare current acctno column with previous row. If they are different, set context.flag as true and trigger run-if to insert an empty row. The following job is just an example. You'd better change it to fit your requirment. Regards, Pedro
Hi You can use tOracleOutput instead of tFileDelimited. But i want to say your requirment is a little special. Oracle is relational database. Inserting an empty row into Oracle is abnormal. Why do you want that? Regards, Pedro
tmap--->toracleoutput on sub jobok toracleinput--->tfileoutputdelimit in output file i want to insert empty rows . but in example, you implement with tfileinputdelimit, tloop. here how to implement them? I want to read data from toracleinput and insert empty rows into tfileoutputdelimit. how to read one row at a time from toracleinput how we can give the "to" value for tloop component with out hardcoding? I mean i have to give number of rows of toracleinput.
Hello, Where and how are you defining the second images context.flag and context.line? I am new with Talend, I am trying to replay this example but I can't find where to define it. thks for your response valery