Fork me on GitHub

Is it possible to use wildcard matching as part of a tuple value? example query against 2-element homogenous tuple:

[:find ?e
 :where [?e :nsm.entity/form [:todo _]]]
I want to match all entities with :todo as the first tuple element regardless of the value of the second element. Currently this query always returns an empty set.


sorry, forgot to mention u. see my suggestion after your question


I can confirm the [((comp #{:todo} first) ...)] solution as working. Thanks @U086D6TBN!

👍 4

^Behavior reproduces on latest version datomic-pro-0.9.5981


how about something like

[:find ?e
[?e :nsm.entity/form ?forms]
[((comp #{:todo} first) ?forms)]

Joe Lane04:11:09

I think you want untuple


I can confirm untuple works in the following query:

'[:find ?e
  [?e :nsm.entity/form ?tup]
  [(untuple ?tup) [?a ?b]]
  [(= ?a :todo)]]
Thanks Joe!


Hi everyone, after adding a private maven repo to my ions deps.edn I can't run the "clojure -A:dev -m '{:op :push :creds-profile "dev" :region "eu-central-1"}'" command anymore. I always get the following error: Downloading: com/datomic/java-io/0.1.11/java-io-0.1.11.pom from <s3://datomic-releases-1fc2183a/maven/releases/>

 "{:op :push :creds-profile \"rsdev\" :region \"eu-central-1\"}",
   "Failed to read artifact descriptor for com.datomic:java-io:jar:0.1.11",
   :class ArtifactDescriptorException}
   "Could not transfer artifact com.datomic:java-io:pom:0.1.11 from/to roots (): status code: 401, reason phrase: Unauthorized (401)",
   :class ArtifactResolutionException}
   "Could not transfer artifact com.datomic:java-io:pom:0.1.11 from/to roots (): status code: 401, reason phrase: Unauthorized (401)",
   :class ArtifactTransferException}
  {:message "status code: 401, reason phrase: Unauthorized (401)",
   :class HttpResponseException})}
If I remove the private repo and the dependency of that repo it works again.


By "private repo", I assume you mean one with creds in settings.xml? If so, can you successfully download deps using clj/deps.edn from it separately from the ion setup?


Hi @U064X3EF3, yes a private repo with settings.xml. If we run clojure -A:dev all the dependencies get downloaded without an issue. It's only when we run clojure -A:dev '{...}' that we run into this problem. I've tried following both links that @U05120CBV posted but they don't seem to solve the issue.


Here's my deps.edn if that helps (with private maven repo)

{:mvn/repos {"datomic-cloud" {:url ""}
             "roots"         {:url ""}}
 :paths     ["src" "resources"]
 :deps      {org.clojure/clojure         {:mvn/version "1.10.0"}
             org.clojure/        {:mvn/version "0.1.3"}
             org.clojure/data.xml        {:mvn/version "0.2.0-alpha6"}
             org.clojure/core.async      {:mvn/version "0.3.442"
                                          :exclusions  [org.clojure/core.memoize]}
             org.clojure/core.memoize    {:mvn/version "0.7.2"}
             com.datomic/ion             {:mvn/version "0.9.35"}
             cheshire                    {:mvn/version "5.8.1"}
             clj-http                    {:mvn/version "3.10.0"}

          {:mvn/version "0.8.305"}
    {:mvn/version ""}
          {:mvn/version "697.2.391.0"}
           {:mvn/version "718.2.457.0"}
          {:mvn/version "718.2.451.0"}

             medley                      {:mvn/version "1.2.0"}
             camel-snake-kebab           {:mvn/version "0.4.0"}
             byte-transforms             {:mvn/version "0.1.4"}

             be.roots.mona/client        {:mvn/version "1.65.5-168"}

 :aliases   {:dev    {:extra-deps {com.datomic/ion-dev            {:mvn/version "0.9.234"
                                                                   :exclusions  [org.slf4j/slf4j-nop]}
                                   com.amazonaws/aws-java-sdk-sts {:mvn/version "1.11.210"}}}
             :config {:extra-deps  { {:mvn/version "697.2.391.0"}}
                      :extra-paths ["config"]}
             :local  {:extra-deps    {com.datomic/client-cloud       {:mvn/version "0.8.78"}
                                      {:mvn/version "697.2.391.0"}
                                      ch.qos.logback/logback-classic {:mvn/version "1.2.3"}
                                      ch.qos.logback/logback-core    {:mvn/version "1.2.3"}
                                      org.clojure/test.check         {:mvn/version "0.9.0"}
                                      org.clojure/tools.namespace    {:mvn/version "0.3.0-alpha4"}}
                      :extra-paths   ["dev" "sessions" "test-resources"]}}}


What is the best approach when it comes to storing ordered data in Datomic? Say, someone wants to write yet another todo list app, where items can be reordered in a given list.


@avfonarev assert each item like {:index i :item item}


@avfonarev to add to this suggestion, you may also want to consider using bisection keys rather than numbers e.g. (I've successfully used this with DataScript before, for modelling ordered lists)


That is what I was leaning to. One can use amortization to reduce the number of writes per item this was.


I am using datomic analytics through presto and I deleted the database that was connected to it. After I recreate and populate the new database, presto cannot perform any query, always returning Datomic Client Exception error


restart your presto server


if you’re using cloud you can use the datomic-gateway script to restart the access gateway


if you’re using on-prem, just kill and restart the presto server


I see, thanks marshal!! I will post your response into datomic dev forum so other people may benefit from this as well


the problem is certain related, but now sure how to proceed on that


Quick question: is there any restriction around using Lambdas & HTTP Direct at the same time?


An apigateway method integration has either a lambda proxy or a vpc link of course, but datomic supports both at the same time. Note that the apigw lambda event data will not be present in the http direct request

👍 4

Attempting to call datomic.api/connect with my database uri string results in

Execution error (NullPointerException) at datomic.kv-cluster/kv-cluster (kv_cluster.clj:355).
if anyone has an idea what that implies it would be a big help. i assume i have a connection issue, configuration of the connection string or a networking issue.

Oleh K.16:11:45

Does datomic cloud have REST API?


Hello everyone, I am currently studying how I can use Clojure to a bioinformatics project. One of the first problems that I find is the lack of a library to work with data frames, I did some Google search but I did not find any information about some Clojure library that has any implementation like pandas (Python) or R.


Is anyone aware of open source compilers that compile a (subset, certainly) of SQL to Datalog?

Mark Addleman11:11:56

Not directly. I'm a fan of which allows you to SQL-fy just about anything. I believe has similar capabilities.