[ckan-dev] Datastore setup testing...
Lime, Steve D (MNIT)
Steve.Lime at state.mn.us
Thu Apr 25 15:10:07 UTC 2013
Kind of... But isn't a resource itself data? Maybe I'm missing what would be a normal workflow. I was able to get it to work by adding a resource (a CSV file) to a dataset and then grabbing that id from the database tables. But now you end up with this weird combination of a uploaded file and this newly created datastore table. I guess if one could create an "empty" resource and then populate it or if datastore_create referenced a dataset then it would make more sense. Back to the docs...
Steve
-----Original Message-----
From: ckan-dev-bounces at lists.okfn.org [mailto:ckan-dev-bounces at lists.okfn.org] On Behalf Of Dominik Moritz
Sent: Wednesday, April 24, 2013 4:50 PM
To: CKAN Development Discussions
Subject: Re: [ckan-dev] Datastore setup testing...
Hi,
There is a patch at https://github.com/okfn/ckan/pull/807/files. I hope this makes it clear now.
Best wishes,
Dominik
On 24 Apr 2013, at 23:22, "Lime, Steve D (MNIT)" <Steve.Lime at state.mn.us> wrote:
> Thanks Dominik. It's definitely not clear if you have to create something via the portal first or what exactly you have to create.
>
> Steve
>
> From: ckan-dev-bounces at lists.okfn.org
> [mailto:ckan-dev-bounces at lists.okfn.org] On Behalf Of Dominik Moritz
> Sent: Wednesday, April 24, 2013 2:39 PM
> To: CKAN Development Discussions
> Subject: Re: [ckan-dev] Datastore setup testing...
>
> Hi Steve,
>
> If you look at the docs for datastore_create, you will find that it says that the resource_id has to be a "resource id that the data is going to be stored against". So you'll first need a ckan resource. You are right that the set-up docs are not explicit about this and I'll write something for this. Thank you for your feedback.
>
> Best wishes,
> Dominik
>
> On 24 Apr 2013, at 19:51, "Lime, Steve D (MNIT)" <Steve.Lime at state.mn.us<mailto:Steve.Lime at state.mn.us>> wrote:
>
>
> Hi all: We're just getting going with CKAN but are running into issues getting the datastore setup. Everything seems to go fine with the install (CKAN version 2.1a, local PostgreSQL database) but testing the setup isn't working as expected as described herehttp://docs.ckan.org/en/latest/datastore-setup.html#test-the-set-up. Specifically the datastore_create test... Issuing the following:
>
> curl -X POST http://127.0.0.1:80/api/3/action/datastore_create -H "Authorization: valid-API-key" -d '{"resource_id": "test", "fields": [ {"id": "a"}, {"id": "b"} ], "records": [ { "a": 1, "b": "xyz"}, {"a": 2, "b": "zzz"} ]}'
>
> returns the following JSON:
>
> {"help": "...removed for brevity...", "success": false, "error":
> {"message": "Not found: Resource \"test\" was not found.", "__type":
> "Not Found Error"}}
>
> I've not found any reference to this error message in the docs or in the list archives. It doesn't really make sense since the call should create the resource. Any ideas what might cause this? Any guidance appreciated!
>
> Steve
>
> STEVE LIME | DATA & APPLICATIONS MANAGER MN.IT SERVICES @ MNDNR
> 651-259-5473 (w) | 651-297-4946 (f) |
> steve.lime at state.mn.us<mailto:Your.name at state.mn.us>
>
> <image002.jpg><http://www.mn.gov/oet>
>
> Information Technology for Minnesota Government | mn.gov/oet<http://www.mn.gov/oet>
>
>
>
> _______________________________________________
> ckan-dev mailing list
> ckan-dev at lists.okfn.org<mailto:ckan-dev at lists.okfn.org>
> http://lists.okfn.org/mailman/listinfo/ckan-dev
> Unsubscribe: http://lists.okfn.org/mailman/options/ckan-dev
>
> _______________________________________________
> 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
_______________________________________________
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