Thursday, 15 July 2010

sql - Deleting rows in datastore by time range -



sql - Deleting rows in datastore by time range -

i have ckan datastore column named "recvtime" of type timestamp (i.e. using "timestamp" type @ datastore_create time, as shown in link). illustration value column "2014-06-12t16:08:39.542000".

i have big numbers of records in datastore (thousands) , delete rows before given date in "recvtime". first thought doing using rest api datastore_delete operation using range filter, not possible described in next q&a.

is there other way of solving issue, please?

given have access host ckan server running, wonder if achieved executing regular sql sentence on postgresql engine datastore persisted. however, haven't found info manipulating ckan underlying datamodel in ckan documentation, don't know if thought or if risky...

any workaround or info pointer highly welcome. thanks!

you straight on underlying database if willing dig in there (the construction pretty simple tables named after corresponding resource id). turn api of own using extension (though you'd want careful permissions).

you might interested in new back upwards (master atm) extending datastore api via plugin in extension - see https://github.com/ckan/ckan/pull/1725

sql postgresql ckan

No comments:

Post a Comment