NEW
A traversal-based graph query language and machine used to query and manipulate property graphs.
DESCRIPTION
Gremlin is the graph traversal language of Apache TinkerPop, supporting complex graph queries and analytics over property graphs. It is a functional, data-flow language that can express both OLTP queries and OLAP-style traversals. Gremlin is available across multiple platforms and languages, including JVM-based and Gremlin Server via drivers. It underpins several graph databases, such as Amazon Neptune and JanusGraph, enabling portable graph applications. Gremlin’s step-based traversals provide composability and expressive power for pathfinding, recommendation, and graph pattern matching.
ALTERNATIVE DEFINITIONS
Apache TinkerPop
Gremlin is the graph traversal language of Apache TinkerPop and can be used to express complex graph traversals for both real-time and analytic scenarios.
Official description emphasizing traversal language across OLTP and OLAP.
Amazon Neptune
Gremlin is a graph traversal language used to query and analyze property graph data stored in Amazon Neptune.
Vendor perspective focused on property graph querying in a managed service.
JanusGraph
Gremlin provides a rich, expressive syntax to traverse and manipulate property graphs in JanusGraph.
Highlights expressive traversals and manipulation within a specific database.
RELATED TERMS
Apache TinkerPop Property Graph Graph Database Graph Traversal Amazon Neptune JanusGraph Traversal API Graph Query Language
COMPETING TERMS
KNOWLEDGE AREAS
Data Storage & Operations Data Engineering Semantic & Knowledge Modeling Data Modeling
TARGET AUDIENCE
Data Engineer Data Architect Software Developer
EXTERNAL SOURCES
- Wikipedia - Apache TinkerPop
- Apache TinkerPop - Official Gremlin language overview
- Apache TinkerPop - Gremlin reference documentation
- Amazon Neptune - Gremlin in managed graph DB
TOP QUESTIONS
What is Gremlin used for?
Gremlin is used to query, traverse, and analyze property graphs for applications like recommendations, pathfinding, and fraud detection.
Category: Definition
How does Gremlin compare to Cypher?
Gremlin is traversal-based and multi-model across systems; Cypher is declarative and primarily associated with Neo4j.
Category: Comparison
Is Gremlin vendor-neutral?
Yes, it’s part of Apache TinkerPop and supported by multiple databases, promoting portability.
Category: Clarification
Can Gremlin perform analytics at scale?
Yes, via TinkerPop’s OLAP capabilities and integrations with distributed processing engines.
Category: Capabilities
Which databases support Gremlin?
Examples include Amazon Neptune, JanusGraph, Azure Cosmos DB (Gremlin API), and others.
Category: Ecosystem
What are Gremlin steps?
Steps are composable operations that define traversals, such as filtering, mapping, and branching over graph elements.
Category: Basics
Is Gremlin suitable for transactional workloads?
Yes, it supports OLTP-style queries; ensure underlying database provides appropriate transactional semantics.
Category: Application
How is Gremlin accessed from applications?
Use Gremlin drivers over Gremlin Server or database-specific endpoints across languages like Java, Python, and JavaScript.
Category: HowTo
What is a common mistake when writing Gremlin queries?
Overly complex traversals without indices can degrade performance; design schemas and traversals with indexing in mind.
Category: Mistakes