Query Logs

Query logs in Contiamo Data Hub contain information about query plans on three distinct levels througout the query execution lifecycle.

Firstly, the Pantheon Query Engine generates a generic query plan using its cost-based query optimizer.

This is further converted into a logical plan specific to one of the execution backends (Calcite or Spark).

This plan is finally modified into a physical plan that is used to construct the query pushed down to the physical data source.

Each plan consists of nodes that contain relational algebra operations. They are similar in logic to a PostgreSQL EXPLAIN plan and should be read bottom-up.

For example, the physical plan for a query breaking down the measure "unitSales" by the dimension attribute "Store.city" from our sample schema:

JdbcToEnumerableConverter
JdbcSort(fetch=[10])
JdbcAggregate(group=[{0}], unitSales=[$SUM0($1)])
JdbcProject(Store.city=[$3], unitSales=[$1])
JdbcJoin(condition=[=($0, $2)], joinType=[left])
JdbcProject(store_id=[$4], unit_sales=[$7])
JdbcFilter(condition=[=($3, 0)])
JdbcTableScan(table=[[Test, SALES_FACT_1998]])
JdbcProject(STORE_ID=[$0], STORE_CITY=[$6])
JdbcTableScan(table=[[Test, STORE]])

You can view a query log for the query you build directly in the Query Editor by clicking on Logs in the bottom right panel:

Query logs are likewise listed as a menu item in the left-hand side navigation under Query Logs. Navigating here shows you a complete record of all executed queries including their:

  • Type

  • Status

  • Started at (timestamp)

  • Target (data source)

  • Running time

  • Custom reference