Fork me on GitHub

@joshmiller not-join should work

(d/q '[:find ?group
       [?group :group/id]
       (not-join [?group]
                 [?group :user-group/users ?u]
                 [?u :user/activated false])])
You need a clause outside of the not-join to bind the ?group to something that is a group (here I guessed :group/id). Otherwise you will get all entities that don't have users that are not activated ... which is probably a lot 🙂


@me1740 Ah, awesome, that did it. I was missing the binding of users to groups inside the not-join. Thanks!


Hello everyone, I have a question regarding datomic transactor in AWS


I am deploying it via cloudformation, following this guide:


but I cannot find an official way to inject my classpath functions jar file


any idea on how to do this?


@mmuallem with on-prem the idiomatic way to include custom fns is to install them as db or transactor fns. it is possible to add your jar to the classpath for the datomic peer or transactor but that’s up to your devops. Cloud has a much nicer story i.e. it reads your deps.edn and deploys that classpath to all the nodes. In other words it handles the devops for you. So you should use this as one way to pick between on-prem vs cloud


hey @steveb8n, thanks for getting back to me. Unfortunately, the decision of going with on-prem vs. cloud has been made in favor of our own deployment. I am picking up the OPs from the old person, and I am new to this. Currently, we are using a modified cloudformation template and start scripts to inject the jar file directly into our bin folder. It works, but it requires a recreating of the CF stack to pick up the new jar file. I need to a find a way that's more scalable. Can you please shed a bit more light on this: it is possible to add your jar to the classpath for the datomic peer or transactor but that’s up to your devops. Many thanks!


Sadly I can’t. I have not deployed on-prem using CF so I’m shallow on knowledge there. I read somewhere that it was possible to augment the JVM classpath for on-prem but have not done it myself. Maybe someone else here (when they wake up) has more experience with this?


Thanks man, appreciated


just in case: do you need a jar or could your custom fns be installed instead? using 3rd party libs I presume? if not, you can avoid all this


Hi everyone 👋 I hope this doesn't sound like a silly question, but... Is there a way to construct a value out of two other columns within a datalog query? Similar to how you would achieve the following in T-SQL:

SELECT + '_' + AS foobar


Something like this seems to work:

(d/q '[:find ?e ?str
       [?e :company/name ?name]
       [?e :company/group ?gname]
       [(str ?name ", " ?gname) ?str]]


Thanks @U06CM8C3V I'll give this a try


I think that will do the trick. Thanks again @U06CM8C3V 🙂

👍 4

@yogidevbear I can’t recommend enough to learn the basics of Datalog.


Always good to find recommended learning resources other than official docs 🙂 Sometimes helps to fill in gaps of knowledge


@U06B8J0AJ another post someone shared with me that was very easy to digest was

👍 4

is there a way to get the datoms transacted between 2 't' values (in the client api (cloud))?


@U0539NJF7 the Log API? ( Be careful, it's start-inclusive and end-exclusive, whereas the inverse is what you would usually need.


@U06GS6P1N ok. I don't even know why I was asking this. Confusion about the 'live' transaction log not being available in cloud I guess 🙂



👌 4

Have I asked this before? We sometimes have a peer lose connection to the transactor, and since it mostly operates correctly as a read-only clone, we don't discover this for a while. Is there something we can do to check if we are still connected that doesn't transacting?


Maybe use d/sync, or submit a transaction that throws an exception via a function


Oh, I like the second one. Thanks!


For purposes of system monitoring.


Is the idea with datomic.ion.cast that dev events should show up in CloudWatch automatically? I may be searching incorrectly, but it seems like mine aren't making it.


@robert.mather.rmm I think dev events are just on your local machine.

Dev is information of interest only to developers, e.g. fine-grained logging to troubleshoot a problem during development. Dev data can be much higher volume than events or alerts.


Got it, thanks!


I get a couple reflection warnings when creating a Datomic client:

Reflection warning, cognitect/hmac_authn.clj:80:12 - call to static method encodeHex on org.apache.commons.codec.binary.Hex can't be resolved (argument types: unknown, java.lang.Boolean).
Reflection warning, cognitect/hmac_authn.clj:80:3 - call to java.lang.String ctor can't be resolved.