ODBC stage fetches only 1 row

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
just4geeks
Premium Member
Premium Member
Posts: 644
Joined: Sat Aug 26, 2006 3:59 pm
Location: Mclean, VA

ODBC stage fetches only 1 row

Post by just4geeks »

I am using a ODBC Enterprise Stage to read data off of a Oracle database. When I click on "view data", it shows only 1 row. Even though I choose 30 rows to display in the data browser.

When I looked into the table via Toad, I see it contains more than a 1000 rows. Does anyone have any ideas? Thanks for your time....
Attitude is everything....
Edwink
Participant
Posts: 47
Joined: Sat Aug 19, 2006 4:57 am
Location: Chennai

Post by Edwink »

what is query you are using to fetch the data?
just4geeks
Premium Member
Premium Member
Posts: 644
Joined: Sat Aug 26, 2006 3:59 pm
Location: Mclean, VA

Post by just4geeks »

Edwink wrote:what is query you are using to fetch the data?
I dont have a query. The read method is a table. I read the table and dump the results into a flat file.
Attitude is everything....
Edwink
Participant
Posts: 47
Joined: Sat Aug 19, 2006 4:57 am
Location: Chennai

Post by Edwink »

do you have the options set inthe ODBC stage like fetch array size =1?
just4geeks
Premium Member
Premium Member
Posts: 644
Joined: Sat Aug 26, 2006 3:59 pm
Location: Mclean, VA

Post by just4geeks »

Edwink wrote:do you have the options set inthe ODBC stage like fetch array size =1?
I hadn't set fetch array size earlier. Now even after setting it to 10, I get only 1 row.
Attitude is everything....
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

WHat happens when you run the job. Do all the records get processed?
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
just4geeks
Premium Member
Premium Member
Posts: 644
Joined: Sat Aug 26, 2006 3:59 pm
Location: Mclean, VA

Post by just4geeks »

DSguru2B wrote:What happens when you run the job. Do all the records get processed?
It runs successfully processing all the rows which are more than 2 million. When I do a view data on the seq file stage asking for 30 rows, I only get 15 rows.

Any idea what is causing this discrepancy? Thanks for your time.....
Attitude is everything....
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

When you view data, make sure your Skip Count is set to 0 and Period is set to 1.
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
just4geeks
Premium Member
Premium Member
Posts: 644
Joined: Sat Aug 26, 2006 3:59 pm
Location: Mclean, VA

Post by just4geeks »

DSguru2B wrote:When you view data, make sure your Skip Count is set to 0 and Period is set to 1.
Yes, I made sure that the skip count is 0 and Period is set to 1. I get the same error again, i.e. lesser number of rows than I asked for.

When I do a view count on the seq file stage asking for 30, I get 15, asking for 40, I get 26 and finally asking for 60, I get exactly 60 rows.
Attitude is everything....
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

Is this the only job thats behaving like this. If yes then I have no idea whats going on, without further detective work. Delete the job and rebuild it. See if this behaviour goes away.
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
Post Reply