Fork me on GitHub

it's literally datomic.client/PRO_ACCOUNT


I tried that and I get Incomplete or invalid connection config:


@kenny you need to run a peerserver against your ddb database


Then connect clients to that peer server


Db name is the "alias" you provide to the peer server when you start it against your ddb uri


@kenny ^ running peer server documented there. Info on connecting a client to it is lower on the page


Ah, that makes sense. The exact steps you need to follow to use the client API aren't clear in the docs 🙂 Thanks for the info


Sure. Let me know if you have suggestions as to how/where that could be specified better


I think the confusion for me was actually needing to go through the "Getting Started" docs. I assumed that I didn't need to read "Getting Started" because we have been using Datomic for a while now and I know all the basics. Maybe it should be called "Getting Started with Clients"?


Ah, yeah I think the new getting started does cover how to run and connect with peer server


I'll see where/ how I might clarify that


What does this mean?


oh, n/m, i confused <system-name> with <table-name>, i guess

Drew Verlee04:12:14

Im trying to setup datomic on postgres in heroku. Im on this step: > open a SQL window on that server and paste in the bin/sql/postgres-table script From I’m not sure what a SQL window is referring to. Googling “SQL window” doesn’t get me close to what i imagine. I imagine somewhere there is a script to setup the tables the way datomic wants them, and i need to run that in this SQL window. But i dont know where either is.

Drew Verlee04:12:33

this postgres file is probably in my project directory somewhere...

Drew Verlee04:12:15

looks like i probably need to download datomic to get it 🙂

Drew Verlee05:12:49

similar issue on this step: > If you are using a Heroku hosted PostgreSQL instance, edit your as follows: Which is simply that i dont see a ‘’ file anywhere. I see a config/samples/ which i could copy and change the file name. But im not sure thats right, especially as the next step suggest there should be a sql-url variable in the file (which there isn’t). I could write it down, but that feels odd.


@drewverlee the free transactor is only for in-memory, you'll have to set up a starter license if you want to use postgres for your storage layer

Drew Verlee18:12:33

Hmm ok, so i’m a tad stuck. I want to deploy a full stack clojure app to heroku using datomic ontop of postgres. I assume i should include my datomic-pro dep in my project file:

[com.datomic/datomic-pro "0.9.5544" :exclusions [ org.slf4j/log4j-over-slf4j org.slf4j/slf4j-nop]]
Which seems to work as lein uberjar reports success. But then as i would expect it fails when i try to deploy to heroku it fails. I assume because it cant verify my license? This walkthrough ( seems to suggest i should add:
:repositories {"" {:url ""
                                   :creds :gpg}}
to my project.clj. But i dont see any offical docs on the subject.

Drew Verlee18:12:45

Maybe a better question would be, whats the simplest way to get something deployed 🙂


@drewverlee what specifically fails when you try to deploy? launching the transactor is what will require a valid license; I’m not sure whether details have changed, but I believe there used to be some hoops to jump through to get a transactor running using heroku


due to IP and inter-instance communication configurations


do you have a transactor up and running? or are you attempting to deploy both a peer and a transactor?

Drew Verlee18:12:37

@marshall Thanks for the help. the failure message when i run git push heroku is:

remote:        Could not find artifact com.datomic:datomic-pro:jar:0.9.5544 in central ()
remote:        Could not find artifact com.datomic:datomic-pro:jar:0.9.5544 in clojars ()
remote:        This could be due to a typo in :dependencies or network issues.
remote:        If you are behind a proxy, try setting the 'http_proxy' environment variable.
remote:        Uberjar aborting because jar failed: Could not resolve dependencies
remote:  !     Failed to build.
> do you have a transactor up and running? Not yet. Im not sure what the order should be, this is what im currently doing: build clojure project e.g lein new luminus vending_machine_app +re-frame +datomic edit my project.clj to use datomic pro (x) deploy to heroku follow setup datomic database instructions (which involves setting up the transactor)


gotcha. So that error does indicate your app is unable to get the datomic peer library from the private maven repo


you’ll need to configure that via the directions provided in your dashboard

Drew Verlee18:12:52

@marshall Its probably important to know that im going headfirst at this, with very little background 🙂


however, You’ll also need a running transactor up for your peer to connect to before it can “do” anything


in general, the ‘startup’ order for a Datomic system would be: 1) provision/configure storage (i.e. Postgres or Dynamo) 2) start your transactor instance 3) start your app, which uses the Datomic peer library

Drew Verlee18:12:43

@marshall ok, great. I see the instructions i missed on


more details on storage setup can be found here:


the writeup on running Datomic in AWS ( might also be helpful, although of course the AWS-specific parts won’t work for Heroku

Drew Verlee18:12:00

@marshall of the two, paths (heroku vs AWS) which is the smoothest. I’m doing a barebones toy application just to get this stuff live


in general the AWS path is the fastest for getting the storage & transactor up and running


we provide a set of scripts that automate most of it


and you’ll have a transactor up and running


after that, just deploy your application that uses the Peer library to EC2 however you like


@drewverlee you can also use terraform; @mrmcc3 put together a codebase for transactor + peers, you can use the transactor bit


drewverlee: FWIW, if you are going with heroku, there are a few heroku datomic buildpacks that make setting up the transactor a little easier


is there a general way to implement composite attributes on top of datomic? by that I mean attributes which are unique when taken together. my current method is using a special key where the values are concatenated, e.g. :composite/| but this adds a lot of extra complexity around upserting entities.


@wei I think there is a feature request for that, so go to your profile and upvote it


upvoted, thanks. was wondering what others were doing in the meantime


@wei you’re talking about what SQL calls composite primary keys, and Datomic does not support them


you can do your own with transactor functions


here’s a snippet. we eventually caved in and had our tx fn make a string value out of the parts so that we had a simple ‘primary key'


if you think it through, such a feature would add quite some complexity to the system, which i don’t think would be worth it


… but i’m not Rich Hickey, so it’s very possible i’m ignorant in several key ways


thanks for sharing. yes, I was reading some previous literature around using tx fns for composite keys, and it looks like every solution so far has some major limitations (e.g. not being able to add multiple entities in the same tx). was wondering if I was missing something critical as well


the current system is based on a few solid rules. adding this would complicate things quite a bit i think


in your schema, is :meta/tag-slug the only unique attr?


we have a helper function too


think I’m not following completely. if you wanted to put a composite key on several entities, would you reuse this db function or create a separate function for each entity?


so this is a concrete implementation for one entity kind


a fully generic implementation would be so indirect and meta, it’d be useless (that’s an intuition)


that’s what I’m thinking too. but we have many composite keys in our system and it’s getting tedious to re-implement this for each


do your comp-keys follow any sort of a pattern? e.g. 2-3 strings


not an uncommon requirement in my opinion- for example, user ids in some external system are unique only within a group (team)


yes, it’s usually 2 strings. but sometimes one part of the composite string is based on an attribute from a joined entity, which complicates things so I’m debating whether that’s necessary


perhaps it may be useful to think about how you’d model this data in a new database, from first principles, rather than as an import from a different data modelling paradigm


true. currently we have things like :composite/team.slack-id|user.slack-id (need a user’s slack id and a team’s slack id to uniquely identify a user) and :composite/team.uuid| (need the team and tag name to uniquely identify a tag). I do think composite keys are necessary in these cases, but maybe splitting it along a different dimension would make things easier.


at any rate, thanks for the tips. if you wouldn’t mind posting your helper function, that would help me as well


hmm i think i found some kind of bug: when i have [com.datomic/clj-client “0.8.606”]in dependency it spoils jetty ring. When in run lein repl and then (use ‘ring.adapter.jetty) i have an error CompilerException java.lang.NoClassDefFoundError: org/eclipse/jetty/http/HttpParser$ProxyHandler, compiling:(ring/adapter/jetty.clj:27:11) - it makes this bug even on this simple example


Can I do pull inside a query on a sequence based db (like the [fred :likes blah] example in the query docs)? By default I get an exception, but I might be doing it wrong