[ECODP-dev] ODP-291

Bert Van Nuffelen bert.van.nuffelen at tenforce.com
Thu Oct 3 14:33:16 UTC 2013


Hi John,

I have updated the ODP-291 with your comments.

best,

Bert


2013/10/1 John Glover <john.glover at okfn.org>

> Hi Dimitrios,
>
> As discussed on the call earlier, here is the query that is being run to
> view the most popular datasets in release 09:
>
>         SELECT most_popular.url, most_popular.running_total,
>                package.name, package.title
>         FROM (
>             SELECT
>                 url
>               , running_total
>               , regexp_split_to_array(url, E'\\/') as name
>             FROM tracking_summary
>             WHERE
>                 running_total > 0
>             AND url LIKE('%/dataset/%')
>             AND tracking_date = (select max(tracking_date)
>                                  from tracking_summary)
>             ) as most_popular
>         LEFT JOIN package
>         ON most_popular.name[array_length(most_popular.name, 1)] =
> package.name
>         WHERE package.name IS NOT NULL
>         ORDER BY
>             running_total DESC
>
> The problem here seems to be the line 'AND tracking_date = ...', which is
> selecting the global max instead of the most recent max for a given dataset.
>
> Regards,
> John
>
>
> On 1 October 2013 09:34, Dimitrios Mexis <dimitrios.mexis at tenforce.com>wrote:
>
>>  Good morning John,
>>
>> can you have a look on this JIRA ticket 291.
>> It is from Agneszka, stating that:
>> "Today the whole column with most viewed datasets disappeared
>> completely. I wonder if it can be linked to the fact that yesterday, for
>> the first time since 19/09 the ingestion of Estat data has been peformed in
>> ckan."
>>
>> Can you give insight why could this happen ?
>>
>> Regards
>> Dimitrios
>>
>> _______________________________________________
>> Ecodp-dev mailing list
>> Ecodp-dev at lists.okfn.org
>> http://lists.okfn.org/mailman/listinfo/ecodp-dev
>>
>>
>
> _______________________________________________
> Ecodp-dev mailing list
> Ecodp-dev at lists.okfn.org
> http://lists.okfn.org/mailman/listinfo/ecodp-dev
>
>


-- 
Bert Van Nuffelen

Semantic Technologies Software Architect at TenForce
www.tenforce.be

Bert.Van.Nuffelen at tenforce.com
Office: +32 (0)16 31 48 60
Mobile:+32 479 06 24 26
skype: bert.van.nuffelen
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.okfn.org/mailman/private/ecodp-dev/attachments/20131003/214cc02b/attachment.html>


More information about the ecodp-dev mailing list