'How to suppress output from a kqlmagic query in Jupyter?

I am using kqlmagic to execute KQL queries in my Jupyter notebook. While executing, kqlmagic prints output to the notebook such as:

 * forrest@loganalytics
Done (00:00.302): 1 records
1201 rows, truncated to display_limit of 0

This output ends up taking up half my screen. I would like to hide it and only display my final output, which is a matplotlib graph of the returned data.

Is it possible to disable printing this output from kqlmagic?



Solution 1:[1]

I don't love this solution, but I was able to turn most of the output off using the following settings:

%config Kqlmagic.display_limit = -1 # don't display tables returned by Kqlmagic queries
%config Kqlmagic.show_query_time = False # don't display elapsed time of queries
%config Kqlmagic.show_conn_info = None # don't display the logged-in account

Unfortunately it still prints some empty lines, but this is the best I could figure out so far.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1