IBM Security i2

Expand all | Collapse all

Is there a way to automatically and periodically delete entries?

  • 1.  Is there a way to automatically and periodically delete entries?

    Posted Fri February 05, 2021 11:15 AM
    Hi,

    I'd like to know if there's a way to schedule deletion of entities/links in iBase. I know scheduling data loading is possible, nowadays we have a lot of entities that become obsolete and in order not to have those items we have to manually delete everything before updating. It'd be a lot easier if we had a programmable task (for example monthly). 

    I'm using iBase 8.9

    Regards
    Makcim

    ------------------------------
    makcim s.
    ------------------------------


  • 2.  RE: Is there a way to automatically and periodically delete entries?

    Posted Fri February 05, 2021 03:42 PM
    Hi Makcim,

    There is nothing native to iBase that would let you schedule automated deletions. As you mentioned, the Scheduler can let you automate imports and exports of data.

    I would recommend logging an RFE (Request for Enhancement) for this feature:
    https://www.ibm.com/developerworks/rfe/execute?use_case=submitRfe

    Additionally, if you're interested in a custom solution, it may be possible for IBM Services to set you up with something to achieve your task.

    Best,
    Raul Marita



    ------------------------------
    Raul Marita
    ------------------------------



  • 3.  RE: Is there a way to automatically and periodically delete entries?

    Posted Mon February 08, 2021 12:16 PM
    Hello Makcim

    There is something you could potentially do to make your process more efficient, and it is based on what we do.  I'll be honest and not try to claim I understand the back-end workings of it - it was set up by the IBM consultant who builds our SQL feeds - but the underlying logic could be applied to any build.

    So our database build is essentially a data warehouse; the data mirrors what is held in other systems my organisation have running.  This allows us (a) better search / extraction tools than are available in the native systems & (b) the option to search multiple databases at once.  But of course if a record is deleted in a source system (normally for us that means an unintended duplicate merges into the original record), the record needs to be deleted in our warehouse copy, or our database is not a mirror image.

    Therefore we have a standard YES/NO field across all records (Entities and Links) of "Deletion Indicator" - when a record is deleted in the source system, at the next load that Deletion Indicator field is set to YES.  At the end of the load, anything with a Deletion Indicator of YES is weeded.  As far as I'm concerned, the SQL script is as understandble to me as witchcraft, but it works and therefore I have no complaints.

    So potentially you could do something similar. 
    1)   If you add a YES/NO field as a standard field to all records and call it Delete or Deletion Indicator, then that will always be availale to you. 
    2)   When you need to delete some records, you could be able to write an Import Script that changes the Deletion Indicator field for those records to YES
    3)   Once that has been done, write a Query that looks for any records with that field set to YES.  Save the results to a Set.
    4)   iBase has bulk delete tools.  Run a bulk delete and point it to the Set saved at Step 3.  I'd recommend setting your build to 'Soft Delete,' so the records could be recovered easily if the process goes wrong.

    I hope this helps a bit.


    Ant

    ------------------------------
    Anthony Patamia
    ------------------------------