I'm interested if it's possible to compare two documents with the same "_id"s (same collections names and "_keys") which are stored in different databases.
My use case is a custom "map / layout engine" that is "mainly" fed by "automatic import / conversion jobs" from an external geo-data system.
So far that works fine.
In some cases however it's necessary manually adjust e.g. the "x/y"-coordinates of some objects to make them more usable. By running the import job again any (e.g. to fetch the latest data) all manual adjustments are lost as they're simply overwritten by the "auto" data.
Therefore I think of a system setup consisting of several identically structured ArangoDB databases, used for different "stages" of the data lifecycle like:
- "staging" - newly "auto imported" data is placed here.
- "production" - the "final data" that's presented to the user including all the latest manual adjustments is stored here.
The according (simplified) lifecycle would be this way:
- Auto-import into "staging"
- Compare and import all manual adjustments from "production" into "staging"
- Deploy "merged" contents from 1. and 2. as the new "production" version.
So, this topic is all about step 2's "comparison phase" between the "production" and the "staging" data values.
In SQL I'd express it with sth. like this:
SELECT
x, y
FROM databaseA.layout AS layoutA
JOIN databaseB.layout ON (layoutA.id = layoutB.id) AS layoutB
WHERE
...
Thanks for any hints on how to solve this in ArangoDB using an AQL query or a FOXX service!