Marks data for deletion from the archive.



marktotal = gd_markfordeletion(ID)

marktotal = gd_markfordeletion(IDs)



marktotal = gd_markfordeletion(ID) takes an ID string and marks the corresponding file, variable or datagroup for deletion from the archive. The function returns 1 if successful or 0 if failed, in which case the reason is displayed in a warning message (for example the ID does not exist). Once data is marked for deletion it is no longer visible using gd_query, gd_retrieve or any other Database Toolbox functions (apart from gd_unmarkfordeletion or gd_querydeleted). The data is then eligible for permanent deletion by an administrator.


marktotal = gd_markfordeletion(IDs) is similar but takes a list of ID strings and marks the corresponding files, variables and datagroups for deletion from the archive. The function returns marktotal, the total number of IDs successfully marked for deletion, and displays warning messages for those that were unsuccessful.



Mark a single file for deletion from the archive.


from gddatabase import *

ID = gd_archive('C:/file.dat')

marktotal = gd_markfordeletion(ID)

print marktotal




Query variable metadata, and then mark the corresponding variables for deletion from the archive.


q = 'standard.archiveDate > 2004-12-01 & a.b < -500'

qresults = gd_query(q, 'varmeta')

IDs = []

for i in range(len(qresults)):



marktotal = gd_markfordeletion(IDs)

print marktotal





Only the owner of the data (the person who archived it) can mark it for deletion.


A valid proxy certificate is required (see gd_createproxy from the Geodise Compute Toolbox).


See also

gd_unmarkfordeletion, gd_querydeleted, gd_createproxy





Copyright © 2005, The Geodise Project, University of Southampton