cancel
Showing results forย 
Search instead forย 
Did you mean:ย 
Warehousing & Analytics
Engage in discussions on data warehousing, analytics, and BI solutions within the Databricks Community. Share insights, tips, and best practices for leveraging data for informed decision-making.
cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

RuntimeError: It appears that you are attempting to reference SparkContext from a broadcast variable, action, or transformation. SparkContext can only be used on the driver, not in code that it run on workers. For more information, see SPARK-5063.

Nikhil3107
New Contributor III

I created the following model:

image 

which calls get_identifier_information() which is as follows:

image 

This is how I log the model

image 

And this is the error I am running into:

RuntimeError: It appears that you are attempting to reference SparkContext from a broadcast variable, action, or transformation. SparkContext can only be used on the driver, not in code that it run on workers. For more information, see SPARK-5063.

1 ACCEPTED SOLUTION

Accepted Solutions

Kaniz_Fatma
Community Manager
Community Manager

Hi @Nikhil Gajghateโ€‹, The error message you encountered indicates that you are attempting to reference the SparkContext object from a broadcast variable, action, or transformation in your code running on worker nodes. However, the SparkContext object can only be used on the driver node and is not accessible within code executed on worker nodes.

View solution in original post

2 REPLIES 2

Anonymous
Not applicable

Hi @Nikhil Gajghateโ€‹ 

Great to meet you, and thanks for your question!

Let's see if your peers in the community have an answer to your question. Thanks.

Kaniz_Fatma
Community Manager
Community Manager

Hi @Nikhil Gajghateโ€‹, The error message you encountered indicates that you are attempting to reference the SparkContext object from a broadcast variable, action, or transformation in your code running on worker nodes. However, the SparkContext object can only be used on the driver node and is not accessible within code executed on worker nodes.

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