- Lab
- A Cloud Guru
Loading and Retrieving Data in Neptune
In this lab, you will load data from an S3 bucket into an existing Neptune instance using the bulk load feature. This is far more efficient than executing a large number of `INSERT` statements, `addVertex`, and `addEdge` steps, or other API calls. The Neptune instance will be available when you start the lab. However, you will need to create an IAM role and an S3 bucket, so prior knowledge of the IAM and S3 services are suggested.
Path Info
Table of Contents
-
Challenge
Create an S3 Bucket and Grant Access
- In the AWS Management Console, navigate to S3.
- Visit this lab's GitHub repo and download the neptune-data.rdf file to your local machine.
- Create a S3 bucket with the following parameters:
- Bucket name: neptune-import<INSERT_CURRENT_DATE_HERE>
- Region: US East (N. Virginia)
- Copy the S3 bucket name into a text file for later use.
- Upload the neptune-data.rdf from your local machine.
- Create an IAM Role called neptune-import with AmazonS3ReadOnlyAccess permissions.
- Edit trust relationship for neptune-import and add the rds.amazonaws.com service.
- Add the neptune-import role to your
neptune-cluster
.
-
Challenge
Load the Data
- In the AWS Management Console, navigate to VPC.
- Create an Endpoint for the S3 service using "com.amazonaws.us-east-1.s3" and use the Route Table ID with two subnets.
- Copy the
neptune-import
role ARN into a text file for later use. - Copy the
neptune-cluster
endpoint and port number into a text file for later use. - In your local terminal, connect to the lab instance using the provided lab credentials.
- Save the neptune-import endpoint URL as an environment variable.
- Use
curl
to submit the upload, adding your unique role ARN toiamRoleArn
and unique bucket name tosource
. If successful,200 OK
status will appear. - Copy the loadID (from the
200 OK
message) to monitor the job.
-
Challenge
Query the Data
- Download the RDF4J client.
- Extract the client.
- Create a SPARQL repo. Be sure to include your Neptune endpoint and append
:8182/sparql
at the end. - Open the repo to view the submitted S3 bucket data.
- Query the data.
What's a lab?
Hands-on Labs are real environments created by industry experts to help you learn. These environments help you gain knowledge and experience, practice without compromising your system, test without risk, destroy without fear, and let you learn from your mistakes. Hands-on Labs: practice your skills before delivering in the real world.
Provided environment for hands-on practice
We will provide the credentials and environment necessary for you to practice right within your browser.
Guided walkthrough
Follow along with the author’s guided walkthrough and build something new in your provided environment!
Did you know?
On average, you retain 75% more of your learning if you get time for practice.