Fork me on GitHub

@randyt it's hard to tackle that question generically, but I think the basic point would be that yes, multi-table data can be migrated to Datomic usually and depending on e.g. how the tables are typically joined to answer questions, a Datomic schema may be a better fit, especially if it involves implied graphs, card many values, varying presence/absence of fields, etc.


I doubt there will be a generic ETL tool you can grab if the best fit for your data is a model fundamentally different in some ways than the relational/table model.


@bkamphaus: thanks for the feedback


If you know that you are transacting to only one entity, (only one map literal), what is the best way to get the entity id you transacted to from the transaction future. I was doing this via

(defn- get-e-id-for-transaction
  ((comp first vals :tempids)
But I realized that only works if you are transacting to a new entity since there won't be tempids in that case.

hiredman20:04:09 says :tx-data cotnains the datoms produced by a transaction, so maybe mapping first over that?


oh, right, the operation type, so not first, but you may be able to get entity ids there


Thanks, I'll give that a shot.


Got something working. Thanks @hiredman

(-> test-db-name
            (d/transact [{:db/id #db/id[:db.part/user]
                          ;; transact something here
            second ;; This used to say first, but the first datom is the transaction