maz
maz

Reputation: 523

add vertex to dynamodb using DynamoDB Storage Backend for Titan

I build Amazon DynamoDB Storage Backend for Titan.

I used this for build the env - based on template. After the resource was created I saw the dynamodb was created based on dynamodb.properties file.

enter image description here

After the resource was created, I open ssh to Linux EC2 and start bin/gremlin.sh.

I wish to add data to dynamo, so I tried to add vertex by folliwing commands:

    gremlin> bin/gremlin.sh
    gremlin> :remote connect tinkerpop.server conf/remote.yaml
    gremlin> g = TitanFactory.open("/usr/local/packages/dynamodb-titan100-storage-backend-1.0.0-hadoop1/conf/gremlin-server/dynamodb.properties")

gremlin> g.addVertex('date_of_birth').property('date_of_birth','1949-01-01')
vp[date_of_birth->1949-01-01]

but now when I examine my dynamodb table, I see titan_ids was changed, but the data is not clear to read. The 'v' column is still EMPTY, and not contain the vertex property.

How can I solve that issue and see the vertex property in v column?

enter image description here

Upvotes: 0

Views: 147

Answers (1)

Ashraful Islam
Ashraful Islam

Reputation: 12840

Titan Store data in binary format in the storage backend. So you should use gremlin query.

  • To get all the vertex and it's properties :

Example :

gremlin> graph = TinkerFactory.createModern()
==>tinkergraph[vertices:6 edges:6]
gremlin> g = graph.traversal()
gremlin> g.V().valueMap()
==>[name:[marko],age:[29]]
==>[name:[vadas],age:[27]]
==>[name:[lop],lang:[java]]
==>[name:[josh],age:[32]]
==>[name:[ripple],lang:[java]]
==>[name:[peter],age:[35]]

Upvotes: 1

Related Questions