cancel
Showing results forย 
Search instead forย 
Did you mean:ย 
Machine Learning
Dive into the world of machine learning on the Databricks platform. Explore discussions on algorithms, model training, deployment, and more. Connect with ML enthusiasts and experts.
cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

Set default "spark.driver.maxResultSize" from the notebook

mhansinger
New Contributor II

Hello,

I would like to set the default "spark.driver.maxResultSize" from the notebook on my cluster. I know I can do that in the cluster settings, but is there a way to set it by code?

I also know how to do it when I start a spark session, but in my case I directly load from the feature store and want to transform my pyspark data frame to pandas.

from databricks import feature_store
import pandas as pd
import pyspark.sql.functions as f
from os.path import join
 
fs = feature_store.FeatureStoreClient()
 
prediction_data = fs.read_table(name=NAME)
 
prediction_data_pd = prediction_data.toPandas()

1 ACCEPTED SOLUTION

Accepted Solutions

Atanu
Databricks Employee
Databricks Employee
4 REPLIES 4

mhansinger
New Contributor II

Hi @Kaniz Fatmaโ€‹  thanks for your reply.

Not sure if that helps. When I check after execution of your code with

spark.conf.get("spark.driver.maxResultSize")

I still get the default "spark.dirver.maxResultSize", instead of 4096.

Atanu
Databricks Employee
Databricks Employee

@Maximilian Hansingerโ€‹  may be you can follow this -

https://kb.databricks.com/jobs/job-fails-maxresultsize-exception.html

Anonymous
Not applicable

@Maximilian Hansingerโ€‹ - Would you let us know how it goes, please?

Anonymous
Not applicable

Hi @Maximilian Hansingerโ€‹ 

Just wanted to check in if you were able to resolve your issue. If yes, would you be happy to mark the answer as best? If not, please tell us so we can help you.

Thanks!

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