1 Reply Latest reply: Dec 5, 2012 11:04 AM by _Phil RSS

    how to purge tables using odi ???

    AMSI
      hi,

      I want to purge the Data in target table.my Data Policy is to only retain the only 90 days. I have to keep only 90 days data. How can i do this in ODI. I have only one DATE column.

      Thanks,

      Regards,
      AMSII
        • 1. Re: how to purge tables using odi ???
          _Phil
          If your existing date field can be used to identify the records to be purged, then you could simply create a procedure in ODI along the lines of

          delete from <%=odiRef.getSchemaName( )%>.*your_table* where your_date_field < (sysdate - 90)

          This is the simplest way, but be wary of your indexes on the table that they don't get too fragmented. You could also investigate using a daily partition startegy on the table which would enable you to drop partitions older than 90 days which would be much faster.