Fork me on GitHub

@dfcarpenter have you looked at the mbrainz db?


How do I turn off the logging in the repl when running datomic?


(.setLevel (org.slf4j.LoggerFactory/getLogger "datomic") ch.qos.logback.classic.Level/WARN) may do it


@dfcarpenter Datomic on-prem? You can edit your logback.xml to adjust level and logger target

Andreas Liljeqvist15:10:06

Can I check if an input has a specific attribute - That is give entity ?e as input arg and return ?match if attribute ?e :whatever

Andreas Liljeqvist15:10:24

Where (= ?match ?e)


did you figure out what you need here? I’m not exactly sure what you’re going for, but I think you can do it more simply than by using the ‘=’ predicate

Andreas Liljeqvist15:10:03

I want do something like (d/q '[:find [?match ...] :in $ [?e] :where [?e :schema/type :logger] [(= ?e ?match)])

Andreas Liljeqvist15:10:23

It can be done in an easier way just by using d/entity and filter, but still?

Andreas Liljeqvist15:10:12

identity can be used to force the var


What does it mean when a peer logs at INFO "datomic.kv-cluster: {:event :kv-cluster/get-pod-meta, :pod-key "...", ...} with the same pod-key lots and lots and lots of times in a row?


Has anyone found a preferred way to compose or at least parameterize pull expressions in queries? I find using syntax quote to be a bit awkward, because of the need to var-unquote all of the other symbols in the query with ~'


I was doing this for a while with clojure.walk/postwalk. Just something like (clojure.walk/postwalk #(get params % %) expr), and then you can replace some symbol with a value.


i just quote the individual things that need it like '*


Of course, use rules first, if you can. And pass extra parameters to q and bind with :in. if you can.


Thanks for all of the replies. I think I’ll try the postwalk approach. This may be a bad idea, but I’m thinking of using a symbol prefixed with ! (e.g. !customer-with-address) and postwalk to replace those from a params list


You can just pass pull expressions as inputs to your query: (d/q ‘[:find (pull ?attr my-pull) . :in $ my-pull :where [:db.part/db :db.install/attribute ?attr]] $ [’* :db/doc])


oh, well thanks. I think that’s the best one of all 🙂


Is it ok for me to add my own keys to datomic/ion-config.edn?


I performed a parameter upgrade on my Datomic cluster and it has been updating for the past 25 mins. Is this normal?


Ah, it's because my Ions threw an exception. Seems like that should fail the parameter upgrade.