You are not logged in.
Announcement
Unanswered posts
|
Pages: 1
Hi All,
i'm trying to load a csv file to Salesforce,
i need to reorganize my data before uploading,
the schema of the input file is like,
Status code, Object Id, Type
1 oo1 S
1 oo1 S
10 oo1
10 oo1
50 oo1
50 oo1
15 oo1
My output should be like,
objectID, No of 10's, No of 50's, No of 'S' in type,no of 15's
oo1,2,2,2,1
how do i do this. My idea is like, to split this file into 4 different files based on the status code, use tAggregate to count the status code for each object ID and use tUnite to finally produce the required format. Can anyone tell me what should be the correct approach to do this, i'm pretty new to talend and hence am not familiar with other components that might help me do this.
Will be helpful if someone can suggest some ideas.
Thanks
Offline

Hi
I think an easy way is to create a job as seen below.
tFileInputDelimited --main --> tJavaRow
|
OnsubjobOK
|
tFixedFlowInput --main-- > output component
In tJavaRow, you might use some context variables to save the occurrence times of certain value.
For examaple,
if(input_row.Status==10)
context.No10++;
else if(input_row.Status==50)
context.No50++;
Then in the second subjob, fill all these context variables in tFixedFlowInput.
Regards,
Pedro
Offline
Pages: 1