[ckan-dev] questions about datastore_create and datastore_search

Dominik Moritz dominik.moritz at okfn.org
Sat Apr 27 09:01:40 UTC 2013


Hi,

The name of the datastore tables is exactly the id of the CKAN resource that the datastore table belongs to. A datastore table cannot exist on its own. Yes, the names are ugly which is why we added aliases. You can add an arbitrary number of aliases to a table using the `resource_create` [1] action (you can also edit existing tables with this action). There is a section in the docs about aliases at [2].

Does this also answer your question from the other email? I don't know why you do not reach the breakpoint.

Best wishes and have fun with the datastore.
Dominik

[1] http://docs.ckan.org/en/latest/datastore-api.html#ckanext.datastore.logic.action.datastore_create
[2] http://docs.ckan.org/en/latest/datastore-api.html#resource-aliases

On 27 Apr 2013, at 09:23, 天龙出云 <dragoniszhang at gmail.com> wrote:

> When I use curl command in shell to create a datastore, I cannot step to
> the breakpoint that I placed in the function ckanext/datastore/logic/
> action.py/datastore_create(), could anybody tell me about the reason,
> thanks very much!
> Another question is that I do not want to use the id that datastorer
> generates automatically to be the name of the table in postgres, instead I
> want to use my own more comprehensible name such as a city name or some
> words meaningful. I feel the id too hard to use in datastore_search
> function.
> Thank you very much for helping me!
> _______________________________________________
> ckan-dev mailing list
> ckan-dev at lists.okfn.org
> http://lists.okfn.org/mailman/listinfo/ckan-dev
> Unsubscribe: http://lists.okfn.org/mailman/options/ckan-dev





More information about the ckan-dev mailing list