cancel
Showing results for 
Search instead for 
Did you mean: 
Data Engineering
Join discussions on data engineering best practices, architectures, and optimization strategies within the Databricks Community. Exchange insights and solutions with fellow data engineers.
cancel
Showing results for 
Search instead for 
Did you mean: 

display() not updating after 1000 rows

MrsBaker
Databricks Employee
Databricks Employee

Hello folks! I am calling display() on a streaming query sourced from a delta table. The output from display() displays the new rows added to the source table. But as soon as the output results hit 1000 rows, the output is not updated anymore. As a result, the visualization I built on top of the output is stale. Is there a work around for the display function to append the new results while clearing the old results after the display limit of 1000 is hit?

1 REPLY 1

MrsBaker
Databricks Employee
Databricks Employee

aggregate function followed by timestamp field sorted in descending order did the trick:

streaming_df.groupBy("field1", "time_field").max("field2").orderBy(col("time_field").desc()).display()

Connect with Databricks Users in Your Area

Join a Regional User Group to connect with local Databricks users. Events will be happening in your city, and you won’t want to miss the chance to attend and share knowledge.

If there isn’t a group near you, start one and help create a community that brings people together.

Request a New Group