datomic

Ask questions on the official Q&A site at https://ask.datomic.com!
2021-06-30T08:37:36.337900Z

i'd also let get-user take the db as an argument, you can then get the db with the changes from the transaction from the :db-after field

(let [{:keys [db-after]} (db/add-user ...)]
  (r/response (db/get-user db-after "foo"))  

Leah Neukirchen 2021-06-30T10:35:43.341400Z

Is it possible to override the S3 endpoint for datomic backup to use it with google cloud storage?

jacekschae 2021-06-30T16:02:51.342600Z

For anyone here wondering about some resources to learn Datomic I have been working hard to put this together — there is still long way to go but definitely a good moment to share https://learndatomic.com

2👍2
pedrorgirardi 2021-07-01T07:01:01.347100Z

That’s great @jacek.schae! I’m keen to check it out once it’s available.

1❤️
2021-06-30T16:09:36.345Z

what might be a cause of the following error?

(dl/import-cloud {:source {:server-type :ion
                           :region      "the-region"
                           :system      "the-system"
                           :query-group "the-query-group"
                           :db-name     "the-db"
                           :endpoint    "<http://entry.the-query-group.the-region.datomic.net:8182/>"
                           :proxy-port  8182}
                  :dest   {:system      "testing"
                           :server-type :dev-local
                           :db-name     "take-me-to-your-leader"}})
Execution error (IllegalArgumentException) at datomic.dev-local.impl/fn (impl.clj:490) .
This client does not support dev-local import.
that's with the latest com.datomic/dev-local {:mvn/version "0.9.232"} installed locally. strangely, other people on the team who are loading the same project and running the same function are not having issues

favila 2021-06-30T16:55:23.345100Z

It may be possible if you can do it via some magic amazon s3 client override configuration. The last time I looked into this a few years ago there didn’t seem to be a way.

favila 2021-06-30T16:55:57.345300Z

I think cognitect itself could do it fairly easily when they configure the s3 client in their code; but the trick for us is to do it without changing that code

favila 2021-06-30T16:56:36.345500Z

I guess with enough reverse engineering, reflection, and monkey-patching anything is possible