Fork me on GitHub
#datomic
<
2020-07-28
>
zebu04:07:03

Is there a way to restore into dev-local a backup taken from datomic-free?

stuarthalloway12:07:26

Not at present. There a number of differences in core attributes. You would have to write a program that reads the log from one database, keeps track of entity ids, drops or alters unsupported things (e.g. the bytes values type) and transacts into the other database.

zebu13:07:59

Thanks Stu 🙂 I'll look into that

fugbix16:07:16

Good evening everyone!! Is there a way to manipulate arrays with Datomic? (unfortunately I can’t use tuples, as they’re limited to 8 scalars).

favila16:07:28

I think that limit only applies to heterogenous tuples?

fugbix16:07:30

Well I thought so too, but apparently I am unable to transact tuples larger than 8 values using :db.type/tuple :

(d/transact conn [{:db/ident       :weights
                   :db/valueType   :db.type/tuple
                   :db/tupleType   :db.type/double
                   :db/cardinality :db.cardinality/one}])
(d/transact conn [{:weights [0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8]}])
(d/transact conn [{:weights [0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9]}])

fugbix16:07:36

https://docs.datomic.com/on-prem/schema.html#tuples says: A tuple is a collection of 2-8 scalar values

favila16:07:11

that is unfortunate

favila16:07:01

consider using bytes and Double/doubleToLongBits?

fugbix16:07:03

I’ll give this a try thank you!!

favila16:07:05

or DataOutputStream

fugbix16:07:28

Thanks a lot

Nassin19:07:40

dev-local can migrated to the peer server correct?

Nassin20:07:02

guess it's just a matter pointing the transactor to the data dir