- What's New
- Service Overview
- Billing
- Getting Started
-
User Guide
- GES Overview
- Preparations
- Permissions Management
- Metadata Operations
- Creating Graphs
-
Managing Graphs
- Graph Management Overview
- Viewing a Failed Graph
- Backing Up and Restoring Graphs
- Upgrading a Graph
- Rolling Back a Graph
- Exporting a Graph
- Restarting a Graph
- Resizing a Graph
- Expanding a Graph
- Binding and Unbinding an EIP
- Clearing Data
- Deleting a Graph
- Viewing Monitoring Metrics
- Querying Schema
- Connecting GES to LTS
- Changing a Security Group
- Changing the Security Mode
- Data Migration
-
Accessing and Analyzing Graph Data
- Accessing an Infinite Graph
- Graph Editor
- Accessing the Graph Editor
- Dynamic Graphs
- Graph Exploration
- Multi-Graph Management (Database Edition)
- HyG Graph Management (Database Edition)
- Adding Custom Operations
- Editing Schema
- Hiding Sensitive Information About a Graph
- Visual Query
- Canvas Snapshot
- Gremlin Query
- Cypher Query
- DSL Query
- Analyzing Graphs Using Algorithms
- Managing Indexes
- Analyzing Graphs on the Canvas
- Graph Display in 3D View
- Filter Criteria
- Editing Properties
- Statistics Display
- Check Running Records
- Viewing Query Results
- Viewing Graph Tasks
- Configuring Permissions
- O&M Monitoring
- Package Management
- Algorithms
-
Developer Guide
- Overview
- Using the Management Plane SDK
-
Using the Service Plane SDK
- Downloading and Installing the SDK
- Obtaining Initialization Parameters
- Java SDK
- Python SDK
- Using Cypher JDBC Driver to Access GES
-
API Reference
- Before You Start
- API Overview
- Calling APIs
-
Management Plane APIs (V2)
- System Management
-
Graph Management
- Listing Graphs (2.1.18)
- Querying Graph Details (1.0.0)
- Creating a Graph (2.2.2)
- Stopping a Graph (1.0.0)
- Starting a Graph (1.0.0)
- Deleting a Graph (1.0.0)
- Incrementally Importing Data to a Graph (2.1.14)
- Exporting a Graph (1.0.5)
- Clearing a Graph(2.1.2)
- Upgrading a Graph (1.0.5)
- Binding an EIP (1.0.6)
- Unbinding an EIP(1.0.6)
- Changing Size (2.2.21)
- Forcibly Restarting a Graph (2.2.21)
- Expanding a Graph (2.2.23)
- Changing the Security Group (2.4.3)
- Backup Management
- Metadata Management
- Task Center
- Plugin Management
-
Service Plane APIs
-
Memory Edition
-
Vertex Operation APIs
- Querying Vertices That Meet Filter Criteria (1.0.0)
- Querying Vertex Details (1.0.0)
- Adding a Vertex (1.0.6)
- Deleting a Vertex (1.0.6)
- Updating Vertex Properties (1.1.6)
- Batch Querying Vertex Data (1.1.9)
- Batch Adding Vertices (2.1.16)
- Batch Deleting Vertices (2.1.9)
- Batch Updating Vertex Properties (2.1.10)
- Adding a Vertex Label (1.1.6)
- Deleting a Vertex Label (1.1.6)
- Exporting Filtered Vertices (2.2.7)
- Deleting Filtered Vertices (2.2.7)
-
Edge Operation APIs
- Querying Edges That Meet Filter Criteria (1.0.0)
- Querying Edge Details (1.0.0)
- Adding an Edge (2.1.2)
- Deleting an Edge (1.0.6)
- Updating Edge Properties (1.1.6)
- Batch Querying Edge Data (1.1.6)
- Batch Adding Edges (2.1.16)
- Batch Deleting Edges (2.1.9)
- Batch Updating Edge Properties (2.1.10)
- Exporting Filtered Edges (2.2.7)
- Deleting Filtered Edges (2.2.7)
- Metadata Operation APIs
- Index Operation APIs
- Gremlin Operation APIs
-
Algorithm APIs
- Running Algorithms (1.0.0)
-
Algorithm API Parameter References
- Common Algorithm Parameters
- PageRank (1.0.0)
- PersonalRank (1.0.0)
- K-core (1.0.0)
- K-hop (1.0.0)
- Common Neighbors (1.0.0)
- Common Neighbors of Vertex Sets (2.2.13)
- Link Prediction (1.0.0)
- Shortest Path (2.1.5)
- All Shortest Paths (1.0.12)
- Filtered Shortest Path (2.2.4)
- SSSP (1.0.0)
- Shortest Path of Vertex Sets (2.1.5)
- n-Paths (1.1.2)
- Filtered n-Paths (2.2.22)
- Filtered All Pairs Shortest Paths (2.2.17)
- All Shortest Paths of Vertex Sets (2.2.15)
- Filtered All Shortest Paths (2.2.17)
- Connected Component (1.0.0)
- Label Propagation (2.1.8)
- Louvain (2.2.1)
- Node2vec (1.0.5)
- Real-time Recommendation (2.2.21)
- Degree Correlation (1.0.0)
- Triangle Count (1.0.0)
- Cluster Coefficient (1.0.0)
- Closeness Centrality (1.0.0)
- Betweenness Centrality (2.2.4)
- Edge Betweenness Centrality (2.2.4)
- Origin-Destination Betweenness Centrality (2.2.4)
- Circle Detection with a Single Vertex (2.2.4)
- Filtered Circle Detection (2.2.15)
- Subgraph Matching (2.2.16)
- Topicrank (2.2.20)
- Temporal Graph APIs
- Path APIs
- Graph Statistics APIs
- Graph Operation APIs
- Subgraph Operation APIs
- Job Management APIs
- Custom Operations APIs
- Cypher Queries (2.2.16)
- Filtered Query (2.2.13)
- Filtered Query V2 (2.3.6)
- Domain-Specific Language (DSL) Query APIs (2.3.14)
- Updating Specified Properties of Vertices and Edges by Importing a File (2.2.13)
- Deleting Vertices and Edges by Files (2.2.15)
- O&M Monitoring APIs
-
Vertex Operation APIs
-
Database Edition
- Specification Description
- Vertex Operation APIs
- Edge Operation APIs
- Metadata Operation APIs
- Index Operation APIs
- HyG Graph Management APIs
-
HyG Algorithm APIs
- Running Algorithms
-
Algorithm API Parameter Reference
- Common Algorithm Parameters
- PageRank
- PersonalRank
- K-core
- K-Hop
- Common Neighbors of Vertex Sets
- Shortest Path
- All Shortest Paths
- All Pairs Shortest Paths
- SSSP
- Shortest Path of Vertex Sets
- All Shortest Paths of Vertex Sets
- Connected Component
- Triangle Count
- Closeness Centrality
- Betweenness Centrality
- Edge Betweenness Centrality
- Origin-Destination Betweenness Centrality
- Circle Detection with a Single Vertex
- TopicRank
- Louvain
- Bigclam
- Cesna
- Infomap
- Label Propagation
- Subgraph Matching
- Link Prediction
- n Paths
- Cluster Coefficient
- Maximum Common Connected Induced Subgraph (MCCIS)
- Algorithm Results in TXT Format
- Executing the DSL Algorithm
- DSL Syntax
- HyG Job Management APIs
- Native Algorithm APIs
- Graph Statistics APIs
- Graph Operation APIs
- Job Management APIs
- Cypher Operation APIs
- Interactive Transaction APIs
- O&M Monitoring APIs
-
Memory Edition
- Application Examples
- Permissions Policies and Supported Actions
- GES Metrics on Cloud Eye
-
Out-of-Date APIs
-
Management Plane APIs (V1)
- System Management APIs
-
Graph Management APIs
- Querying the Graph List (2.1.18)
- Querying Graph Details (1.0.0)
- Creating a Graph (2.2.2)
- Stopping a Graph (1.0.0)
- Starting a Graph (1.0.0)
- Deleting a Graph (1.0.0)
- Incrementally Importing Data to Graphs (2.1.14)
- Exporting a Graph (1.0.5)
- Clearing a Graph(2.1.2)
- Upgrading a Graph (1.0.5)
- Binding an EIP (1.0.6)
- Unbinding an EIP(1.0.6)
- Resizing a Graph (2.2.21)
- Forcibly Restarting a Graph (2.2.21)
- Expanding a Graph (2.2.23)
- Backup Management APIs
- Metadata Management APIs
- Task Center APIs
- Service Plane APIs
-
Management Plane APIs (V1)
- Appendix
-
FAQs
- Customer Consultation
-
API Use
- How Do I Import Data to GES?
- When Binding an EIP to an Existing Instance or an Instance Being Created, What Should I Do to Deal with Insufficient Permissions for Creating Agencies?
- When Binding an EIP to an Existing Instance or an Instance Being Created, What Should I Do to Deal with Insufficient Quotas for Creating Agencies?
- Can I Run Several Gremlin/Cypher Commands At a Time?
- If a Vertex Is Deleted, What Will Happen to Edges Formed Based on the Vertex?
- What Do I Do If an Error Message Indicating a Vertex Does Not Exist Is Displayed When Properties of the Vertex Whose ID Contains Chinese Characters Are Modified?
- GUI
- Others
-
More Documents
-
User Guide (ME-Abu Dhabi Region)
- GES Overview
- Permissions Management
- Metadata Operations
- Creating Graphs
- Managing Graphs
-
Accessing and Analyzing Graph Data
- Graph Editor
- Accessing the GES Graph Editor
- Dynamic Graphs
- Graph Exploration
- Multi-Graph Management (Database Edition)
- Adding Custom Operations
- Editing Schema
- Visual Query
- Gremlin Query
- Cypher Query
- DSL Query
- Analyzing Graphs Using Algorithms
- Analyzing Graphs on the Canvas
- Graph Display in 3D View
- Filter Criteria
- Editing Properties
- Statistics Display
- View Running Records
- Viewing Query Results
- Viewing Graph Tasks
- Configuring Permissions
- O&M Monitoring and Alarm Reporting
-
Algorithms
- Algorithm List
- PageRank
- PersonalRank
- K-core
- K-hop
- Shortest Path
- All Shortest Paths
- Filtered Shortest Path
- SSSP
- Shortest Path of Vertex Sets
- n-Paths
- Closeness Centrality
- Label Propagation
- Louvain
- Link Prediction
- Node2vec
- Real-time Recommendation
- Common Neighbors
- Connected Component
- Degree Correlation
- Triangle Count
- Clustering Coefficient
- Betweenness Centrality
- Edge Betweenness Centrality
- Origin-Destination Betweenness Centrality
- Circle Detection with a Single Vertex
- Common Neighbors of Vertex Sets
- All Shortest Paths of Vertex Sets
- Filtered Circle Detection
- Subgraph Matching
- Filtered All Pairs Shortest Paths
- Filtered All Shortest Paths
- TopicRank
- Filtered n-Paths
- Temporal Paths
-
API Reference (ME-Abu Dhabi Region)
- Before You Start
- API Overview
- Calling APIs
- Management Plane APIs (V2)
-
Service Plane APIs
-
Memory Edition
-
Vertex Operation APIs
- Querying Vertices Based on Filter Criteria
- Querying Vertex Details
- Adding a Vertex
- Deleting a Vertex
- Updating a Vertex Property
- Querying Vertices in Batches
- Adding Vertices in Batches
- Deleting Vertices in Batches
- Updating Vertex Properties in Batches
- Adding a Vertex Label
- Deleting a Vertex Label
- Exporting Filtered Vertices
- Deleting Filtered Vertices
- Edge Operation APIs
- Metadata Operation APIs
- Index Operation APIs
- Gremlin Operation APIs
-
Algorithm APIs
- Executing an Algorithm
-
Algorithm API Parameter References
- Common Algorithm Parameters
- PageRank
- PersonalRank
- K-core
- K-Hop
- Common Neighbors
- Common Neighbors of Vertex Sets
- Link Prediction
- Shortest Path
- All Shortest Paths
- Filtered Shortest Path
- SSSP
- Shortest Path of Vertex Set
- n-Paths
- Filtered n-Paths
- Filtered All Pairs Shortest Paths
- All Shortest Paths of Vertex Sets
- Filtered All Shortest Paths
- Connected Component
- Label Propagation
- Louvain
- Node2vec
- Real-time Recommendation
- Degree Correlation
- Triangle Count
- Cluster Coefficient
- Closeness Centrality
- Filtered Circle Detection
- Subgraph Matching
- Topicrank
- Temporal Graph APIs
- Path APIs
- Graph Statistics APIs
- Graph Operation APIs
- Subgraph Operation APIs
- Job Management APIs
- Custom Operations APIs
- Cypher Operation APIs
- Filtered-query API
- Filtered-query V2
- Domain-Specific Language (DSL) Query APIs
- Updating Specified Properties of Vertices and Edges by Importing a File
- Deleting Vertices and Edges by Reading Files
- Granular Permission Control APIs
- O&M Monitoring APIs
-
Vertex Operation APIs
-
Database Edition
- Specification Description
- Vertex Operation APIs
- Edge Operation APIs
- Metadata Operation APIs
- Index Operation APIs
- HyG Graph Management APIs
- HyG Algorithm APIs
- HyG Job Management APIs
- Native Algorithm APIs
- Graph Statistics APIs
- Graph Operation APIs
- Job Management APIs
- Cypher Operation APIs
-
Memory Edition
- Application Examples
- Monitoring Metrics
- Out-of-Date APIs
- Appendix
-
User Guide (Kuala Lumpur Region)
- GES Overview
- Permissions Management
- Importing Metadata
- Creating Graphs
- Managing Graphs
-
Accessing and Analyzing Graph Data
- Graph Editor
- Accessing the GES Graph Editor
- Exploring Graphs
- Adding Custom Operations
- Editing Schema
- Gremlin Query
- Cypher Query
- Analyzing Graphs Using Algorithms
- Analyzing Graphs on the Canvas
- Graph Display in 3D View
- Filtering Conditions
- Editing Properties
- Statistics Display
- View Running Records
- Viewing Query Results
- Viewing Graph Tasks
- Configuring Permissions
-
Algorithms
- Algorithm List
- PageRank
- PersonalRank
- K-core
- K-hop
- Shortest Path
- All Shortest Paths
- SSSP
- Shortest Path of Vertex Sets
- n-Paths
- Closeness Centrality
- Label Propagation
- Louvain
- Link Prediction
- Node2vec
- Real-time Recommendation
- Common Neighbors
- Connected Component
- Degree Correlation
- Triangle Count
- Clustering Coefficient
- Common Neighbors of Vertex Sets
- Subgraph Matching
- Filtered All Pairs Shortest Paths
- Filtered All Shortest Paths
- TopicRank
- Filtered n-Paths
-
API Reference (Kuala Lumpur Region)
- Before You Start
- Calling APIs
- Management Plane APIs
-
Service Plane APIs
-
Vertex Operation APIs
- Querying Vertices That Meet Filter Criteria
- Querying Vertex Details
- Adding a Vertex
- Deleting a Vertex
- Updating Vertex Properties
- Querying Vertex Data in Batches
- Adding Vertices in Batches
- Deleting Vertices in Batches
- Updating Vertex Properties in Batches
- Adding a Vertex Label
- Deleting a Vertex Label
- Exporting Filtered Vertices
- Deleting Filtered Vertices
- Edge Operation APIs
-
Metadata Operation APIs
- Adding a Label
- Updating a Label
- Query Labels (for 100-billion-edge graphs only)
- Querying Graph Metadata Details
- Changing Property Names in Batches
- Deleting a Label
- Adding Labels in Batches
- Adding Properties (for 100-billion-edge graphs only)
- Query Properties (for 100-billion-edge graphs only)
- Querying the Property List (for 100-billion-edge graphs only)
- Querying Schema Structure
- Generating a Schema Structure
- Index Operation APIs
- Gremlin Operation APIs
-
Algorithm APIs
- Running Algorithms
-
Algorithm API Parameter References
- Common Algorithm Parameters
- PageRank
- PersonalRank
- K-core
- K-hop
- Shortest Path
- All Shortest Paths
- Filtered Shortest Path
- SSSP
- Shortest Path of Vertex Sets
- n-Paths
- Closeness Centrality
- Label Propagation
- Louvain
- Link Prediction
- Node2vec
- Real-time Recommendation
- Common Neighbors
- Connected Component
- Degree Correlation
- Triangle Count
- Cluster Coefficient
- Common Neighbors of Vertex Sets
- All Shortest Paths of Vertex Sets
- Filtered Circle Detection (2.2.15)
- Subgraph Matching (2.2.16)
- Filtered All Pairs Shortest Paths (2.2.17)
- Filtered All Shortest Paths (2.2.17)
- Topicrank (2.2.20)
- Filtered n-Paths (2.2.22)
- Path APIs
- Graph Statistics APIs
- Subgraph Operation APIs
- Job Management APIs
- Querying K Hop Vertices or Edges Using a Filter
- Updating Specified Properties of Vertices and Edges by Importing a File
- Deleting Vertices and Edges by Files
- Performing Cypher Queries
- Granular Permission Control APIs
-
Vertex Operation APIs
- GES Metrics
- Appendix
-
User Guide (ME-Abu Dhabi Region)
- General Reference
Copied.
Basic Operations and Compatibility
Basic Operations
Operation |
Cypher Statement |
---|---|
Querying vertices |
match (n) return n |
Querying edges |
match (n)-[r]->(m) return n, r, m |
Querying paths |
match (n:user)-[r]->(m:movie)-->(s:series) return n,r,m,s |
Querying information by specifying filtering criteria |
match(n:user) where n.userid>=5 return n |
Grouping and aggregating |
match(n:movie) return n.genres, count(*) |
Deduplicating |
match(n:movie) return distinct n.genres |
Sorting |
match(n:movie) return n order by n.movieid |
Creating a vertex |
create (n:user{userid:1}) return n |
Creating an edge |
match (n:user{userid:15}),(m:movie{movieid:10}) create (n)-[r:rate]->(m) |
Deleting a vertex |
match (n:user{userid:1}) delete n |
Modifying labels |
match (n:user{userid:1}) set n:movie return n |
Modifying properties |
match (n:user{userid:1}) set n.userid=2 return n |
Compatibility to Cypher
- Cypher clauses
Cypher implements a couple of clauses. You can combine clauses to implement different query semantics, including vertex and edge filtering, multi-hop query, sorting and deduplication, and grouping and aggregation.
Currently, GES supports the Cypher clauses listed in the following table.
Table 1 Supported Cypher clauses Clause
Support
Example
match
Partially supported
match (n:movie) return n
optional match
Partially supported
optional match (n)-->(m) where id(n)='1' return m
return
Supported
return [1,2,3] as p
with
Supported
match (n) with labels(n) as label, count(*) as count
where count > 10 return *
where
Supported
match (n:movie) where n.movieid > 10 return n
order by
Supported
match (n:movie) return n order by n.genres
skip
Supported
match (n:movie) return n order by n.genres skip 5
limit
Supported
match (n:movie) return n order by n.genres skip 5 limit 10
create
Supported
create (n:user{_ID_: 'Jack' }) return n
delete
Supported
match (n:movie)<-[r]-(m:user) delete r
set
Supported
match (n:user{userid:0}) set n.gender='M' return n
call procedures
Supported
call db.schema()
unwind
Supported
unwind [1, 2, 3] as p return p
union
Supported
match (n:movie) return id(n) union match (n:user) return id(n)
NOTE:
Union is available for graphs smaller than 10 billion edges only.
NOTE:
- Currently, merge and foreach operations are not supported. Cypher statements cannot add or delete indexes.
- GES metadata is not schema-free, and the vertex and edge label properties are strictly restricted. Therefore, the remove operation is not supported.
- The order by clause does not support sorting of the list type. When Cardinality of the property value is not single, the sorting result is unknown.
- Available items for the match clause
Item
Description
Example Clauses
Earliest Version Required
Vertex pattern
Patterns for matching vertex with specified labels, properties, and IDs.
match (n:movie{title:'hello'})
match (n) where id(n)='xx'
2.2.16
Edge pattern
Patterns for matching directional and non-directional edges with specified labels and properties. Specified IDs of both start and end vertices are supported.
match (n)-[r] -> (m)
match (n)-[r]- (m)
match (n)-[r:rate{Rating:1}] - (m)
match (n)-[r]- (m) where id(n)='x'and id(m)='y'
2.2.16
Path
Anonymous paths
match (n)-[r]->(m)-->(s)
2.2.16
Named paths
match p=(n)-[r]->(m)-->(s)
2.2.19
Multiple patterns
You can enter multiple patterns following match and separate them with commas (,).
match (n)-[r]->(m), (m)-->(s)
2.2.16
Multi-match
You can enter multiple match clauses. You can use with to connect multiple clauses.
match (n)-[r]->(m) with m match (m)-->(s)
2.2.16
Variable-length path pattern
Patterns for matching variable-length paths starting with a specified vertex.
match p=(n)-[r*1..3]->(m) where id(n)='xx'return p
match p=(n{title:'name'})-[r*1..3]->(m) return p
2.2.19
Traversal conditions for matching variable-length paths.
match p=(n)-[r*1..3]->(m) where id(n)='xx'and all (x in nodes(p) where x.prop='value1') return p
2.2.28
Both start vertex and end vertex of a variable-length path can be specified.
match p=(n)-[r*1..3]->(m) where id(n)='xx' and id(m)='y' return p
2.3.9
Deduplication by end vertex is supported:
match p=(n)-[r*1..3]->(m) where id(n)='xx' return distinct m
2.3.17
- Parameterized queries
Cypher supports parameterized queries. Numeric and string values in a query statement are extracted and converted to parameters for faster compilation, improving the query speed.
There are some examples of parameterized queries:
- Example 1
POST http://{SERVER_URL}/ges/v1.0/{project_id}/graphs/{graph_name}/action?action_id=execute-cypher-query { "statements": [{ "statement": " match (n:user) where n.occupation = $occupation return n", "parameters": { "occupation" : "artist" }, "resultDataContents": ["row"] }] }
- Example 2
POST http://{SERVER_URL}/ges/v1.0/{project_id}/graphs/{graph_name}/action?action_id=execute-cypher-query { "statements": [{ "statement": " match (n:user {`Zip-code`:'98133'}) set n = $props return n", "parameters": { "props": { "gender": "M", "age": "56+" } }, "resultDataContents": ["row"] }] }
NOTE:
There are some scenarios where parameterized queries are not supported. The following syntax is not valid:
- Using $param to search by property key and value. For example, match (n) where n.$param = 'something'
- Using $code for vertex and edge labels. For example, match (n:user) set n:$code
- Example 1
- Supported data types
Currently, GES supports 10 data types: char, char_array, float, double, Boolean, long, Integer, date, enum, and string. Both Boolean and numeric types are supported in the Cypher syntax. The following table lists the mapping between other types and Cypher data types.
Table 2 Mapping between data types of GES and Cypher GES
Cypher
Description
char
String
-
char_array
String
-
string
String
-
enum
String
The Cypher syntax does not provide enum-related syntax. During Cypher query, an enum is converted to a string. When Cypher is used to set properties, values that are not in the enumeration list fail to be set.
date
Temporal
Currently, Cypher dates can be converted into GES dates, but Cypher date functions cannot be used for inputting a date.
Table 3 Special types supported by Cypher Type
Supported
Example
Node
Yes
match (n) return n limit 10
Relationship
Yes
match (n)-[r]->(m) return r limit 10
List
Yes
return [1,2,3] as li
Map
Yes
match (n)-->(m) return {start:id(n), end:id(m)}
Path
Yes
match p=(n1)-[:friends*1..2]-(n2) return p limit 10
Point, Spatial
No
-
NOTE:
For the special types listed above, only the List type can be used to match multi-value properties in GES. Other types cannot be used in a set statement for setting the value of a property.
- Vertex ID compatibility
- Cypher does not provide the syntax for setting the ID when a vertex is added. In GES, however, an ID of the string type is required to uniquely identify a vertex. To use the Cypher syntax in GES, add _ID_ to specify the ID of a vertex in the create statement. For example, the create(n{_ID_:'123456'}) statement creates a vertex whose ID is 123456.
- If the ID is not specified, a random ID is generated for the vertex.
NOTE:
The _ID_ identifier is supported only in the create statement. The match and set clauses do not support the _ID_ identifier. In the match clause, you can use the id() function to obtain the vertex ID.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot