Using a CDC datastage conditions
Posted: Wed May 20, 2020 12:42 pm
Hi All,
So i am trying to do the following with a CDC followed by a transformer, say when updating an old record i want to keep the old record but flag it to N and insert a new record but flag that as Y. So basically i want to be able to keep the old record but flag it N, and insert and update the old record with say the same id as the old record but different name but flag it Y. so the updated record has a new name and flagged Y but same ID.
I have tried using a copy option in CDC but that doesn't work. Would i maybe have to do a stage variable? or how would the conditions work in a transform if i were to do that?
Right now i have after the CDC a transform stage where i have 2 output links:
1. code 1 and 2 flag Y
2. code 3 flag Y, i am missing the part where i keep the old record but flag it N.
I am loading this into just one dataset.
please help. thank you.
So i am trying to do the following with a CDC followed by a transformer, say when updating an old record i want to keep the old record but flag it to N and insert a new record but flag that as Y. So basically i want to be able to keep the old record but flag it N, and insert and update the old record with say the same id as the old record but different name but flag it Y. so the updated record has a new name and flagged Y but same ID.
I have tried using a copy option in CDC but that doesn't work. Would i maybe have to do a stage variable? or how would the conditions work in a transform if i were to do that?
Right now i have after the CDC a transform stage where i have 2 output links:
1. code 1 and 2 flag Y
2. code 3 flag Y, i am missing the part where i keep the old record but flag it N.
I am loading this into just one dataset.
please help. thank you.