In this lesson, you will learn how to create your first card in Neo4j Aura Dashboards, using the natural language AI assistant or by writing Cypher queries.
You will learn how to:
-
Connect to your Aura instance using the integrated Query tool.
-
Create a new dashboard page.
-
Create your first card using a Cypher query.
Optionally, you can dive into writing Cypher queries to fetch and visualize data, providing more control over the data displayed in your cards.
Connecting
Before you start, make sure you have completed the previous lesson and imported the sample data into your Aura instance. NOTE: The sample data should be loaded into your Aura instance using the provided Cypher script, not the Import service.
If you haven’t done that yet, go back to lesson 2 - Accessing Aura Dashboards and follow the steps to import the data.
Open the Aura console and select the instance you want to connect to. Make a note of the number of nodes and relationships in the database, as you might need to create advanced filters to work with larger datasets.
You can also connect to the instance directly from the Aura console by adding the credentials in the connection dialog:
Before you select Query, check that you’ve loaded the data from the previous lesson.
Querying
Start by exploring the database details. Copy the following query into the Cypher editor: Click on the labels and relationship types under Database Information to see the number of nodes and relationships in the database.
Copy the following Cypher query into the query editor:
MATCH (p:Person)-[r:ACTED_IN]->(m:Movie)
WHERE p.name = 'Tom Hanks'
RETURN p,r,m
Use the Run button or press Ctrl+Enter to execute the query.
If you want to change the styling of the results, click on the labels in the Results overview and make changes according to your preferences.
Creating a new dashboard page
For this lesson, you will create a new dashboard page to add your first card.
If you have not created any dashboards yet, you need to select Create from scratch to start building your first dashboard page:
If you have already exceeded the dashboards limit for your tier, creating a new dashboard page will prompt you to upgrade your tier.
You can either delete an existing dashboard or alternatively keep working on an existing dashboard.
To create a new dashboard page, go to the Dashboards menu and click on the New page button:
Give your dashboard a meaningful name, such as "Stakeholders view", or "Practice dashboard", and click Create.
You can also edit your dashboard’s name later by clicking on the title in the dashboard editor:
The name editor allows you to change the dashboard name at any time. Use a descriptive name that reflects the purpose of the dashboard for easier identification later on:
Creating your first card
In this section, you will create your first card using the integrated query tool.
From your newly created dashboard, click on the Create from Scratch and Add a card button to open the card editor:
Use the card editor to describe the card properties:
Create a card that shows which movies Tom Hanks has acted in, using the following Cypher query.
Copy and paste the query into the Query field:
MATCH (p:Person)-[r:ACTED_IN]->(m:Movie)
WHERE p.name = 'Tom Hanks'
RETURN p,r,mCheck your understanding
Purpose of the Create from scratch option
What is the purpose of the Create from scratch option in the Dashboards menu?
-
❏ To create a new dashboard using pre-defined templates.
-
✓ To create a new dashboard page from an empty canvas.
-
❏ To duplicate an existing dashboard.
-
❏ To import dashboards from external sources.
Hint
The Create from scratch option allows users to start with a blank canvas, providing full control over the layout and content of the dashboard page.
Solution
The Create from scratch option in the Dashboards menu is used to create a new dashboard page from an empty canvas, allowing users to design their dashboard layout and add components as needed.
Summary
TIP: In this lesson you learned how to use the integrated Query tool in the Aura console to connect to your database instance, execute Cypher queries, and visualize the results.
In the next lesson, you will learn a different way to explore your data by analysing aggregated metrics.