Page 1 of 2

DS job CREATE/UPDATE

Posted: Thu Feb 09, 2012 8:55 am
by Cherukuri
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.

Posted: Thu Feb 09, 2012 9:06 am
by pandeesh
It looks like, do you want to achieve insert/update mechanism in sequential file?

Posted: Thu Feb 09, 2012 9:08 am
by chulett
Start by posting in the correct forum.

Posted: Fri Feb 10, 2012 6:23 am
by Cherukuri
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.

Posted: Fri Feb 10, 2012 8:22 am
by chulett
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'.

Posted: Fri Feb 10, 2012 8:24 am
by pandeesh
I believe you can use change capture stage for this.

Posted: Fri Feb 10, 2012 9:36 am
by Cherukuri
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..

Posted: Fri Feb 10, 2012 10:01 am
by qt_ky
chulett wrote:There is no mechanism to "update" a sequential file.
Are you sure?

Posted: Fri Feb 10, 2012 10:04 am
by chulett
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.

Posted: Fri Feb 10, 2012 11:50 am
by qt_ky
chulett wrote:you can't treat it like a relational source
Quite certain are you? What know you of certainty? :o

Posted: Fri Feb 10, 2012 1:27 pm
by chulett
Away put your weapon. :wink:

Posted: Fri Feb 10, 2012 3:34 pm
by qt_ky
:lol: Setup the ODBC Text driver you can.

Posted: Fri Feb 10, 2012 6:56 pm
by chulett
That path leads to the Dark Side. :wink:

Posted: Sat Feb 11, 2012 6:42 am
by qt_ky
Craig... I am your father. :shock:

Posted: Mon Feb 13, 2012 2:29 am
by Cherukuri
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.