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:ย 

DB Connect giving different results

brickster_2018
Databricks Employee
Databricks Employee

The below code gives different result when executed using DB Connect and a Notebook

sc = spark.sparkContext
a = sc.accumulator(0)
rdd = sc.parallelize([1, 2, 3])
def f(x):
global a
a.add(x)
rdd.foreach(f)
rdd.count()
print(a.value)

1 ACCEPTED SOLUTION

Accepted Solutions

brickster_2018
Databricks Employee
Databricks Employee

This is a known limitation that accumulators do not work with DB Connect.

View solution in original post

1 REPLY 1

brickster_2018
Databricks Employee
Databricks Employee

This is a known limitation that accumulators do not work with DB Connect.

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