Query historical property values

I’m hoping someone can help with this as I am currently evaluating TerminusDB for one of our projects.

Is it possible in WOQL to query the historic values of a document?

E.g. in the Bikes tutorial, if the duration property was changed for a journey, how would you get the current duration and all previous durations?

I saw a discussion related to time travel queries although not sure if it’s possible to join the _commits graph with the document data?

Indeed it is possible to query all historical data, but this would need to be done programmatically at the moment in the client by walking through commits. We intend to add a feature that will let you find all historical changes from a commit backward, but this doesn’t yet exist.

Is this a requirement for you use case? If so it might be possible for us to fast-track this as its not terribly difficult and it has been in our road map but we just haven’t got around to it.

1 Like

Many thanks for your quick response.

Yes, we are looking to develop an auditing solution that would involve just as much querying of historical data as live data, so that would be one of our requirements. Ideally there would be a way of querying the history in one call to the database.

Would this kind of querying require all history to be in memory? I note there is terminusdb-store which can be used for when memory is exceeded, but interested to know how performance would be when history is on disk.

TerminusDB looks powerful but I’m just trying to better understand if it is suitable for a backend auditing database rather than a collaboration database.

Performance degrades somewhat when traversals are made entirely on disk, but if you don’t want to keep everything in memory there is no other option!