TechnologyMarch 6, 2018

Gremlin DSLs In .NET With DSE Graph

Stephen Mallette
Stephen Mallette
Gremlin DSLs In .NET With DSE Graph
g.V().Has("movie","title","Young Guns"). ValueMap(true)
g.V().Has("movie","title","Young Guns"). ValueMap(true, "title", "year")
{ "year": [ 1988 ], "label": "movie", "id": { "member_id": 431, "community_id": 148705792, "~label": "movie" }, "title": [ "Young Guns" ] }
g.V().Has("movie", "title", "Young Guns"). Map(ValueMap(true,"title","year"). Unfold(). Group(). By(Keys). By(Choose(Select(Column.Keys).Is(T.Id), Select(Column.Values), Select(Column.Values).Unfold())))
{ "year": 1988, "label": "movie", "id": { "member_id": 431, "community_id": 148705792, "~label": "movie" }, "title": "Young Guns" }
g.V().Has("movie", "title", "Young Guns"). Project("title","year","id","label"). By("title"). By("year"). By(T.Id). By(T.Label))
killr.Movies("Young Guns"). Enrich(true, Keys("title", "year"), Degree())
public static GraphTraversal> Enrich(this GraphTraversal<vertex,vertex> t, params object[] args)</vertex,vertex>
killr.Movies("Young Guns"). Enrich(Id, Label, "title", "year", Degree())
IDseCluster cluster = DseCluster.Builder(). AddContactPoint("127.0.0.1"). WithGraphOptions(new GraphOptions().SetName("killrvideo")). Build(); IDseSession session = cluster.Connect(); var killr = DseGraph.Traversal(session);
Discover more
GremlinDataStax EnterpriseDSE GraphC# / .NET
Share

One-stop Data API for Production GenAI

Astra DB gives JavaScript developers a complete data API and out-of-the-box integrations that make it easier to build production RAG apps with high relevancy and low latency.