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

Why does the Spark user differ if using sparklyr from Spark SQL?

J15S
New Contributor III

My team uses a shared cluster. We've been having issues with spark_connect failing to work at times (can't easily reproduce). One thing I've recently noticed is that the Spark user through sparklyr seems to be set to the first person who connects to Spark on the (shared) cluster.

```

library(sparklyr)

sc <- spark_connect(method = "databricks")

DBI::dbGetQuery(sc, 'select current_user() as user')

```

which is not necessarily the same as user identified with Spark SQL in a notebook.

```

%sql

select current_user() as user

```

Is this a bug? Could this be causing Spark connection issues?

0 REPLIES 0

Join Us as a Local Community Builder!

Passionate about hosting events and connecting people? Help us grow a vibrant local communityโ€”sign up today to get started!

Sign Up Now