[ckan-dev] data api question

Rufus Pollock rufus.pollock at okfn.org
Mon Apr 2 06:21:36 UTC 2012


On 30 March 2012 16:18, James Casbon <casbon at gmail.com> wrote:
> On 30 March 2012 16:13, Rufus Pollock <rufus.pollock at okfn.org> wrote:
>> BTW: I'm on #ckan on freenode if you want to caht.
>>
>> On 30 March 2012 15:58, James Casbon <casbon at gmail.com> wrote:
>>> Hi CKAN,
>>>
>>> Go to gold prices:
>>> http://thedatahub.org/dataset/gold-prices/resource/b9aae52b-b082-4159-b46f-7bb9c158d013
>>>
>>> Click 'data api button', tells me to use
>>> "http://thedatahub.org/api/data/b9aae52b-b082-4159-b46f-7bb9c158d013"
>>
>> Add _search on the end of it plus some kind of query.
>>
>> That link is described as "base". Perhaps we should move it down the
>> list. 2nd and 3rd examples are of actual queries.
>
> Ah, OK.  I see what you mean now.  I just assumed that would return
> the resource without querying.

BTW, in ES 0.19 (we are 0.18) the basic url does return default query.

> Is there a way of getting the whole resource without knowing its size?

No, but you could just do two queries (first gives you total and then
you do the query).

That said querying via ES is really not going to be the best way to
get a 100Mb resource :-) In that case you probably want to download or
we should investigate the s3 gateway for ES:
<http://www.elasticsearch.org/guide/reference/modules/gateway/s3.html>

Rufus




More information about the ckan-dev mailing list