Regading Timestamp..
Moderators: chulett, rschirm, roy
Regading Timestamp..
Hi,
I have one problem in my job. I have to compare source table and look up table based on key column using look up stage. If any mismatch records between these tables, then I have to store those records in particular column 'R' flag in RPRCS_C column.. If these records continiously retained in next 15 days, then I have change the flag value as 'E' in RPRCS_C column. I don't know how to do exactly. Can anyone help me out to resolve this issue?
I have one problem in my job. I have to compare source table and look up table based on key column using look up stage. If any mismatch records between these tables, then I have to store those records in particular column 'R' flag in RPRCS_C column.. If these records continiously retained in next 15 days, then I have change the flag value as 'E' in RPRCS_C column. I don't know how to do exactly. Can anyone help me out to resolve this issue?
prabakaran.v
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Is there a "last updated date" column in the record as well? That would make the task very easy. Otherwise the solution is going to involve figuring out how to identify which "R" records have been there for your 14 day requirement. I can't really think of an elegant solution where the storage is in tables. Insist that "they" add a "last updated date" - or even "flag date" - to support their requirement.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
-
- Participant
- Posts: 135
- Joined: Tue Aug 14, 2007 4:27 am
- Location: Mumbai
Re: Regading Timestamp..
If any mismatch records between these tables, then I have to store those records in particular column 'R' flag in RPRCS_C column.. If these records continiously retained in next 15 days, then I have change the flag value as 'E' in RPRCS_C column.
This means all the record regardless matched or unmatched will go to the load files ? plz confirm
Also what is the frequency of your job ? is it daily or weekly or ..
This means all the record regardless matched or unmatched will go to the load files ? plz confirm
Also what is the frequency of your job ? is it daily or weekly or ..
Thanks
Swapnil
"Whenever you find whole world against you just turn around and Lead the world"
Swapnil
"Whenever you find whole world against you just turn around and Lead the world"
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
-
- Charter Member
- Posts: 193
- Joined: Tue Sep 05, 2006 8:01 pm
- Location: Australia
Re: Regading Timestamp..
One is that you have to store the date you loaded those records somewhere so you can work out 15 days. If you have that then the easiest way would be an UPDATE job to update the records to E.
Cau you modify the target table to contain a load date column?
Cau you modify the target table to contain a load date column?
-
- Participant
- Posts: 135
- Joined: Tue Aug 14, 2007 4:27 am
- Location: Mumbai
Re: Regading Timestamp..
i dont think that you need to alter your table ....
what you need a re-circulation file out from lookupstage.
that will conatin all reject ( unmatched recs) ... this after adding a new column of date or counter ( in transformer) will be merged with input file in next cycle...
hence these recsords will be looked up again and if still a mismacth then increase the counter or load_date... if older then 15 days or 15 times ( if run cycle is daily) then modify the required column_value ...
hope that helps...
If you need more clarification ..then provide all the details ...
what you need a re-circulation file out from lookupstage.
that will conatin all reject ( unmatched recs) ... this after adding a new column of date or counter ( in transformer) will be merged with input file in next cycle...
hence these recsords will be looked up again and if still a mismacth then increase the counter or load_date... if older then 15 days or 15 times ( if run cycle is daily) then modify the required column_value ...
hope that helps...
If you need more clarification ..then provide all the details ...
Thanks
Swapnil
"Whenever you find whole world against you just turn around and Lead the world"
Swapnil
"Whenever you find whole world against you just turn around and Lead the world"
-
- Charter Member
- Posts: 193
- Joined: Tue Sep 05, 2006 8:01 pm
- Location: Australia
The design may ba as followI have one problem in my job. I have to compare source table and look up table based on key column using look up stage. If any mismatch records between these tables, then I have to store those records in particular column 'R' flag in RPRCS_C column.. If these records continiously retained in next 15 days, then I have change the flag value as 'E' in RPRCS_C column. I don't know how to do exactly. Can anyone help me out to resolve this issue?
input------>lookup------>Transformer-------->Lookup fail
| records to be inserted
|
|______> Records more then 15 days...
Needs to be updated in database
the first set will be inserted with the RPRCS_C value 'R'
the second set will be updated in the database with value 'E'
But it is required to figure out how to calculate the 15 days.
Birendra
The design may ba as followI have one problem in my job. I have to compare source table and look up table based on key column using look up stage. If any mismatch records between these tables, then I have to store those records in particular column 'R' flag in RPRCS_C column.. If these records continiously retained in next 15 days, then I have change the flag value as 'E' in RPRCS_C column. I don't know how to do exactly. Can anyone help me out to resolve this issue?
input------>lookup------>Transformer -------->two link one for Lookup fail so the records to be inserted and another for Records more then 15 days... Needs to be updated in database
the first set will be inserted with the RPRCS_C value 'R'
the second set will be updated in the database with value 'E'
But it is required to figure out how to calculate the 15 days[/quote
Birendra
-
- Participant
- Posts: 135
- Joined: Tue Aug 14, 2007 4:27 am
- Location: Mumbai
bkumar103 wrote:The design may ba as followI have one problem in my job. I have to compare source table and look up table based on key column using look up stage. If any mismatch records between these tables, then I have to store those records in particular column 'R' flag in RPRCS_C column.. If these records continiously retained in next 15 days, then I have change the flag value as 'E' in RPRCS_C column. I don't know how to do exactly. Can anyone help me out to resolve this issue?
input------>lookup------>Transformer -------->two link one for Lookup fail so the records to be inserted and another for Records more then 15 days... Needs to be updated in database
the first set will be inserted with the RPRCS_C value 'R'
the second set will be updated in the database with value 'E'
But it is required to figure out how to calculate the 15 days[/quote
If you talk about designe then below will do the desired ....
Input ---> lookup ----> Two links from lookup stage one for macthed recs and another for unmatched ( reject link) .
Reject link will goes to transformer and output link will goes to funnel .
Apply businnes logic in Transformer.
From Transformer again two links . One will go to funnel. and another will go to a re-circulation file.
From Funnel ---> final load file.
For merging recirculation file with next input file
This will be best
Use before job script to merge the re-circulation file with input file...
Or alternatively you can use a funnel in above design after input file and before lookup to merge ..
Thanks
Swapnil
"Whenever you find whole world against you just turn around and Lead the world"
Swapnil
"Whenever you find whole world against you just turn around and Lead the world"