Debugging Queries

In a previous notebook, we showed how to write queries against a relational database system. We mentioned that some operations are pushed down to the source system. But how can we be sure?

This notebook shows how to debug queries in RAW.

This requires us to use the Python API directly.

Let's redo the query that reads data from a PostgreSQL database in the Python API.

We need to use the query_as method. The default query method returns directly Python objects and as we shall see, we need to obtain a stream.

The result object is an input stream of data that can be consumed.

However, it has an extra field, called query_id.

This is a unique identifier for the query.

It can be used to obtain execution logs of that query.

Let's search for a specific message:

Here we can see the exact query that was sent to the PostgreSQL server, confirming that the filter was indeed pushed down.

The query log is also available in the Web Admin UI:

Query Log Screenshot

Next: Python Integration