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

Stefan Oderbolz odi at metaodi.ch
Wed Mar 20 10:50:06 UTC 2019


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> 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
> 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/7db19984/attachment-0002.html>


More information about the ckan-dev mailing list