How can I get Databricks notebooks to stop cutting off the explain plans?

User15787040559
Databricks Employee
Databricks Employee

(since Spark 3.0)

Dataset.queryExecution.debug.toFile

will dump the full plan to a file, without concatenating the output as a fully materialized Java string in memory.

dazfuller
Databricks Partner

Notebooks really aren't the best method of viewing large files. Two methods you could employ are

  1. Save the file to dbfs and then use databricks CLI to download the file
  2. Use the web terminal

In the web terminal option you can do something like "cat my_large_file.txt | less" and then you can scroll through the entire content of the file.