Show how frequently and when the last time an import profile was used

From the August 2023 Polaris Cataloging Forum, this SQL will show you how many times each import profile has been used and the most recent time the import job was used. This could be helpful if you’re trying to clean-up unused profiles.

This data is limited by how long you keep your Import Profile Job history. If you delete that frequently, you may have an incomplete picture of which profiles you’re using.

SELECT 
    ij.ImportProfileID, ip.ProfileName,
    MAX(ij.ImportJobSubmittedDate) AS MostRecentSubmittedDate,
    COUNT(*) AS RunCount
FROM 
    polaris.polaris.ImportJobs ij
join polaris.polaris.ImportProfiles ip on ip.ImportProfileID = ij.ImportProfileID
GROUP BY 
    ij.ImportProfileID, ip.profilename
ORDER BY 
    RunCount desc;

Sample output