Page 1 of 1

Sybase Stage error

Posted: Tue Aug 14, 2007 9:12 am
by scorpion
Hi All,

I am using Sybase database table as my Source table and i have a user defined query in my source sybase stage.
When i fire the query to dabase i am getting like 20,000 records .but in my datastage i am getting 10000 records.

Can any one have any idea on this.

the query which i fire on my database is as same as which is my userdefined sql qry in my source sybase stage.

Help will be appreciated.

Posted: Tue Aug 14, 2007 3:23 pm
by ArndW
Are you stating that if you take the same query and put it into your PX sybase stage and write that to a sequential file with no other stages in the job, you get only half as many rows?

Posted: Tue Aug 14, 2007 6:49 pm
by ray.wurlod
Are you perhaps using a two-node configuration file, and looking at the row count on one node and not the other?

Posted: Wed Aug 15, 2007 6:36 am
by scorpion
No Ray,

when i tried to see the process of records by clicking'show performance statstics' it is displaying records as 10000.
and i am getting in my target file also as 10000 records only.

my job is like:

sybasestage----->transformer---->dataset

sybase stage transferring only 10000records instead of 20000records.

Posted: Wed Aug 15, 2007 3:18 pm
by ArndW
Insert two dummy records into your Sybase table and re-run the job. Do you get 10,000, 10,001 or 10,002 records now?

Posted: Thu Aug 16, 2007 5:50 am
by scorpion
Hi,

I am still facing same issue...?

SELECT * FROM xxx
WHERE LST_UPDT_DTTM<= "#To_Date_Parm#" AND LST_UPDT_DTTM>"#From_Date_Parm#"

and the values of To_Date and From_Date parameters i am passing same values which are in my parameterfile when i run qry in database.

when i run database it is giving correct records,but in datastage job it is not giving correct records.

Posted: Thu Aug 16, 2007 11:15 am
by scorpion
Can any one faced before this kind of issue?

Help me on this..

Posted: Thu Aug 16, 2007 11:36 am
by us1aslam1us
Are they any warning/error messages in the log? Also have you checked your imported metadata, it sometime gives wierd results due to metadata mismatch. As Arnd suggested add two or three records to the current table and check.

Posted: Thu Aug 16, 2007 12:15 pm
by scorpion
Hi,

there are no warning/error messages in the log,about this perticular sybase source stage.

And I have checked imported metadata,and As Arnd suggested added some records to the current table and the issue is remaining same.

any thoughts?

Posted: Thu Aug 16, 2007 2:23 pm
by us1aslam1us
Is that your complete query or you have something attached to it? Also what is configuration file details?

Posted: Thu Aug 16, 2007 3:17 pm
by ArndW
scorpion wrote:...and As Arnd suggested added some records to the current table and the issue is remaining same...
The result you get after adding records is important in diagnosing your error - 'same' doesn't help at all. Do you have just 10,000 records now (implying a limit is set somewhere), 10,001 (implying an even splitting of data) or 10,002 (implying a selection issue)?

Posted: Sat Aug 18, 2007 3:30 am
by scorpion
Hi All,

I got the solution for this issue,actually one of my column in my sybase table is having datatype as 'float-8',but i am extracting this column as 'decimal',this was giving the issue,
when i tried extracting the column with datatype as 'double' ,it is extracting all the records now.

I dont understand why decimal is dropping the records?

any way i got the solution now,and thanks for all.and time to make it as resolved...

check the range of decimal in datastage and float in sybase

Posted: Sat Aug 18, 2007 4:34 am
by Ragunathan Gunasekaran
If the decimal range is half the range of the float then there is a possiblity of wrap in the numbers to a negative value which would be passed as input to SQL querry.The ultimate result is that the point untill it doesnt wrap will pick records after that it will not pick records as it doesnt satisfy the where clause