You are not logged in.
Announcement
Unanswered posts
|
Hi Bruno
I think you might forgot to add context variable 'id' and 'seq' in your job.
Regards,
Pedro
Hi,
I try this solution but I still have some errors in the Java stage i think....
Error in the component's properties:
id can not be resolved or is not a field
seq can not be resolved or is not a field
seq can not be resolved or is not a field
seq can not be resolved or is not a field
id can not be resolved or is not a field"
With the capture attached.
Thanks,
Regards,
Bruno
Hi Bruno
I create a new job which suits your requirement.
if(context.id.equals(input_row.id)){
output_row.id = input_row.id;
output_row.newColumn1 = Numeric.sequence(context.seq,1,1);
output_row.newColumn = input_row.newColumn;
}
else{
context.seq+="1";
output_row.id = input_row.id;
output_row.newColumn1 = Numeric.sequence(context.seq,1,1);
output_row.newColumn = input_row.newColumn;
}
context.id = input_row.id;Regards,
Pedro
Hi,
After tests, this is not the right method.
In the delimited file, the second column( "PECU", "SOL"...) is dynamic and i can have 30 rows for an ID (ID is the first column :9031 or 9800) and only 6 for another. It couldn't be the same...
Exemple :
9031;PECU;152.56
9031;SOLE;896.45
9031;PENS;7896.45
9800;TOTA;89.25
9800;PECU;111.69
In the Tmap it should dynamic but I don't know how?
Thanks for the answer,
Regards,
Bruno
Hi,
thanks for your answer. I try this today.
Regards
Bruno
Hi
Welcome to Talend Community!
You might create a job as the following image.
Regards,
Pedro
Hello,
I have to transform a delimited file like this :
9031;PECU;152.56
9031;SOLE;896.45
9031;PENS;7896.45
9800;PECU;89.25
9800;SOLE;111.69
9800;PENS;1212.59
Into this file type :
9031;PECU;152.56;SOLE;896.45;PENS;7896.45
9800;PECU;89.25;SOLE;111.69;PENS;1212.59
Has anyone an idea because I'm lost!!!
Thank you in advance