When a file gets upload to the files service, the data is physically stored in a large object in postgres. This includes files uploaded through SAS Content, but also for any job that has run, the results of that job. This job history, including logs, is preserved based on the expiration attribute of the job, which is set based on the "expiresAfter" parameter of the jobRequest. When you create a jobRequest through SAS Studio, this expiration is set to 72 hours. When you create a job in Environment Manager, the expiration is not set, meaning the job history is preserved indefinitely. I created a series of pyviyatools tools to address the issue of job history being preserved indefinitely: 1. setjobrequestexpire.py - https://github.com/sassoftware/pyviyatools/blob/master/setjobrequestexpire.py - Allows you to set the expiresAfter parameter for jobRequests. This will cause any future jobs run under that jobRequest to carry an expiration based on that parameter. 2. deletejobhistory.py - https://github.com/sassoftware/pyviyatools/blob/master/deletejobhistory.py - Allows you to delete the job history (contents of the Monitoring tab) based on filters, so for example any jobs that completed over a week ago, or all the history for a specific job. 3. deleteorphanedfiles.py - https://github.com/sassoftware/pyviyatools/blob/master/deleteorphanedfiles.py - When you delete a job history object, the associated files for that object should be deleted as well automatically. Sometimes this process fails resulting in a file object without a valid parent (as the job history object has been deleted). This tool identifies any files objects without a parent (i.e. the parentUri when called returns a 404), and deletes them. So #1 prevents future job history from being preserved indefinitely and #2 and #3 clean up existing history. For exports, the transfer service has functions to create an export package and download it. After you've downloaded it, the package is still present on the server and could be downloaded again, until such time as you delete the export package. When I'm doing an export, I include a delete to keep the database free of old packages once they've been downloaded: sas-viya transfer export (produces ID as output) sas-viya transfer download --id id-from-above sas-viya transfer delete --id-from-above You can also remove old packages using the sas-viya transfer delete CLI command if you no longer need them on the server, the sas-viya transfer list command will show you the packages that still exist on the server.
... View more