cancel
Showing results for 
Search instead for 
Did you mean: 
Data Engineering
cancel
Showing results for 
Search instead for 
Did you mean: 

Can I change from default showing first 1,000 to return all records when query?

Thanapat_S
Contributor

I have to query a data for showing in my dashboard.

But it truncated the results and showing only first 1,000 rows.

imageIn the dashboard view, there is no option to re-execute with maximum result limits.

I don't want to switch back to standard view and click to re-execute everytime.

image.pngSo, I would like to know if I can change default from showing only 1,000 records to return all records from query.

More information

Workspace: Data Science & Engineering

Language: Python (PySpark)

Databricks Runtime: 9.1 LTS (includes Apache Spark 3.1.2, Scala 2.12)

1 ACCEPTED SOLUTION

Accepted Solutions

@Thanapat Sontayasara​ 1000 is still the default. Default of 10k rows will be made available by Jan.

View solution in original post

11 REPLIES 11

Kaniz
Community Manager
Community Manager

Hi @Thanapat Sontayasara​​, Limit 1000 is selected by default for all queries to ensure that the query returns at most 1000 rows. If you want to return all rows for this query, you can unselect LIMIT 1000 by clicking the Run (1000) drop-down. If you want to specify a different limit on the number of rows, you can add a LIMIT clause in your query with a value of your choice.

Source - Read this document

Hi! @Kaniz Fatma​ Sorry for late reply.

Thank you for your answer.

But the problem is that my query is running in Databricks Data Science & Engineering.

I understand that your reference is based on Databricks SQL workspace.

image

Kaniz
Community Manager
Community Manager

Hi @Thanapat Sontayasara​, Here is the thread similar to your problem with the best answer. Please LMK if that helps.

Hi! @Kaniz Fatma​.

Yes, definitely the same question as mine.

But, still, I don't find any guideline of how to change the default like mention in that thread.

Do you have any clue about "the changes need to occur at the shard level."?

I have no idea what is the shard level. Or you have any reference document for me to work on.

Srihasa_Akepati
New Contributor III
New Contributor III

@Thanapat Sontayasara​ 10000 limit is available as an option in the notebook(which propagates to dashboard after its run in notebook) while 1000 rows still is the default. 10000 limit is experimental and it can be made as default depending on the number of use cases from customers which may take some time.

Hi! @Srihasa Reddy Akepati​ Sorry for late reply.

Interesting! Can you share with us about how to change or set the 10,000 as default when running command like display(df) and return 10,000.

With screenshot or document guideline shared would be really appreciated!

@Thanapat Sontayasara​ Default is still 1000. Let me check internally if there is a way to change the default.

@Thanapat Sontayasara​ 1000 is still the default. Default of 10k rows will be made available by Jan.

Hi @Srihasa Reddy Akepati​ 

That's a useful information and also a good news.

I'm looking forward to that feature release.

Thank you so much for your support. 😄

Kaniz
Community Manager
Community Manager

Hi @Thanapat Sontayasara​, We haven’t heard from you on the last response from @Srihasa Reddy Akepati​ and me, and I was checking back to see if our suggestions helped you.

Or else, If you have any solution, please do share that with the community as it can be helpful to others.

Also, Please don't forget to click on the "Select As Best" button whenever the information provided helps resolve your question.

Hi! @Kaniz Fatma​ Sorry for late reply.

I am still don't find any solution to change the default query limit when using display(df).

If I got the solution, I will share with the community ASAP.

Thank you for your support 🙂

Welcome to Databricks Community: Lets learn, network and celebrate together

Join our fast-growing data practitioner and expert community of 80K+ members, ready to discover, help and collaborate together while making meaningful connections. 

Click here to register and join today! 

Engage in exciting technical discussions, join a group with your peers and meet our Featured Members.