Fork me on GitHub
#datomic
<
2016-11-21
>
tengstrand12:11:30

I have a 2000 lines long script with datoms that I read into the database (slurp + transact). Is there a way to get better error messages, for example telling me which fact or line in the file that contains the error (I know what the problem is but need to scope it down)? Now I just get: CompilerException java.util.concurrent.ExecutionException: java.lang.IllegalArgumentException: :db.error/tempid-not-an-entity tempid used only as value in transaction

grav13:11:54

I get Critical failure, cannot continue: Heartbeat failed when doing an restore to an empty datomic:dev database. What to do?

val_waeselynck13:11:24

@teng not really a direct answer, but maybe you can transact speculatively (datomic.api/with) only small segments on your file to know where the problem is ?

tengstrand13:11:56

@val_waeselynck I found the error by commenting out parts of the script and ran the script again and again. It works, but a better error message would be preferable.

Matt Butler15:11:25

When retracting an entity what is the best practice for finding out if that entity existed/was retracted. Should you query the :db-before and :db-after or is it ok to interpret it based on the :tx-data (are there datums present that suggest the removal of an entity)?

val_waeselynck15:11:55

@mbutler yes, that's the 5th element of a Datom

marshall15:11:05

@grav do you have more details of your failure? what OS, what is the restore command you’re running? Any exceptions or errors in the transactor log?

Matt Butler15:11:45

@val_waeselynck yes, so you could look for a datum in the tx-data that says that some attribute on the entity you want removing (probably the one you did the lookup using) has a 5 element of false

Matt Butler15:11:18

cool cool 🙂

grav15:11:25

@marshall: I'm away from the machine, but I'll get the details tomorrow and post here.

bbloom23:11:03

are offline docs available? i’d like to be able to grep locally

bbloom23:11:01

wget -r 2 did the trick nicely