Fork me on GitHub
#datomic
<
2018-10-05
>
eoliphant00:10:05

@dfcarpenter have you looked at the mbrainz db?

dfcarpenter03:10:57

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

csm04:10:45

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

marshall13:10:32

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

okocim17:10:30

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

eraserhd16:10:15

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?

okocim17:10:48

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 ~'

eraserhd17:10:28

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.

spieden17:10:59

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

eraserhd17:10:04

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

4
okocim18:10:01

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

khardenstine18:10:31

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

okocim18:10:33

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

kenny21:10:50

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

kenny21:10:16

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

kenny21:10:34

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