You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Next »

The SQL for purging L1 data is:

SELECT 
    count(DATA_CATALOG_ADMIN.PurgeDatasetVersion(DatasetVersion))
FROM 
    DatasetGroup g 
JOIN 
    VerDataset d 
    ON 
    (
        d.DatasetGroup= g.DatasetGroup
    ) 
JOIN 
    DatasetVersion dv 
    ON 
    (
        dv.Dataset= d.Dataset
    ) 
WHERE 
    g.DatasetLogicalFolder=39684091 
    and d.LatestVersion != dv.DatasetVersion 
    and Registered<sysdate-14

This does not actually delete data, it just puts it into the "to be deleted" table – DATASETLOCATIONPURGE. We should run this nightly as a "oracle cron" job.

To actually delete the files the script in ~glast/datacat/dev/delete-datacat must be run (on glastlnx21). This currently only exists in DEV and uses a SNAPSHOT version of the data catalog crawler software, but nonetheless deleted the files in the PROD database.

  • No labels