TechnologySeptember 22, 2017

Gremlin Recipes: 2 – SQL to Gremlin

Duy Hai Doan
Duy Hai Doan
Gremlin Recipes: 2 – SQL to Gremlin
gremlin>g. V(). // Iterator<vertex> hasLabel("movie"). // Iterator<movie> valueMap("country","duration","title","year"). // Iterator<map<string, object="">> limit(10) ==>{duration=[104], country=[United States], year=[2003], title=[The Italian Job]} ==>{duration=[111], country=[United States], year=[1998], title=[Great Expectations]} ==>{duration=[160], country=[United States], year=[2007], title=[The Assassination of Jesse James By The Coward Robert Ford]} ==>{duration=[108], country=[United States], year=[1997], title=[Alien Resurrection]} ==>{duration=[175], country=[United States], year=[1954], title=[A Star Is Born]} ==>{duration=[109], country=[United States], year=[1990], title=[Total Recall]} ==>{duration=[127], country=[United States], year=[2012], title=[Life of Pi]} ==>{duration=[84], country=[United States], year=[1950], title=[The Gunfighter]} ==>{duration=[115], country=[United States], year=[2000], title=[Battlefield Earth]} ==>{duration=[108], country=[United States], year=[2004], title=[Eternal Sunshine of the Spotless Mind]}</map<string,></movie></vertex>
Discover more
Gremlin
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.