blazingsql.BlazingContext.log

BlazingContext.log(query, logs_table_name='bsql_logs')

Query BlazingSQL’s internal log (bsql_logs) that records events from all queries run.

query : string value SQL query on bsql_logs table. logs_table_name (optional) : string of logs table name,

‘bsql_logs’ by default.

Initialize BlazingContext and query bsql_logs for how long each query took:

>>> from blazingsql import BlazingContext
>>> bc = BlazingContext()
BlazingContext ready
>>> log_result = bc.log("SELECT log_time, query_id, duration
    FROM bsql_logs WHERE info = 'Query Execution Done'
    ORDER BY log_time DESC")
>>> print(log_result)
              log_time  query_id      duration
0  2020-03-30 23:32:25     28799   1961.016235
1  2020-03-30 23:31:41     56005   1942.558960
2  2020-03-30 23:27:26       243   3820.107666
3  2020-03-30 23:27:16     12974   4591.859375
4  2020-03-30 23:10:44     45323   5897.124023
...                ...       ...           ...

Docs: https://docs.blazingdb.com/docs/blazingsql-logs