datahike

https://datahike.io/, Join the conversation at https://discord.com/invite/kEBzMvb, history for this channel is available at https://clojurians.zulipchat.com/#narrow/stream/180378-slack-archive/topic/datahike
cpdean 2020-07-29T21:25:29.039600Z

I'm trying to use datomic materials to learn how to use datahike. what does :db/id #db/id [:db.part/db] mean in

{:db/ident :movie/title
  :db/valueType :db.type/string
  :db/cardinality :db.cardinality/one
  :db/id #db/id [:db.part/db]
  :db.install/_attribute :db.part/db}
https://github.com/jonase/learndatalogtoday/blob/d2508adefa76b0f5a12c2b6c374ffc5109b03ce4/resources/db/schema.edn#L5 it's breaking when I try to open the file to import the schema. I'm able to get around it by just deleting those lines entirely, and converting the related data files to just using integer literals instead of these #db/id literals

whilo 2020-07-29T21:56:34.041300Z

hey @conrad.p.dean. Datomic has the notion of partitions, while in Datahike we have not partitioned the indices in the same way yet. So you can just ignore the #db/id [:db.part/db] bit and use integer ids, e.g. tempids. @konrad.kuehne is more knowledgeable about the current state of the internals.

cpdean 2020-07-29T21:58:05.041500Z

ah cool

cpdean 2020-07-29T21:58:15.041700Z

thanks @whilo !

cpdean 2020-07-29T22:00:01.043500Z

I'm trying to recreate this kind of a query in datahike, but I don't know what the schema is for the underlying database in the datomic tutorial, and i'm not sure how to search for the feature that this relies on. does this require some additional schema setup to elide the additional relation for the join, or is this not something datahike supports yet? https://github.com/cognitect-labs/day-of-datomic-cloud/blob/master/tutorial/query.clj#L161-L171

cpdean 2020-07-29T22:00:57.044600Z

it seems to let you inline a [:country/name "..."] datom instead of joining against the :country/BE keyword, which i assume is being treated like the entity id