partial output from sequential file
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 23
- Joined: Fri Oct 22, 2010 7:08 am
partial output from sequential file
Hi,
My job is having ODBC stage--->t/f-->sequential file stage.
I am not able to get properdata to the output.
I have used stage variables in the transformer and built logic according to the requirements.I am getting the proper output but for half of the rows only remaining half are blank.
I was getting warning like "When checking operator: A sequential operator cannot preserve the partitioning
of the parallel data set on input port 0."
I made the flag to clear in the previous stage.Still i am not able to get the proper data.but now it is not giving warning.
I have prepared test data with 4 records and ran the job 2 records are comming with proper out put according to the logic and remaining two re not.Please suggest me what to do ....
it urgent
My job is having ODBC stage--->t/f-->sequential file stage.
I am not able to get properdata to the output.
I have used stage variables in the transformer and built logic according to the requirements.I am getting the proper output but for half of the rows only remaining half are blank.
I was getting warning like "When checking operator: A sequential operator cannot preserve the partitioning
of the parallel data set on input port 0."
I made the flag to clear in the previous stage.Still i am not able to get the proper data.but now it is not giving warning.
I have prepared test data with 4 records and ran the job 2 records are comming with proper out put according to the logic and remaining two re not.Please suggest me what to do ....
it urgent
Thanks & Regards,
Bhanu
Bhanu
Re: partial output from sequential file
No, it's not.bhanuvlakshmi wrote:it urgent
Suggest you fully explain your requirements and the logic you built. Right now we have nothing to work with other than basically "it doesn't work".
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
-
- Participant
- Posts: 23
- Joined: Fri Oct 22, 2010 7:08 am
Re: partial output from sequential file
My requirement is to seperate the word in to 2 parts if it contains '-' based on this first part should contain the part before '-' and second should contain after the '-'. for that i used the following in t/f stage
I have taken the stage variables:
StageVar : Index(Word1,'-',1)
StageVar1 : Index(to_processing.pri_emp_add1,' ',1)
word1 : to_processing.pri_emp_add1[1, StageVar1-1]
firstpart : Word1[1, StageVar-1]
to get the first part of the word if the word is seperated be '-'
my i/p is SAME-AS -HOME 123 for the column to_processing.pri_emp_add1 which i took the same for all 4 records.
i/p is :
SAME-AS -HOME 123
SAME-AS -HOME 123
SAME-AS -HOME 123
SAME-AS -HOME 123
and o/p is
---- for first row
SAME
---- for 3rd row
SAME
when i converted the execution in sequential mode in t/f i am getting o/p as
--- for first row
SAME
SAME
SAME
for 3 records.
Please give me suggession based on production data which will be in lakhs.
I have taken the stage variables:
StageVar : Index(Word1,'-',1)
StageVar1 : Index(to_processing.pri_emp_add1,' ',1)
word1 : to_processing.pri_emp_add1[1, StageVar1-1]
firstpart : Word1[1, StageVar-1]
to get the first part of the word if the word is seperated be '-'
my i/p is SAME-AS -HOME 123 for the column to_processing.pri_emp_add1 which i took the same for all 4 records.
i/p is :
SAME-AS -HOME 123
SAME-AS -HOME 123
SAME-AS -HOME 123
SAME-AS -HOME 123
and o/p is
---- for first row
SAME
---- for 3rd row
SAME
when i converted the execution in sequential mode in t/f i am getting o/p as
--- for first row
SAME
SAME
SAME
for 3 records.
Please give me suggession based on production data which will be in lakhs.
Thanks & Regards,
Bhanu
Bhanu
-
- Participant
- Posts: 23
- Joined: Fri Oct 22, 2010 7:08 am
Re: partial output from sequential file
Now when changed the execution mode to sequential in transformer i am getting the o/p for all records except for the first record, still a blank space iam getting for that
Could any body please help me in solving this......
Thanks in advance for your help.
Could any body please help me in solving this......
Thanks in advance for your help.
Thanks & Regards,
Bhanu
Bhanu
Re: partial output from sequential file
word1 : if StageVar1=0 Then to_processing.pri_emp_add1 Else to_processing.pri_emp_add1[1, StageVar1-1]
firstpart : if StageVar=0 then Word1 else Word1[1, StageVar-1]
-Paul
firstpart : if StageVar=0 then Word1 else Word1[1, StageVar-1]
-Paul
-
- Participant
- Posts: 23
- Joined: Fri Oct 22, 2010 7:08 am
Re: partial output from sequential file
Thank you Paul for correcting my logic but still i am facing the same problem my first record is giving as
SAME-AS
and remaining all are giving as this
SAME
SAME
SAME
SAME
Please note : (execution mode is sequential in T/F stage)
SAME-AS
and remaining all are giving as this
SAME
SAME
SAME
SAME
Please note : (execution mode is sequential in T/F stage)
Thanks & Regards,
Bhanu
Bhanu
Re: partial output from sequential file
Can you brief the logic only with example?
-
- Participant
- Posts: 23
- Joined: Fri Oct 22, 2010 7:08 am
Re: partial output from sequential file
Hi
IF the input column contains two words i have to take first word in to one variable and second in to another and again in the first word i have to check for the hyphen(-) and if it is there i have to take the part before the (-) in one variable and part after the (-) in another variable. thats what iam trying to do
eg:
i/p: SAME-AS HOME
o/p:
so my first word is SAME-AS
second word is HOME
and again in first word based on (-) if i partition
first part :SAME
second part: AS
i got the logic and it is working fine.but only for the first record that is giving as "SAME-AS" for both for first part and second part.
and remaining all records are comming as first part as "SAME "and second part as "AS"(as required).
for all the records the i/p is same.
Could you please help me why i am not getting the desired o/p for the first record.
IF the input column contains two words i have to take first word in to one variable and second in to another and again in the first word i have to check for the hyphen(-) and if it is there i have to take the part before the (-) in one variable and part after the (-) in another variable. thats what iam trying to do
eg:
i/p: SAME-AS HOME
o/p:
so my first word is SAME-AS
second word is HOME
and again in first word based on (-) if i partition
first part :SAME
second part: AS
i got the logic and it is working fine.but only for the first record that is giving as "SAME-AS" for both for first part and second part.
and remaining all records are comming as first part as "SAME "and second part as "AS"(as required).
for all the records the i/p is same.
Could you please help me why i am not getting the desired o/p for the first record.
Thanks & Regards,
Bhanu
Bhanu
-
- Participant
- Posts: 342
- Joined: Tue Nov 04, 2008 10:38 am
- Location: Chennai, India
Re: partial output from sequential file
Means it doesn't recognise the hyphen check the data ,is it a hyphen or underscorebhanuvlakshmi wrote:Hi
IF the input column contains two words i have to take first word in to one variable and second in to another and again in the first word i have to check for the hyphen(-) and if it is there i have to take the part before the (-) in one variable and part after the (-) in another variable. thats what iam trying to do
eg:
i/p: SAME-AS HOME
o/p:
so my first word is SAME-AS
second word is HOME
and again in first word based on (-) if i partition
first part :SAME
second part: AS
i got the logic and it is working fine.but only for the first record that is giving as "SAME-AS" for both for first part and second part.
and remaining all records are comming as first part as "SAME "and second part as "AS"(as required).
for all the records the i/p is same.
Could you please help me why i am not getting the desired o/p for the first record.
-
- Participant
- Posts: 23
- Joined: Fri Oct 22, 2010 7:08 am
-
- Participant
- Posts: 23
- Joined: Fri Oct 22, 2010 7:08 am
Re: partial output from sequential file
Instead of using StageVar : Index(Word1,'-',1) can you try with this
StageVar : Index(to_processing.pri_emp_add1,'-',1)
using the above one solved my issue.
Thank you for your help PAUL:)
StageVar : Index(to_processing.pri_emp_add1,'-',1)
using the above one solved my issue.
Thank you for your help PAUL:)
Thanks & Regards,
Bhanu
Bhanu