Skip to Content
author's profile photo Former Member
Former Member

Deletion program to handle deletes in the ODS


I am loading my ODS object, a full load from a flat file everyday. The load contains the last 10 days of data. Any data that is older than 10 days is static and can not be changed.

Next day I load 10 days data again (full load). To simulate the delta correctly in the ODS, I need to delete all the records for the last 9 days from the previous day's load and 10th day records remain in ODS.

This is what i am planning to do to delete the data. In the start routine, I am selecting the data from active table and posting delete records for all of those. This will work well if we always have one datapacket. but if the code runs for every datapacket (lets say 10), for every record, i'll be posting 10 delete records.

I need a way to restrict my code to run only once per load, either first datapacket or last datapacket...

Or if you can think of any other method to handle the situation...

Thanks a lot...


Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Feb 21, 2005 at 02:20 PM


    if you want to execute your code only once, load your data via PSA, create a global variable and then refer to it to restrict your code only for the first (or something different) datapacket (I don't know why you tell me that this doesn't work because NOW I'm using this logic with no problem..)...

    otherwise, you can modify your loading parameter inmorder to have only one datapacket (please refer to previous postings in these forums)



    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.