Fork me on GitHub
#datahike
<
2021-11-01
>
bortexz17:11:13

Is it possible in datahike to explicitly specify the txInstant as in datomic for backfill of data?

(d/transact conn {:tx-data [{:inv/sku "SKU-42"
                             :inv/color :green}
                            [:db/add "datomic.tx" :db/txInstant #inst "2001"]]})

timo07:11:58

Hi @U6CN6JQ22, did not actually find an example for transacting this but since Datahike stores txInstant you should be able to transact this as well... maybe @UB95JRKM3 or @UQVCR784A can elaborate? https://cljdoc.org/d/io.replikativ/datahike/0.3.6/doc/time-variance are the docs on time variance. Probably it needs some update on transacting as well as https://github.com/replikativ/datahike/blob/development/examples/basic/src/examples/time_travel.clj. We are happy to take a merge request if you want to update them.

bortexz08:11:25

Hi @U4GEXTNGZ thanks for the answer! I was evaluating different datalog databases, I have strong needs for backfill of data out of time and recreate the past, and after having a look at xtdb too, it seems to be exactly what I need with the valid_time feature

timo08:11:47

Sure no problem, though sad to hear you are not using Datahike 😉