From eb9bbaca68cfffa53c64f532a773ad849cf19b77 Mon Sep 17 00:00:00 2001 From: Nicola Vitucci Date: Thu, 4 Apr 2024 11:19:15 +0100 Subject: [PATCH] Add Databricks setup page --- modules/ROOT/nav.adoc | 1 + modules/ROOT/pages/databricks.adoc | 56 ++++++++++++++++++++++++++ modules/ROOT/partials/third-party.adoc | 5 +++ 3 files changed, 62 insertions(+) create mode 100644 modules/ROOT/pages/databricks.adoc create mode 100644 modules/ROOT/partials/third-party.adoc diff --git a/modules/ROOT/nav.adoc b/modules/ROOT/nav.adoc index dd6c20a..da69dba 100644 --- a/modules/ROOT/nav.adoc +++ b/modules/ROOT/nav.adoc @@ -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] diff --git a/modules/ROOT/pages/databricks.adoc b/modules/ROOT/pages/databricks.adoc new file mode 100644 index 0000000..a686e17 --- /dev/null +++ b/modules/ROOT/pages/databricks.adoc @@ -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://: +neo4j.authentication.type bearer +neo4j.authentication.bearer.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. diff --git a/modules/ROOT/partials/third-party.adoc b/modules/ROOT/partials/third-party.adoc new file mode 100644 index 0000000..d4eeae2 --- /dev/null +++ b/modules/ROOT/partials/third-party.adoc @@ -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. +==== \ No newline at end of file