Skip to content

Latest commit

 

History

History
131 lines (85 loc) · 3.75 KB

graph_databases.md

File metadata and controls

131 lines (85 loc) · 3.75 KB

🎓🔥 Graph Database practice

This is an optional part that is normally left as an exercise for the reader, to offer a hands-on learning experience on Graph Databases using DataStax Graph and DataStax Studio.

Note: as opposed to the rest of today's pratice, this needs to be done on your own machine.

✅ 5a. Prerequisites

Minimal Configuration: You need to have a computer with this minimal configuration requirements

  • At least 2CPU
  • At least 6GB or RAM

Install Docker and Docker Compose

You need to install Docker and Docker-compose on your machine

✅ 5b. Create a docker network named 'graph'

docker network create graph

🖥️ Expected output

$workshop_introduction_to_nosql> docker network create graph

64f8bcc2dda416d6dc80ef3c1ac97902b9d90007842808308e9d741d179d9344

✅ 5c.Clone this repository (or download ZIP from the github UI)

git clone https://github.com/datastaxdevs/workshop-introduction-to-nosql.git

cd workshop-introduction-to-nosql

✅ 5d.Start the containers

⚠️ Linux users:

Folder datastax-studio-config is mapped to docker container (see: docker-compose.yaml file) and dse studio runs as user studio with uid=997 and >gui=997 which needs RW access to that folder.

Run this command if you are on a linux system:

sudo chown -R 997:997 ./datastax-studio-config

⚠️ Linux users:

:📝 Note for Windows users:

Start the studio image without a volume. Remove these 2 lines above networks in studio (see: docker-compose.yaml file)

volumes:
   - "./datastax-studio-config:/var/lib/datastax-studio"

:📝 Note for Windows users:

Start containers:

docker-compose up -d

🖥️ Expected output

$workshop_introduction_to_nosql> docker-compose up -d

Creating dse ... done
Creating workshop-introduction-to-nosql_studio_1 ... done

Wait for the application to start (30s) and open http://localhost:9091

image

✅ 5e.Check database connection

Open the ellipsis and click Connections

image

Select the default localhost connection

image

Check that dse is set for the host (pointing to a local cassandra)

image

Click the button Test and expect the output Connected Successfully

image

✅ 5f. Open the notebook Work

Use the ellipsis to now select Notebooks

image

Once the notebook opens it asks you to create the graph: click the Create Graph button (and leave all settings to default)

image

Execute cell after cell spotting the Real Time > button in each cell (top right)

image

Voila !

image

✅ 5g. Close Notebook

To close open notebooks you can now use

docker-compose down

🖥️ Expected output

$workshop_introduction_to_nosql> docker-compose down
Stopping workshop-introduction-to-nosql_studio_1 ... done
Stopping dse                                     ... 

Congratulations, you completed the Graph Database practice!

Back to main README.