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

Hakan Solmaz hakansolmaz06 at outlook.com
Wed Mar 20 11:04:48 UTC 2019


________________________________
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/98ea00a6/attachment-0002.html>


More information about the ckan-dev mailing list