Skip to content

Commit

Permalink
Add Databricks setup page
Browse files Browse the repository at this point in the history
  • Loading branch information
nvitucci committed Apr 4, 2024
1 parent 96bead5 commit eb9bbac
Show file tree
Hide file tree
Showing 3 changed files with 62 additions and 0 deletions.
1 change: 1 addition & 0 deletions modules/ROOT/nav.adoc
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
* xref::overview.adoc[Project overview]
* xref::quickstart.adoc[Quickstart]
* xref::databricks.adoc[]
* xref::configuration.adoc[Neo4j Spark Connector options and configuration]
* xref::reading.adoc[Reading from Neo4j]
* xref::writing.adoc[Writing to Neo4j]
Expand Down
56 changes: 56 additions & 0 deletions modules/ROOT/pages/databricks.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
= Databricks setup

include::partial$third-party.adoc[]

== Prerequisites

* A Databricks workspace must be available on an URL like `\https://dbc-xxxxxxxx-yyyy.cloud.databricks.com`.

== Set up a compute cluster

. Create a compute cluster with `Single user` access mode, `Unrestricted` policy, and your preferred Scala runtime.
+
[CAUTION]
====
Shared access modes are not currently supported.
====
. Once the cluster is available, open its page and select the *Libraries* tab.
. Select *Install new* and select *Maven* as the library source.
. Install the connector using either of the following methods:
* Copy the coordinates from the xref:overview.adoc#_spark_and_scala_compatibility[overview page] (for example `org.neo4j:neo4j-connector-apache-spark_2.12:{exact-connector-version}_for_spark_3`).
* Select *Search Packages* and search the connector on Maven Central (*not* on Spark Packages).

+
[NOTE]
====
Make sure to select the correct version of the connector by matching both the Scala version and the Spark version to the cluster's runtime.
====

=== Unity Catalog

Neo4j supports the Unity Catalog in `Single user` access mode only.
Refer to the link:https://docs.databricks.com/en/compute/access-mode-limitations.html[Databricks documentation] for further information.

== Session configuration

You can set the Spark configuration on the cluster you are running your notebooks on by doing the following:

. Open the cluster configuration page.
. Select the *Advanced Options* toggle under *Configuration*.
. Select the *Spark* tab.

For example, you can add Neo4j authentication configuration in the text area as follows:

.Bearer authentication example
[source]
----
neo4j.url neo4j://<host>:<port>
neo4j.authentication.type bearer
neo4j.authentication.bearer.token <token>
----

== Authentication methods

All the authentication methods supported by the link:{neo4j-docs-base-uri}/java-manual/current/connect-advanced/#_authentication_methods[Neo4j Java Driver] (version 4.4 and higher) are supported.

See the xref:configuration.adoc#_neo4j_driver_options[Neo4j driver options] for more details on authentication configuration.
5 changes: 5 additions & 0 deletions modules/ROOT/partials/third-party.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[CAUTION]
====
This page includes instructions on the usage of a third-party platform, which may be subject to changes beyond our control.
In case of doubt, refer to the third-party platform documentation.
====

0 comments on commit eb9bbac

Please sign in to comment.