Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions modules/ROOT/content-nav.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,17 @@ Generic Start
** xref:api/overview.adoc[]
** xref:api/authentication.adoc[]
** link:{neo4j-docs-base-uri}/aura/platform/api/specification/[API Specification]

* *Tutorials*
* Upgrade and migration
** xref:tutorials/migration-free.adoc[]
* Integrating with Neo4j Connectors
** xref:tutorials/spark.adoc[]
** xref:tutorials/bi.adoc[]
* xref:tutorials/performance-improvements.adoc[]
* xref:tutorials/troubleshooting.adoc[]
* xref:tutorials/create-auradb-instance-from-terminal.adoc[]

////
AuraDB End
////
2 changes: 1 addition & 1 deletion modules/ROOT/pages/apoc.adoc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[[aura-apoc-support]]
= APOC support
:descrription: This page lists supported APOC procedures in Neo4j Aura.
:description: This page lists supported APOC procedures in Neo4j Aura.
:page-aliases: platform/apoc.adoc

APOC (Awesome Procedures on Cypher) is a Neo4j library that provides access to additional procedures and functions, extending the use of the Cypher query language. For more information on APOC, see https://neo4j.com/docs/apoc/[the APOC documentation].
Expand Down
88 changes: 88 additions & 0 deletions modules/ROOT/pages/tutorials/bi.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
= Using the Neo4j BI Connector
:page-aliases:platform/tutorials/bi.adoc

In this tutorial we use the Neo4j Connector for BI to read graph data from an Aura instance using some common <<_using_command_line_sql_clients,SQL clients>> and <<_using_bi_tools,BI tools>>.

[CAUTION]
====
This tutorial includes instructions on the usage of third-party software, which may be subject to changes beyond our control.
In case of doubt, refer to the third-party software documentation.
====

== Downloading the connector

Download the connector from the https://neo4j.com/download-center/#integrations[Download Center].
Depending on the SQL client or BI tool it will be used with, you will need either the JDBC or the ODBC connector; see the usage examples for further details.

== Preparing example data

Before trying the connector with any of the listed tools, some data needs to be loaded on Aura.
This can be achieved by running the following Cypher query in the Neo4j Browser:

[source, cypher, subs=attributes+, role=noplay]
----
CREATE
(john:Person {name: "John", surname: "Doe", age: 42}),
(jane:Person {name: "Jane", surname: "Doe", age: 40}),
(john)-[:KNOWS]->(jane)
----

== Using BI tools

Commonly used BI tools include <<_tableau>> (which uses the JDBC driver) and <<_power_bi>> (which uses the ODBC driver).

[TIP]
====
When connecting with a JDBC driver, the `neo4j+s` URI scheme must be changed into `neo4j` and the `SSL=true` parameter must be added to the URL.
====

=== Tableau

[NOTE]
====
This example requires https://www.tableau.com/en-gb/products/desktop[Tableau Desktop].

Refer to the link:https://help.tableau.com/current/pro/desktop/en-us/examples_otherdatabases_jdbc.htm[Tableau documentation] for more information on how to add a JDBC database.
====

After downloading the JDBC Neo4j Connector for BI from the https://neo4j.com/download-center/#integrations[Download Center]:

. Close any running instances of Tableau Desktop.
. Copy the Neo4j driver JAR file into the appropriate Tableau `Drivers` folder.
* Use `C:\Program Files\Tableau\Drivers` on Windows.
* Use `~/Library/Tableau/Drivers` on macOS.
If the folder is not visible, select `Go -> Go to Folder` in Finder to open the folder manually.

. Start Tableau and search for the `Other Databases (JDBC)` option.
. Insert the Aura URL as `jdbc:neo4j://xxxxxxxx.databases.neo4j.io?SSL=true`, leave the SQL dialect as `SQL92`, and complete the relevant credentials.

After the connection is established, you can select the `neo4j` database and the `Node` schema to find the `Person` table.
You can then explore the table to find the example data.

==== Troubleshooting

If the connection fails with a `Generic JDBC connection error`, check if you installed the Neo4j driver in the correct location and then:

* Download the `SSL.com` root certificates as explained on link:https://www.ssl.com/how-to/install-ssl-com-ca-root-certificates/[ssl.com] and install them as shown in the link:https://help.tableau.com/current/pro/desktop/en-us/jdbc_ssl_config.htm[Tableau documentation], then restart Tableau and repeat the previous steps (recommended option).
* Add `&sslTrustStrategy=TRUST_ALL_CERTIFICATES` to the connection string (after `SSL=true`) and try to connect again.
**This option requires caution and should not be used in a production environment**.

=== Power BI

[NOTE]
====
This example requires Microsoft Windows and https://powerbi.microsoft.com/en-us/desktop/[Power BI Desktop].

Refer to the link:https://docs.microsoft.com/en-us/power-bi/connect-data/desktop-connect-using-generic-interfaces[Power BI documentation] for more information on how to add an ODBC database.
====

After downloading and installing the ODBC Neo4j Connector for BI from the https://neo4j.com/download-center/#integrations[Download Center]:

. Open Power BI Desktop.
. Search for `ODBC` in the *Get data from another source* panel.
. Select `Simba Neo4j` in the *DSN dropdown* menu.
. Insert the connection string `Host=xxxxxxxx.databases.neo4j.io;SSL=1` in the *Advanced options* section.
. Insert your username and password.

Once connected, open sequentially `ODBC` -> `neo4j` -> `Node` -> `Person` in the *Navigator* window to see a preview of the table.

114 changes: 114 additions & 0 deletions modules/ROOT/pages/tutorials/create-auradb-instance-from-terminal.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,114 @@
[[create-auradb-instance-in-terminal]]
= Create an AuraDB instance in the terminal
:description: This tutorial describes using the terminal to create an instance in the Aura Console.
:page-aliases:platform/tutorials/create-auradb-instance-from-terminal.adoc

This tutorial describes using the terminal to create an instance in the Aura Console.

== Preparation

=== Generate API credentials

* Log in to the Aura Console.
* Click your email address in the top right corner and select *Account details*.
* In the *API credentials* section, select *Create*.
Enter a descriptive name and save the generated Client ID and Client Secret.

=== cURL
* Install cURL via your terminal
* For macOS with Homebrew: use `brew install curl`.
* Install cURL.
See link:https://curl.se/dlwiz/[curl download wizard] for more information.
* Check cURL is available: Type `curl -V` in the terminal

== Obtain a bearer token

[NOTE]
====
Bearer tokens are valid for one hour.
====

In the terminal paste the snippet, replacing `YOUR_CLIENT_ID` and `YOUR_CLIENT_SECRET` with the values generated by the Aura Console.
Keep the `:` between the values.

[source, cURL]
----
curl --location 'https://api.neo4j.io/oauth/token' --header 'Content-Type: application/x-www-form-urlencoded' --data-urlencode 'grant_type=client_credentials' -u 'YOUR_CLIENT_ID:YOUR_CLIENT_SECRET' -v
----

=== Response body example

Save the `access_token` from the end of the returned code.
This is your bearer token.
It looks similar to this example:

[source, cURL]
----
"access_token":"eyJ1c3IiOiJkNzI2MzE1My03MWZmLTUxMjQtOWVjYy1lOGFlM2FjNjNjZWUiLCJpc3MiOiJodHRwczovL2F1cmEtYXBpLmV1LmF1dGgwLmNvbS8iLCJzdWIiOiJFSDdsRTgwbEhWQVVkbDVHUUpEY0M1VDdxZ3BNTnpqVkBjbGllbnRzIiwiYXVkIjoiaHR0cHM6Ly9jb25zb2xlLm5lbzRqLmlvIiwiaWF0IjoxNzAyOTgzODQzLCJleHAiOjE3MDI5ODc0NDMsImF6cCI6IkVIN2xFODBsSFZBVWRsNUdRSkRjQzVUN3FncE1OempWIiwiZ3R5IjoiY2xpZW50LWNyZWRlbnRpYWxzIn0eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6ImFKbWhtUTlYeExsQmFLdHNuZnJIcCJ9..jkpatG4SCRnxwTPzfEcSJk3Yyd0u_NMH8epNqmSBMUlp_JvvqbKpNdkPIE6vx5hLRgVCVKovxl4KY9yzEkr7R5s4YU3s2K25eNB1q1y3yQ_-9N0e6eOhmjIrsWHMd_rl2NuGIHo6pHihumuJlEg-U2ELkWyu8Iz3zQxjycVnPHzlbu7sbtwVJdU7UzgO12jgDLA1T4mUqvxdAAdnoXO57SwczYoYKY2YL61CMTn-xdQ6MFS8A3vwpGQbRirwVVxvEmoIPCLlQwHeEC4_modJ4cifmjt6ChJb1sxsRpFvdNHm0vNcLjy-96e88D50AMgjvS4VQCmVKA7kUgt7t5IpKg","expires_in":3600,"token_type":"Bearer"
----

== Obtain the project ID

Use cURL to obtain the project ID with your token.
Replace `YOUR_BEARER_TOKEN` with your token.

[source, cURL]
----
curl --location 'https://api.neo4j.io/v1/projects' --header 'Accept: application/json' --header 'Authorization: Bearer YOUR_BEARER_TOKEN'
----

This returns something similar to:

[source, cURL]
----
{"data":[{"id":"6e6bbbe2-5678-5f8a-1234-b1f62f08b98f","name":"team1"},{"id":"ad69ee24-1234-5678-af02-ff8d3cc23611","name":"team2"}]}
----

In the example response above, two projects are returned.
If you're a member of multiple projects, select the one you wish to use.

[NOTE]
====
_Project_ replaces _Tenant_ in the console UI and documentation.
However, in the API, `tenant` remains the nomenclature.
====

== Configure an AuraDB instance

=== Configure the instance values

Use the bearer token and Project ID to create the Aura instance.
Replace `YOUR_BEARER_TOKEN` with your token.
Replace `YOUR_PROJECT_ID` with your project ID.

The following values are customizable `version`, `region`, `memory`, `name`, `type`, `tenant_id`, and `cloud_provider`.


[source, cURL]
----
curl --location 'https://api.neo4j.io/v1/instances' --header 'Content-Type: application/json' --header 'Accept: application/json' --header 'Authorization: Bearer YOUR_BEARER_TOKEN' --data ' { "version": "5", "region": "europe-west1", "memory": "8GB", "name": "instance01", "type": "enterprise-db", "tenant_id": "YOUR_PROJECT_ID", "cloud_provider": "gcp" }'
----
See xref:api/overview.adoc[Aura API documentation] for more details.

[CAUTION]
====
The legacy term `Enterprise` is still used within the codebase and API.
However, in the Aura console and documentation, the AuraDB Enterprise project type is now known as AuraDB Virtual Dedicated Cloud.
====

At this point, an Aura instance is provisioned in the Aura Console.
Optionally, use this code in the terminal to check the status:

[source, cURL]
----
curl --location 'https://api.neo4j.io/v1/instances/YOUR_INSTANCE_ID' --header 'Accept: application/json' --header 'Authorization: Bearer YOUR_BEARER_TOKEN'
----

*Response*

[source, cURL]
----
curl --location 'https://api.neo4j.io/v1/instances/YOUR_INSTANCE_ID' --header 'Accept: application/json' --header 'Authorization: Bearer YOUR_BEARER_TOKEN'
----

If the value of `status` shows `running`, you can start using the new Aura instance.
89 changes: 89 additions & 0 deletions modules/ROOT/pages/tutorials/migration-free.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
= Migrating your Neo4j AuraDB Free instance to another AuraDB plan
:description: This section describes migrating your Neo4j AuraDB Free Instance to another AuraDB plan
:page-aliases:platform/tutorials/migration-free.adoc

== AuraDB Professional or AuraDB Virtual Dedicated Cloud

Upgrading your plan to AuraDB Professional or AuraDB Virtual Dedicated Cloud gives you access to additional resources and functionalities to support production workloads and applications with demanding storage and processing needs.

*Migration options*

* Upgrade to AuraDB Professional
* Clone to new (Works for AuraDB Professional and AuraDS Professional)
* Manual process

== Upgrade to AuraDB Professional

You can upgrade an instance to the Professional plan directly from the console.

On the instance card, click the button that says *Upgrade*.

Verify that the cloud provider and region are correct and select the instance size you need, add the extra details and select *Create*.

== Clone (Works for AuraDB Professional and AuraDS)

The other way is to _clone_ your existing instance to the Professional plan.

* Click the three dots (*...*) on an instance card
* Select either: *Clone to new instance* or create a new *Clone to existing instance* (the current content will be overwritten)

== Manual process

In your existing instance:

. (Optional but recommended) Capture existing index and constraint definitions:
.. Run the following Cypher statement:
+
[source,cypher]
----
SHOW CONSTRAINTS YIELD createStatement
----
+
Save result to a file, to use later in the process.
.. Run the following Cypher statement:
+
[source,cypher]
----
SHOW INDEXES YIELD createStatement
----
+
Save result to a file, to use later in the process.

. (Optional but recommended) Drop the indexes and constraints.
.. Run the following Cypher statement to generate the commands to drop existing constraints:
+
[source,cypher]
----
SHOW CONSTRAINTS YIELD name
RETURN 'DROP CONSTRAINT ' + name + ';'
----
.. Execute the generated commands to drop existing constraints.
.. Run the following Cypher statement to generate the commands to drop existing indexes:
+
[source,cypher]
----
SHOW INDEX YIELD name
RETURN 'DROP INDEX ' + name + ';'
----
.. Execute the generated commands to drop existing indexes.
+
For more information about indexes and constrains, see link:{neo4j-docs-base-uri}/cypher-manual/current/indexes/[Cypher Manual -> Indexes] and link:{neo4j-docs-base-uri}/cypher-manual/current/constraints/[Cypher Manual -> Constraints].
+
. In the console of your existing instance (AuraDB Free), do the following:

.. Download snapshot/Dump locally (the daily automatic snapshot)
.. In the Aura Console select the AuraDB instance
.. Go to the *Snapshots* tab
.. Click the *three dots*, and select *Export*
.. Save the dump file locally (preserve the .backup extension)
+
. Then create a new AuraDB instance in AuraDB Professional or AuraDB Virtual Dedicated Cloud with the right resource sizing.
From your new instance, do the following:

.. Go to the instance card
.. Select *Backup & Restore*
.. Upload your .backup file
+
. In the newly created AuraDB Professional or AuraDB Virtual Dedicated Cloud instance
+
(Optional) Once the AuraDB instance is loaded and started, you can recreate the indexes and constraints, using the information captured earlier in the process.
Loading