I am just getting started with LoqiQL and LogicBlox. While looking at the different operators, I came across the transaction ID and the unique identifiers. What are use cases for these two operators?
Asked
Active
Viewed 90 times
1 Answers
0
These two operators are not very commonly used. Because the identifiers for both the uid p2p and transaction:id are only unique in the lifetime of a database, you can't use them as UUIDs (we'll add that functionality at some point). If you need to export the data and re-import into a different workspace, then you can will get conflicts eventually.
The transaction identifier can be helpful for debugging issues. For example, in LogiQL you can write a delta rule that records a log of changes to a predicate. Instead of using datetime:now (the resolution might not be sufficient), you can use the transaction id to keep a log of changes per transaction.

Martin Bravenboer
- 321
- 1
- 2
-
I see, thanks! I was thinking that maybe it is possible to reconstruct the derivation/provenance graph. Is there such a capability built-in in Logicblox? – meow Sep 20 '16 at 12:21
-
Yeah, you can definitely use the transaction id to keep provenance information. We have experimented with provenance of logic at some point, but it was hard to scale it to data sets we typically care about. We maybe revisit provenance in the future, but probably in more pragmatic ways. Our previous provenance work was a logic -> logic transformation, so an external tool could also do this. – Martin Bravenboer Sep 21 '16 at 19:47