Skip to content

Commit

Permalink
Merge pull request #4 from aws-samples/issue_3
Browse files Browse the repository at this point in the history
Updated to add data files and updates for IAM authentication. Closes …
  • Loading branch information
beebs-systap committed Aug 27, 2018
2 parents 8790381 + 1752bed commit 3bca84d
Show file tree
Hide file tree
Showing 3 changed files with 55 additions and 10 deletions.
20 changes: 10 additions & 10 deletions gremlin/collaborative-filtering/README.md
Expand Up @@ -6,12 +6,15 @@ This example is a gremlin tutorial that shows how to explore the graph with samp

This tutorial assumes you already have your environment setup. To setup a new environment, create an Amazon Neptune Cluster.

See the following links on how to create an Amazon Neptune Cluster for Gremlin:
See the following links on how to create an Amazon Neptune Cluster for Gremlin and setup IAM authentication:

* https://docs.aws.amazon.com/neptune/latest/userguide/get-started-CreateInstance-Console.html
* https://docs.aws.amazon.com/neptune/latest/userguide/bulk-load-tutorial-IAM.html
* https://docs.aws.amazon.com/neptune/latest/userguide/bulk-load.html
* https://docs.aws.amazon.com/neptune/latest/userguide/bulk-load-tutorial-format-gremlin.html

You will also need to load the data [files](data/) into an S3 bucket.


## Use Case

Expand All @@ -31,9 +34,8 @@ curl -X POST \
-H 'Content-Type: application/json' \
http://your-neptune-endpoint:8182/loader -d '
{
"source" : "s3://neptune-data-ml/recommendation/vertex.txt",
"accessKey" : "",
"secretKey" : "",
"source" : "s3://your-s3-bucket/vertex.txt",
"iamRoleArn" : "arn:aws:iam::account-id:role/role-name",
"format" : "csv",
"region" : "us-east-1",
"failOnError" : "FALSE"
Expand All @@ -46,9 +48,8 @@ curl -X POST \
-H 'Content-Type: application/json' \
http://your-neptune-endpoint:8182/loader -d '
{
"source" : "s3://neptune-data-ml/recommendation/edges.txt",
"accessKey" : "",
"secretKey" : "",
"source" : "s3://your-s3-bucket/recommendation/edges.txt",
"iamRoleArn" : "arn:aws:iam::account-id:role/role-name",
"format" : "csv",
"region" : "us-east-1",
"failOnError" : "FALSE"
Expand All @@ -61,9 +62,8 @@ curl -X POST \
-H 'Content-Type: application/json' \
http://your-neptune-endpoint:8182/loader -d '
{
"source" : "s3://neptune-data-ml/recommendation/",
"accessKey" : "",
"secretKey" : "",
"source" : "s3://your-s3-bucket/",
"iamRoleArn" : "arn:aws:iam::account-id:role/role-name",
"format" : "csv",
"region" : "us-east-1",
"failOnError" : "FALSE"
Expand Down
27 changes: 27 additions & 0 deletions gremlin/collaborative-filtering/data/edges.txt
@@ -0,0 +1,27 @@
~id, ~from, ~to, ~label, weight:Double
e1, Luke, HorizonZeroDawn, likes, 0.1
e2, Luke, GranTurismoSport, likes, 0.4
e3, Luke, Ratchet&Clank, likes, 0.9
e4, Luke, Fifa18, likes, 0.1
e5, Luke, GravityRush, likes, 0.3
e6, Mike, Nioh, likes, 0.7
e7, Mike, TombRaider, likes, 0.9
e8, Mike, CallOfDutyBO4, likes, 0.9
e9, Mike, GranTurismoSport, likes, 0.9
e10, Mike, HorizonZeroDawn, likes, 0.6
e11, Lina, Ratchet&Clank, likes, 0.7
e12, Lina, GravityRush, likes, 0.1
e13, Lina, Knack, likes, 0.2
e14, Lina, TombRaider, likes, 0.2
e15, Emma, Knack, likes, 0.5
e16, Emma, Ratchet&Clank, likes, 0.6
e17, Luke, Mario+Rabbids, likes, 0.8
e18, Mike, Mario+Rabbids, likes, 0.7
e19, Mike, ARMS, likes, 0.3
e20, Luke, ARMS, likes, 0.5
e21, Luke, MarioKart8, likes, 0.4
e22, Mike, MarioKart8, likes, 0.7
e23, Lina, MarioKart8, likes, 0.8
e24, Lina, SuperMarioOdyssey, likes, 0.4
e25, Luke, SuperMarioOdyssey, likes, 0.7
e26, Mike, SuperMarioOdyssey, likes, 0.8
18 changes: 18 additions & 0 deletions gremlin/collaborative-filtering/data/vertex.txt
@@ -0,0 +1,18 @@
~id,~label,GamerAlias:String,ReleaseDate:Date,GameGenre:String,ESRBRating:String,Developer:String,Platform:String,GameTitle:String
Luke,person,skywalker123
Emma,person,smiles007
Lina,person,bringit32
Mike,person,forchinet
HorizonZeroDawn,game,,2017-02-28,Adventure,E,Guerrilla Games,PS4,HorizonZeroDawn
GranTurismoSport,game,,2017-10-17,Racing,E,Sony Interactive Entertainment,PS4,GranTurismoSport
Ratchet&Clank,game,,2016-02-17,Adventure,T,Insomniac Games,PS4,Ratchet&Clank
Fifa18,game,,2017-09-29,Sports,E,Electronic Arts,PS4,Fifa18
GravityRush,game,,2012-02-09,Shooter,E,Project Siren, PS4,GravityRush
Nioh,game,,2017-02-07,Action,T,Team Ninja,PS4,Nioh
TombRaider,game,,2016-10-11,Action,T,Square Enix,PS4,TombRaider
CallOfDutyBO4,game,,2018-10-12,Shooter,M,Activision,PS4,CallOfDutyBO4
Knack,game,,2013-11-15,Adventure,E,Sony Interactive Entertainment,PS4,Knack
SuperMarioOdyssey,game,,2017-10-27,Adventure,E,Nintendo,Switch,SuperMarioOdyssey
MarioKart8,game,,2017-4-28,Racing,E,Nintendo,Switch,MarioKart8
ARMS,game,,2017-06-16,Action,E,Nintendo,Switch,ARMs
Mario+Rabbids,game,,2017-08-29,Adventure,E,Ubisoft,Switch,Mario+Rabbids

0 comments on commit 3bca84d

Please sign in to comment.