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. This is now run automatically as an Oracle "cron"-job.

To actually delete the files the script in ~glast/datacat/prod/delete-datacat must be run (as glastraw on fermilnx-v21).

  • No labels

1 Comment

  1. The L1 data products on NFS no longer have group write permission, so the glast account can not delete them. In future we may need to run the delete-datacat as glastraw.

    Tony