Questions tagged [aql]

ArangoDB Query Language (or AQL) is a declarative querying language used inside the multi-model database ArangoDB.

448 questions
6
votes
1 answer

ArangoDB how apply 'Group by' (COLLECT or ...?)

How can I group my data in ArangoDB with AQL? For example, my structure is: [ {name: "karl", id: "1", timestamp: "11112"}, {name: "migele", id": "2", timestamp: "11114"}, {name: "martina", id": "2", timestamp: "11116"}, {name:…
jonua
  • 1,915
  • 3
  • 17
  • 27
6
votes
2 answers

Arangodb LET variable from AQL for use it in FILTER

I have collection 'Notifier'. Given the following example document of this collection: { "timestamp": 1413543986, "message": "message", "readed": { "user_8": 0, "user_9": 0, "user_22": 0 }, "type": "1014574149174" } I try find…
6
votes
1 answer

Aggregation in arangodb using AQL

I'm attempting a fairly basic task in arangodb, using the SUM() aggregate function. Here is a working query which returns the right data (though not yet aggregated): FOR m IN pkg_spp_RegMem FILTER m.memberId == "40289" COLLECT member = m.memberId…
Martin
  • 63
  • 1
  • 6
5
votes
3 answers

In ArangoDB AQL, how to return both vertices and edges from a graph traversal?

I want to return a list of all unique edges and all unique vertices met during a graph traversal query. This gives me exactly the result I want, but I'm executing the same query twice: LET eResults = ( FOR v,e IN 1..2 …
now
  • 4,772
  • 2
  • 24
  • 26
5
votes
1 answer

graph plot API for ArangoDB pyArango

I am using ArangoDB community edition, I can query on a created graph in AQL and get results in JSON which is graphically visualized on ArangoDB web interface tool. AQL Query FOR v,e,p IN 1..3 OUTBOUND 'germanCity/Hamburg' GRAPH 'routeplanner'…
Morse
  • 8,258
  • 7
  • 39
  • 64
5
votes
1 answer

how can I see which queries have been sent to the ArangoDB server

I want to quickly gather all queries sent to my ArangoDB server from an application that uses the python-arangodb driver without digging through the source and without resorting to sniffing HTTP traffic to the REST API. Isn't there some admin/audit…
Gregor
  • 1,297
  • 1
  • 19
  • 31
5
votes
2 answers

AQL filter by array of IDs

If I need to filter by array of IDs, how would I do that using bindings? Documentation does not provide any hints on that. for c in commit filter c.hash in ['b0a3', '9f0eb', 'f037a0'] return c
5
votes
1 answer

arangodb AQL How to modify the value of the object in a nested array?

I have document organized such way: { "email": "tyler_li@126.com", "name": "tyler", "address": { "street": "Beijing Road", "zip": 510000 }, "likes": [ "running", { "movie": "Star Wars" } ] } I have problem in…
Tyler_li
  • 51
  • 2
5
votes
2 answers

Arango DB performace: edge vs. DOCUMENT()

I'm new to arangoDB with graphs. I simply want to know if it is faster to build edges or use 'DOCUMENT()' for very simple 1:1 connections where a querying the graph is not needed? LET a = DOCUMENT(@from) FOR v IN OUTBOUND…
5
votes
1 answer

deduplicating ArangoDB document collection

I'm sure there is an easy and fast way to do this but it's escaping me. I have a large dataset that has some duplicate records, and I want to get rid of the duplicates. (the duplicates are uniquely identified by one property, but the rest of the…
ropeladder
  • 1,103
  • 11
  • 24
5
votes
1 answer

retrieve vertices with no linked edge in arangodb

What is the best way to retrieve all vertices that do not have an edge in a related edge_collection I've tried to use the following code but it's got incredibly slow since arangodb 2.8 (It was not really fast in previous versions but round about 10…
smurf
  • 95
  • 6
5
votes
1 answer

Update inner object in arangodb

I have an object stored in arangodb which has additional inner objects, my current use case requires that I update just one of the elements. Store Object { "status": "Active", "physicalCode": "99999", "postalCode": "999999", …
isawk
  • 969
  • 8
  • 21
5
votes
1 answer

Arangodb AQL UPDATE for internal field of object

Given the following example document of collection: { "timestamp": 1413543986, "message": "message", "readed": { "8": null, "9": null, "22": null }, "type": "1014574149174" } How do I update the value of specific key in object…
4
votes
1 answer

How to find duplicates documents?

It's very strange that I did not find answer in documentation and here for a very simple question. How to find duplicated records in collections. For example I need to find duplicated by id for next documents: {"id": 1, name: "Mike"}, {"id": 2,…
Dmitry Bubnenkov
  • 9,415
  • 19
  • 85
  • 145
4
votes
1 answer

What is the proper way to use IF THEN in AQL?

I'm trying to use IF THEN style AQL, but the only relevant operator I could find in the AQL documentation was the ternary operator. I tried to add IF THEN syntax to my already working AQL but it gives syntax errors no matter what I try. LET doc =…
ElJay
  • 347
  • 4
  • 17
1
2
3
29 30