[ckan-dev] Intercept select queries in CKAN and store in database table

Hakan Solmaz hakansolmaz06 at outlook.com
Wed Mar 20 11:05:56 UTC 2019


Hi Stefan,

thanks for your reply. So my aim is to assign for each select query a persistend Identifier to reuse them in a later time. By that I want to make possible to reproduce the datasets. What I've seen, CKAN already has a revision table for each table. I can use that for my case. That would be my consideration. Maybe it will be easier but I'm not sure.

Hakan
________________________________
Von: ckan-dev <ckan-dev-bounces at lists.okfn.org> im Auftrag von Stefan Oderbolz <odi at metaodi.ch>
Gesendet: Mittwoch, 20. März 2019 11:50
An: CKAN Development Discussions
Betreff: Re: [ckan-dev] Intercept select queries in CKAN and store in database table

Hi Hakan

What is your use case to store all select queries? Maybe there are other ways to get the same information.

E.g. there is an extension to save all search terms (https://github.com/ckan/ckanext-searchhistory), so this could be a solution.

If you really want to store all select queries, I think the easiest way is to enable logging for all queries in PostgreSQL, and then import the logfile to a log table on a regular basis (see https://www.dbrnd.com/2017/12/postgresql-generate-csv-log-file-insert-into-table/ for a rough description).

- Stefan

On Wed, Mar 20, 2019, 03:10 Hakan Solmaz <hakansolmaz06 at outlook.com<mailto:hakansolmaz06 at outlook.com>> wrote:

Hi everyone,



I am new in CKAN. I want to store the SELECT queries on datasets in an additional database-table. So my question is how to that? There are a lot of APIs but for me it is not clear how to this.



Kind Regards,

Hakan

_______________________________________________
ckan-dev mailing list
ckan-dev at lists.okfn.org<mailto:ckan-dev at lists.okfn.org>
https://lists.okfn.org/mailman/listinfo/ckan-dev
Unsubscribe: https://lists.okfn.org/mailman/options/ckan-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.okfn.org/pipermail/ckan-dev/attachments/20190320/c9f8a5b6/attachment-0002.html>


More information about the ckan-dev mailing list