datomic

Ask questions on the official Q&A site at https://ask.datomic.com!
zebu 2020-07-28T04:06:03.472400Z

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

stuarthalloway 2020-07-28T12:59:26.473100Z

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.

zebu 2020-07-28T13:21:59.473300Z

Thanks Stu 🙂 I'll look into that

fugbix 2020-07-28T16:05:16.485Z

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).

favila 2020-07-28T16:07:28.485100Z

I think that limit only applies to heterogenous tuples?

fugbix 2020-07-28T16:24:30.485500Z

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]}])

fugbix 2020-07-28T16:26:36.485700Z

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

favila 2020-07-28T16:41:11.485900Z

that is unfortunate

favila 2020-07-28T16:47:01.486300Z

consider using bytes and Double/doubleToLongBits?

fugbix 2020-07-28T16:49:03.486500Z

I’ll give this a try thank you!!

favila 2020-07-28T16:49:05.486700Z

or DataOutputStream

favila 2020-07-28T16:49:16.486900Z

(http://java.io class)

fugbix 2020-07-28T16:49:28.487100Z

Thanks a lot

Nassin 2020-07-28T19:09:40.489400Z

dev-local can migrated to the peer server correct?

Nassin 2020-07-28T20:01:02.489700Z

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