DSXchange: DataStage and IBM Websphere Data Integration Forum
View next topic
View previous topic
Add To Favorites
This topic has been marked "Resolved."
Author Message
Cherukuri
Participant



Joined: 25 Jul 2007
Posts: 46
Location: India
Points: 598

Post Posted: Thu Feb 09, 2012 8:55 am Reply with quote    Back to top    

DataStage® Release: 8x
Job Type: Parallel
OS: Windows
Additional info: DS 8.5
Hi

I have a requirement like the datastage job should automate to run for every 5 mins.
first time the job is run and file loaded in /tmp/target/ and second time when it run the new file should check the key value on the existed data (that was run before) and if no key value exists then the record should CREATE (insert in the target file) and if the key exist in the target file then the values should UPDATE.

Please could any one help me to approach this requirement.

Regards,
Cheru.

_________________
Cheru
pandeesh



Group memberships:
Premium Members, Heartland Usergroup

Joined: 24 Oct 2010
Posts: 1399
Location: CHENNAI, TAMIL NADU
Points: 9855

Post Posted: Thu Feb 09, 2012 9:06 am Reply with quote    Back to top    

It looks like, do you want to achieve insert/update mechanism in sequential file?

_________________
pandeeswaran
Rate this response:  
Not yet rated
chulett

Premium Poster


since January 2006

Group memberships:
Premium Members, Inner Circle, Server to Parallel Transition Group

Joined: 12 Nov 2002
Posts: 43085
Location: Denver, CO
Points: 222463

Post Posted: Thu Feb 09, 2012 9:08 am Reply with quote    Back to top    

Start by posting in the correct forum.

_________________
-craig

"You can never have too many knives" -- Logan Nine Fingers
Rate this response:  
Not yet rated
Cherukuri
Participant



Joined: 25 Jul 2007
Posts: 46
Location: India
Points: 598

Post Posted: Fri Feb 10, 2012 6:23 am Reply with quote    Back to top    

pandeesh wrote:
It looks like, do you want to achieve insert/update mechanism in sequential file?


YES its an INSERT/UPDATE mechanism in file.. please explain me.. thank you.

_________________
Cheru
Rate this response:  
Not yet rated
chulett

Premium Poster


since January 2006

Group memberships:
Premium Members, Inner Circle, Server to Parallel Transition Group

Joined: 12 Nov 2002
Posts: 43085
Location: Denver, CO
Points: 222463

Post Posted: Fri Feb 10, 2012 8:22 am Reply with quote    Back to top    

There is no mechanism to "update" a sequential file. You'll need to compare both sources and either write out new/updated records from the new source or any original records not 'updated'.

_________________
-craig

"You can never have too many knives" -- Logan Nine Fingers
Rate this response:  
Not yet rated
pandeesh



Group memberships:
Premium Members, Heartland Usergroup

Joined: 24 Oct 2010
Posts: 1399
Location: CHENNAI, TAMIL NADU
Points: 9855

Post Posted: Fri Feb 10, 2012 8:24 am Reply with quote    Back to top    

I believe you can use change capture stage for this.

_________________
pandeeswaran
Rate this response:  
Not yet rated
Cherukuri
Participant



Joined: 25 Jul 2007
Posts: 46
Location: India
Points: 598

Post Posted: Fri Feb 10, 2012 9:36 am Reply with quote    Back to top    

pandeesh wrote:
I believe you can use change capture stage for this.


---

I tried using change capture stage and it worked as expected

Thank you for the help..

_________________
Cheru
Rate this response:  
Not yet rated
qt_ky



Group memberships:
Premium Members

Joined: 03 Aug 2011
Posts: 2892
Location: USA
Points: 21944

Post Posted: Fri Feb 10, 2012 10:01 am Reply with quote    Back to top    

chulett wrote:
There is no mechanism to "update" a sequential file.


Are you sure?

_________________
Choose a job you love, and you will never have to work a day in your life. - Confucius
Rate this response:  
Not yet rated
chulett

Premium Poster


since January 2006

Group memberships:
Premium Members, Inner Circle, Server to Parallel Transition Group

Joined: 12 Nov 2002
Posts: 43085
Location: Denver, CO
Points: 222463

Post Posted: Fri Feb 10, 2012 10:04 am Reply with quote    Back to top    

Quite. That's the nature of sequential media. Now, we're not talking via an editor, stream or not, I'm saying you can't treat it like a relational source and update a specific record in place... unless we've moved into the realm of indexed sequential files.

_________________
-craig

"You can never have too many knives" -- Logan Nine Fingers
Rate this response:  
Not yet rated
qt_ky



Group memberships:
Premium Members

Joined: 03 Aug 2011
Posts: 2892
Location: USA
Points: 21944

Post Posted: Fri Feb 10, 2012 11:50 am Reply with quote    Back to top    

chulett wrote:
you can't treat it like a relational source

Quite certain are you? What know you of certainty? Surprised

_________________
Choose a job you love, and you will never have to work a day in your life. - Confucius
Rate this response:  
Not yet rated
chulett

Premium Poster


since January 2006

Group memberships:
Premium Members, Inner Circle, Server to Parallel Transition Group

Joined: 12 Nov 2002
Posts: 43085
Location: Denver, CO
Points: 222463

Post Posted: Fri Feb 10, 2012 1:27 pm Reply with quote    Back to top    

Away put your weapon. Wink

_________________
-craig

"You can never have too many knives" -- Logan Nine Fingers
Rate this response:  
Not yet rated
qt_ky



Group memberships:
Premium Members

Joined: 03 Aug 2011
Posts: 2892
Location: USA
Points: 21944

Post Posted: Fri Feb 10, 2012 3:34 pm Reply with quote    Back to top    

Laughing Setup the ODBC Text driver you can.

_________________
Choose a job you love, and you will never have to work a day in your life. - Confucius
Rate this response:  
Not yet rated
chulett

Premium Poster


since January 2006

Group memberships:
Premium Members, Inner Circle, Server to Parallel Transition Group

Joined: 12 Nov 2002
Posts: 43085
Location: Denver, CO
Points: 222463

Post Posted: Fri Feb 10, 2012 6:56 pm Reply with quote    Back to top    

That path leads to the Dark Side. Wink

_________________
-craig

"You can never have too many knives" -- Logan Nine Fingers
Rate this response:  
Not yet rated
qt_ky



Group memberships:
Premium Members

Joined: 03 Aug 2011
Posts: 2892
Location: USA
Points: 21944

Post Posted: Sat Feb 11, 2012 6:42 am Reply with quote    Back to top    

Craig... I am your father. Shocked

_________________
Choose a job you love, and you will never have to work a day in your life. - Confucius
Rate this response:  
Not yet rated
Cherukuri
Participant



Joined: 25 Jul 2007
Posts: 46
Location: India
Points: 598

Post Posted: Mon Feb 13, 2012 2:29 am Reply with quote    Back to top    

Hi Eric,

I did not review the work done by my team on using the Change capture stage..

but told its worked .. let me check the same and will revert if its worked or not.

Regards,
Cheru.

_________________
Cheru
Rate this response:  
Not yet rated
Display posts from previous:       

Add To Favorites
View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



Powered by phpBB © 2001, 2002 phpBB Group
Theme & Graphics by Daz :: Portal by Smartor
All times are GMT - 6 Hours