Hi All,
I am reading two files in CFF stage. After that, generating sequence number using transformer stage with nextsurrogatekey() function. And I need to create two files.
Input data:
A000000000000000000
B000000000000000000
B000000000000000000
B000000000000000000
A000000000000000000
B000000000000000000
A000000000000000000
B000000000000000000
Output data:
File_1:
Seq_number should be :
1
2
3
File_2:
Seq_number:
1
1
1
2
3
I have read the data sequentially in transformer stage. But in 4node, I am not getting the proper result.Do i need to change my logic or is there any other problem??
Thanks in advance.
surrogate key
Moderators: chulett, rschirm, roy
Hi Chulett,
Thanks for ur reply.
I need to create two output files as mentioned. File_1 is correct that is the output value is 1,2,3. But the file_2 is like 0,2,3,1,0. But for the single node or 2node, the output is perfect. I am doing any partitioning inside my job. I am reading the data sequentially in transformer. While running, I am using 4node config(environmental variable : APT_Config_file)
Thanks for ur reply.
I need to create two output files as mentioned. File_1 is correct that is the output value is 1,2,3. But the file_2 is like 0,2,3,1,0. But for the single node or 2node, the output is perfect. I am doing any partitioning inside my job. I am reading the data sequentially in transformer. While running, I am using 4node config(environmental variable : APT_Config_file)
Does your job contain stages running in parallel mode after the transformer? If so, DataStage partitioning the data,most likely with RoundRobin paritioning. If you do nothing to control the order the records are written to the output, the order is at the mercy of when a block of records arrives at the output writer.
You can run the entire job in sequential mode or sort and collect the records in the order you desire before they are written to the output files.
Regards,
You can run the entire job in sequential mode or sort and collect the records in the order you desire before they are written to the output files.
Regards,
- james wiles
All generalizations are false, including this one - Mark Twain.
All generalizations are false, including this one - Mark Twain.
Thanks to all..The problem is resolved now. Actually the problem is with my input files. I have read two files, so DS is reading the file in parallel mode eventhough in transformer the execution mode is sequential. I am not sure about the problem. But now I have concatenated the input files and read through CFF stage. Now the sequence number generation is working fine.