[ckan-dev] url_type="datastore"/"datapusher" confusion

David Read david.read at hackneyworkshop.com
Fri Aug 25 13:29:00 UTC 2017


I'm trying to understand the resource.url_type field, when it takes
the "datastore" or "datapusher" values. Can anyone help?

I think the intended meaning of both (url_type=datastore and
url_type=datapusher) is that the data in datastore has become the
primary source (a "datastore-only resource"), rather than some
external URL or a URL pointing to FileStore. So in this case the
datastore table is 'read-only', there's no point datapusher trying to
load in the data again, and when you look at the resource, the url is
set to the datastore's dump of it (datastore's before_show function).

However different bits of the code use 'datastore' and 'datapusher'.
It suggests it's a bit of a mess and long since broken/unused (you
have to turn it on explicitly[1]). Or maybe there's something about
this that I've missed.

The code seems all developed in 2013 by Dominik, but if anyone
understands this better, an explanation would be much appreciated.

David

[1] a "datastore-only resource" is created if you specify
set_url_type=True option in datapusher or datastore or call
datastore_create with a resource (dict), rather than the usual
resource_id.



More information about the ckan-dev mailing list