lets assume I have got list of all longest common paths for given source say A using below query g.V().hasLabel('A').repeat(out()).until(__.not(out())).path().by('id')
Result: [ { "objects": [ "k", "B", "C" ] },
{ "objects": [ "A", "B", "E" ] },
{ "objects": [ "D", "B", "E" ] } ]
From above result im expecting B,E as longest common subsequence as this path is repeated for path{"A", "B", "E" } and path {"D", "B", "E"}
Gremlin Query to get longest common subsequence for a given source from the Azure Cosmos graph
29 Views Asked by place holder At
1
There are 1 best solutions below
Related Questions in AZURE-COSMOSDB
- How to enable log to console Cosmos Client SDK requests
- Fetch non-structured data in Synapse for Cosmos DB NoSQL?
- How to handle multiple cosmos db accounts with a single cosmosclient. Questions on multi tenancy
- SQL Query not returning expected output from cosmos container
- How is `Task` run only when awaited in C#?
- Rust return a result from a function
- getting : 'The SSL connection could not be established, see inner exception.' with cosmosclient.CreateDatabaseIfNotExistsAsync method
- Error creating CosmosDB Mongo Collections via bicep
- How to connect to 2 different cosmos Databases in Java?
- Cosmos Deserializes On ReadItemAsync Even Through No Results
- What lifetime does continuationToken have in Azure CosmosDB?
- Azure RBAC permission to write Cosmos DB index policy but not create container
- cosmos Change feed listener in java
- Impact of number of physical partitions on Cosmos DB performance
- How to insert-or-replace an entity in Cosmos DB atomically?
Related Questions in TINKERPOP
- The most efficient way to compare 2 aggregates (set of vertices) in Gremlin Query Language
- Migrating a node label in gremlin tinkerpop
- Neptune query behavior during edge creation
- Running a local tinkerpop gremlin graph for testing in nodejs
- gremlin query to count by path-length all paths between nodes that share the same (specified) label
- Gremlin.net throwing exception when using tree
- I am creating client application in java using tinkerpop for gremlin but i am unable to query through my application. JanusGraph and Gremlin server
- Gephi not displaying graph from gremlin console .......1. error
- Why I could not do E step at the middle of a Gremlin query?
- Fetch substring of a field from the edge of a graph
- Tinkerpop Gremlin Query: Find all edges pointing back to a vertex in the current path
- gremlin query for cycle detection works for complex graph but returns nothing for simple one
- select and arrange multiple result within single projection
- Gremlin query to check the cycle nature of the graph
- Modify the gremlin Query to add a new field along with existing one
Related Questions in AZURE-COSMOSDB-GREMLINAPI
- Azure Cosmos update June 2020 - Gremlin API - "containing" case insensitive?
- Is there a reason why not model social network with SQL API?
- Problem running Gremlin query in CosmosDb
- Connection pool setting in node.js app which connects to Azure GraphDB and query using gremlin
- Bitwise operators in Gremlin
- Where do I set a partitionKey in CosmosDB deployed as a Gremlin instance?
- Graph db with Gremlin property syntax error
- Gremlin Query to fetch all objects till specified level along with sibling nodes
- What are the usual RUs values you expect when you run simple queries?
- Calculating limit in Cosmos DB
- Azure Cosmos Gremlin API: transactions and efficient graph traversal
- Project by, with optional properties
- Azure Graph DB and Gremlin API
- Cannot create leases container (Gremlin API) with /id as partition key, but comos db trigger requires /id as partition key
- Why is my gremlin.net gremlin client not working with azure cosmos graph db
Related Questions in TINKERGRAPH
- Gremlin "merge" api resulting in UnsupportedOperationException in 3.6.2, but works in 3.7.0
- Storing graph data with TinkerPop Gremlin run in Docker
- How can I run queries in TinkerGraph using query strings?
- Gremlin Query to get longest common subsequence for a given source from the Azure Cosmos graph
- Convert GRAPHSON_V2D0 Serializer response to GRAPHSON
- TinkerGraph g.V(ids).drop().iterate() is confusingly slow
- Is there way to decouple a traversal from a concrete graph and apply it to multiple graphs?
- Graphml generated from tinkerpop cannot be opened by yEd Graph Editor
- Improve performance removing TinkerGraph vertices
- In Gremlin, there is a query error when converting TinerGraph to JanusGraph?
- Gremlin InMemory Client on TinkerGraph
- Why does hasNot "resurrect" a dead traversal?
- Using String IDs with TinkerGraph
- Tinkerpop Select multiple neighbours grouped by the vertex they are neighbour with range step
- Tinkerpop Select neighbours grouped by the vertex they are neighbour with range step
Related Questions in GREMLINNET
- Exram.Gremlinq 12.3.0 How to implement Emit?
- Gremlin.net throwing exception when using tree
- Tinkerpop Gremlin Query: Find all edges pointing back to a vertex in the current path
- Gremlin.Net: Message with op code [close] is not recognized
- P.Within method in Gremlin.net does not translate the array correctly
- Encountered an error when making Gremlin.Net communicate with JanusGraph in the JanusGraph official website.net introductory tutorial
- Gremlin Query to get longest common subsequence for a given source from the Azure Cosmos graph
- Find Proper Longest Common Subsequence
- Gremlin.net.dll not found
- How to use CreateItemAsync to add an item with a list to an Azure gremlin DB
- gremlin.net how to create vertex/edge with id
- BulkExecution in Azure CosmosDB for ASP.Net MVC 4.7.2 version
- Need a query to retrieve complete graph
- Gremlin.Net.Driver.Exceptions.ConnectionClosedException
- Exception using client and trying to add vertices
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
There is no simple way in Gremlin to take a set of paths results, analyze them, and return common patterns seen across all of the paths. The closest I can think of is to
groupCountby all of the possible sub-parts of the path. If I can think of a clean way to do this in Gremlin I will update the answer, but my initial thinking on this one is that it will be much easier done in application code after the query has run.If the backend implementation allows use of closures/lambdas, that might be an alternative. In general their use is discouraged and many of the TinkerPop implementations disallow them.