how to skip first 4 records
Moderators: chulett, rschirm, roy
how to skip first 4 records
Hi,
I want to skip four records. I tried with @INROWNUM and I gave columm name for @INROWNUM as linenum. I got numbers 1 to 24 . I want to take record from linenum 5 so in transformer constraint I gave linenum>=5 but Iam getting only 5 records i.e linenum 5 to 9 but I want records from 5 to the end i.e 24 in this condition . How to achieve his ,plz help me.
Thanks,
Somaraju.
I want to skip four records. I tried with @INROWNUM and I gave columm name for @INROWNUM as linenum. I got numbers 1 to 24 . I want to take record from linenum 5 so in transformer constraint I gave linenum>=5 but Iam getting only 5 records i.e linenum 5 to 9 but I want records from 5 to the end i.e 24 in this condition . How to achieve his ,plz help me.
Thanks,
Somaraju.
somaraju
Somu
What is your source?. Are you executing your job in parallel mode or sequential mode?
Easiest way is to change your job to run in sequential mode and have the constraint as @INROWNUM >=5
Thanks
What is your source?. Are you executing your job in parallel mode or sequential mode?
Easiest way is to change your job to run in sequential mode and have the constraint as @INROWNUM >=5
Thanks
Regards
Siva
Listening to the Learned
"The most precious wealth is the wealth acquired by the ear Indeed, of all wealth that wealth is the crown." - Thirukural By Thiruvalluvar
Siva
Listening to the Learned
"The most precious wealth is the wealth acquired by the ear Indeed, of all wealth that wealth is the crown." - Thirukural By Thiruvalluvar
Craig
I don't think that there is an option to skip first N rows in PX Sequential Stage. I do remember that there is an option to Read First N Rows in PX Sequential stage...
I don't think that there is an option to skip first N rows in PX Sequential Stage. I do remember that there is an option to Read First N Rows in PX Sequential stage...
Regards
Siva
Listening to the Learned
"The most precious wealth is the wealth acquired by the ear Indeed, of all wealth that wealth is the crown." - Thirukural By Thiruvalluvar
Siva
Listening to the Learned
"The most precious wealth is the wealth acquired by the ear Indeed, of all wealth that wealth is the crown." - Thirukural By Thiruvalluvar
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
There's a Skip option in View Data but not, I believe, in the Sequential File stage.
Do you want to skip four records per partition, or four records in total? Is your source a text file or a database table or some other source?
Do you want to skip four records per partition, or four records in total? Is your source a text file or a database table or some other source?
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Guys
Had a quick look in the Parallel Developer Guide Manual and found that not all options for Sequential stage is described inside the manual. It seems that we need to browse the real object to see all the options available for a stage.
Had a quick look in the Parallel Developer Guide Manual and found that not all options for Sequential stage is described inside the manual. It seems that we need to browse the real object to see all the options available for a stage.
Regards
Siva
Listening to the Learned
"The most precious wealth is the wealth acquired by the ear Indeed, of all wealth that wealth is the crown." - Thirukural By Thiruvalluvar
Siva
Listening to the Learned
"The most precious wealth is the wealth acquired by the ear Indeed, of all wealth that wealth is the crown." - Thirukural By Thiruvalluvar
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
-
- Charter Member
- Posts: 34
- Joined: Tue May 31, 2005 8:17 pm
- Location: ShangHai,China
Hi somu_june,
It seems datastage can't skip first N rows.But we can read all rows firstly,then filter by Filter Stage.
You may choose Row Number Column in Sequential File Stage's Properties page.Name a value,such as RowNum.Add a column with same name in Columns page. SQL type:Integer .Then we can get real row num.Pay attention,this value will start with 0.
Now you can filter first 4 rows in Filter Stage.Just type RowNum > 4 when output.
By the way,System variable @INROWNUM can't indicate the real row number of file when DSEE has more than 1 partition.It just shows row num in every partition.Good luck!
It seems datastage can't skip first N rows.But we can read all rows firstly,then filter by Filter Stage.
You may choose Row Number Column in Sequential File Stage's Properties page.Name a value,such as RowNum.Add a column with same name in Columns page. SQL type:Integer .Then we can get real row num.Pay attention,this value will start with 0.
Now you can filter first 4 rows in Filter Stage.Just type RowNum > 4 when output.
By the way,System variable @INROWNUM can't indicate the real row number of file when DSEE has more than 1 partition.It just shows row num in every partition.Good luck!
May be possible if dont really want to stick with Sequential stage. And the provide the input file is Sequential Flat file.
You can use Head stage. Where you have option to 'Skip n rows per partiton. Also that you have option to read N rows.
Also make sure the partion is made to single. Either by Forcing in sequential mode or by including a APT_CONFIG_FILE paramter with one node.
You can use Head stage. Where you have option to 'Skip n rows per partiton. Also that you have option to read N rows.
Also make sure the partion is made to single. Either by Forcing in sequential mode or by including a APT_CONFIG_FILE paramter with one node.
Impossible doesn't mean 'it is not possible' actually means... 'NOBODY HAS DONE IT SO FAR'
-
- Participant
- Posts: 1
- Joined: Wed Sep 04, 2013 10:06 am
Did anyone ever figure this out?
Hello Somaraju and others,
I know this is old but was this issue ever solved? I have the same problem.
Thank you.
I know this is old but was this issue ever solved? I have the same problem.
Thank you.
Devin L
-
- Premium Member
- Posts: 536
- Joined: Thu Oct 11, 2007 1:48 am
- Location: Bangalore
There could be possibly workaroud, if your source is sequential file then you can generate sequence nunumber and then in transformer constraint give condition like seqno> 4
Thanks
Prasoon
ETL Consultant
LinkedIn :- http://www.linkedin.com/profile/view?id ... ab_pro_top
Blog:- http://dsshar.blogspot.com/
Prasoon
ETL Consultant
LinkedIn :- http://www.linkedin.com/profile/view?id ... ab_pro_top
Blog:- http://dsshar.blogspot.com/