Skip to content

Commit bdaed69

Browse files
authored
Fix bug where default session is not properly being set + small fixes (#89)
There's a bug where the default session is not being recognized and we're instead creating a new session and connecting to the LocalSparkConnectService. We now use a different API to mitigate the issue
1 parent a15e25c commit bdaed69

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

contrib/templates/scala-job/databricks_template_schema.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
},
1111
"artifacts_dest_path": {
1212
"type": "string",
13-
"description": "\nPlease provide the Volumes destination path in Databricks where the directory will be created containing the JAR and other artifacts to store. [example: /Volumes/abcdef1234567890].\nNote: Your admin must allowlist the Volumes JAR path you specify for your workspace (see https://docs.databricks.com/en/data-governance/unity-catalog/manage-privileges/allowlist.html)",
13+
"description": "\nPlease provide the Volumes destination path in Databricks where the directory will be created containing the JAR and other artifacts to store. [example: /Volumes/abcdef1234567890].\nNote: Only when using Standard clusters, your admin must allowlist the Volumes JAR path you specify for your workspace (see https://docs.databricks.com/en/data-governance/unity-catalog/manage-privileges/allowlist.html)",
1414
"order": 2,
1515
"pattern": "^/Volumes(?:/[a-z0-9_-]+)+$",
1616
"pattern_match_failure_message": "Path must be of the form ^/Volumes(?:/[a-z0-9_-]+)+$"

contrib/templates/scala-job/template/{{.project_name}}/src/main/scala/com/examples/Main.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ object Main {
2626
// Get DATABRICKS_RUNTIME_VERSION environment variable
2727
if (sys.env.contains("DATABRICKS_RUNTIME_VERSION")) {
2828
println("Running in a Databricks cluster")
29-
SparkSession.builder().getOrCreate()
29+
SparkSession.active
3030
} else {
3131
println("Running outside Databricks")
3232
DatabricksSession.builder()

0 commit comments

Comments
 (0)