Post a reply

Write your message and submit

Options

Click in the dark area of the image to send your post.

Go back

Topic review (newest first)

pedro
2012-05-10 11:41:37

Hi Bruno

I think you might forgot to add context variable 'id' and 'seq' in your job.

Regards,
Pedro

ironman34
2012-05-10 11:38:34

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

pedro
2012-05-08 05:42:15

Hi Bruno

I create a new job which suits your requirement.

Code:

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

ironman34
2012-05-07 15:35:59

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

ironman34
2012-05-04 07:05:41

Hi,
thanks for your answer. I try this today.

Regards
Bruno

pedro
2012-05-03 11:55:16

Hi

Welcome to Talend Community!

You might create a job as the following image.

Regards,
Pedro

ironman34
2012-05-03 11:10:51

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

Board footer

Powered by FluxBB