[ckan-dev] DataStore as resource itself.
Ben Scott
bnm at benscott.co.uk
Wed Dec 4 14:02:17 UTC 2013
Hi David -
That's brilliant, works perfectly.
Thanks very much for your help,
Ben
On Tue, Dec 3, 2013 at 3:50 PM, David Raznick <david.raznick at okfn.org>wrote:
> Hello
>
> Yes this is possible with the new datastore_create api.
>
>
> http://docs.ckan.org/en/latest/datastore.html#ckanext.datastore.logic.action.datastore_create
>
> When using it you can now send through a resource json as one of the
> arguments, this needs to contain the package_id and thats it.
>
> {"records" : [
> {"dob": "2005", "some_stuff": ["a", "b"]}
> ]
> "resource" {"package_id": "packagenameorid"}
> }
>
> The url, if you do it this way will a csv dump of the table.
>
> David
>
> On 3 December 2013 12:32, Ben Scott <bnm at benscott.co.uk> wrote:
> >
> > Great, thank you - I'll give that a try.
> >
> > Cheers,
> > Ben
> >
> >
> > On Tue, Dec 3, 2013 at 11:25 AM, Henrik Aagaard Sørensen <BU1G at tmf.kk.dk
> >
> > wrote:
> >>
> >> Currently I’m solving the issue by creating a ressource with the url
> >> #fake-url and afterwards changing the URL to
> /datastore/dump/RESOURCE-ID,
> >> which refers to a CSV dump of the datastore.
> >>
> >>
> >>
> >> Seems to solve the issue somewhat.
> >>
> >>
> >>
> >>
> >> _______________________________________________
> >> 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
> >
> _______________________________________________
> 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.okfn.org/pipermail/ckan-dev/attachments/20131204/9cc8f3d6/attachment-0003.html>
More information about the ckan-dev
mailing list