Fork me on GitHub

@marshall Thank you! I especially like the log list command. Would those commands also be available to call from a repl? That would be my prefered way of working. Then I don't need to have another window open, I can save some startup time, and I don't have to parse text to process the output further.


Turns out using it from the REPL works great

(require '
  ( {})
  ( {:system "example"})
  ( {:group        "example"
                                 :minutes-back 10
                                 :tod          (java.util.Date.)})


Someone else tried to deploy on-prem in AWS eu-north-1? I get an error Not a supported dynamodb region: eu-north-1 - (You'll never learn).


The included launch scripts dont currently support that region. You can likely provision and launch manually there. I will also look into adding support for the region in an upcoming release


In our case we get the error message when the peer is trying to connect, so this seems to go deeper than the launch script.


ah; i think i know what the issue is; one minute


I believe I have a workaround that will work for you.

In your transactor properties file, change the protocol to ddb-local:


Then comment out the aws-dynamodb-region line:

Finally, set the aws-dynamodb-override-endpoint to the address of the DDB endpoint:

The use of ddb-local as the protocol will allow the system to honor the override configuration.

Similarly, you will need to use the ddb-local URI for your peer: 


Thanks a lot! Right now we're moving things back to eu-central-1, but we might try this again later this week. Will let you know if we do and how we fare, if so.


I will also add a feature request for region support for that region

❤️ 1

That would certainly help us. We will probably stick with on-prem on AWS for a while, and we serve only Sweden.


We don’t currently support running the tools from a REPL; caveat emptor so to speak


When overriding the default table name in a metaschema, is that name then used to match with Datomic attributes and determine the columns for the associated table? (


just to follow up, the answer looks to be no. As in the name-opt isn't used to match attributes whose munged namespace would match. Need to use :include to capture them. (let me know if I'm missing something!)


I’m trying to automate my Ion deployments with a Github workflow, but I can’t figure out how to handle polling for the deployment status. I was wondering if anyone else has done this, or even with a different CI tool how you handled the polling.


I'm doing it on circle CI. This is my deploy function

;; Inspired by 
(defn ions-release
  "Do push and deploy of app.  Supports stable and unstable releases.  Returns when deploy finishes running."
  [{:keys [group] :as args}]
    (let [push          (requiring-resolve '
          deploy        (requiring-resolve '
          deploy-status (requiring-resolve ']
      (println "Pushing" args)
      (let [{:keys [dependency-conflicts deploy-groups] :as push-data} (push args)]
        (assert (contains? (set deploy-groups) group) (str "Group " group " must be one of " deploy-groups))
        (let [delay-between-retries 1000
              deploy-args           (merge (select-keys args [:creds-profile :region :uname :group])
                                           (select-keys push-data [:rev]))
              _                     (println "Deploying" deploy-args)
              deploy-data           (deploy deploy-args)
              deploy-status-args    (merge (select-keys args [:creds-profile :region])
                                           (select-keys deploy-data [:execution-arn]))]
          (when dependency-conflicts
            (clojure.pprint/pprint dependency-conflicts))
          (println "Waiting for deploy" deploy-status-args)
          (loop []
            (let [status-data (deploy-status deploy-status-args)]
              (if (= "RUNNING" (:code-deploy-status status-data))
                  (print ".")
                  (Thread/sleep delay-between-retries) (recur))
                (do (println)
    (catch Exception e
      {:deploy-status "ERROR"
       :message       (.getMessage e)})))


I have an attribute that has a cardinality of many, how do I test in a query that all entries in it aren't equal to a certain thing?


I can do [?e :tags ?t] [(not= :tags [whatever])] but that returns items that have the tag I don't want, because they also have other tags


I just realised not clauses were a thing, but that still doesn't completely solve the problem


If you are using on-prem, call a function that checks; this is very tedious in pure datalog


ah ok, thanks


An on-prem function implementation looks something like this:

(defn not-any-matching-eav? [db e a test-v]
  (zero? (->> (datomic.api/datoms db :eavt e a test-v)
              (bounded-count 1))))


is there any way with the pull syntax to indicate you only want the single value (v.s. a collection containing one value). With query we can do [:find ?x . :in ....] is there something similar (only thing I could find in docs is ability to indicate limit). e.g. what about the case where you know there is only one term e.g. [:person/id [{:person/_child [:person/id]} :as :person/parent]] and I do not want :person/parent to be "boxed"? Like I would like the result to be [{:person/id :x :person/parent {:person/id :y}}] not [{:person/id :x :person/parent [{:person/id :y}]}]


I’m thinking of using a tuple of two instants to represent a validity period, and a query would look something like [:find ?cap :in $ :where [?cap :capability/period ?period] [(ground (java.util.Date.)) ?now] [(first ?period) ?starts] [(second ?period) ?ends] [(< ?starts ?now)] [(< ?now ?ends)]]. Is that an appropriate use of tuples? Is first and second the right way to pull those values out?