Fork me on GitHub
#datomic
<
2018-09-11
>
dpsutton03:09:17

i'm issuing a pull with a reverse rel (d/pull db [{:item/_patient [:db/id ...]}] patient-id) and i'm getting back {:item/_patient {:db/id}} where i would expect to see {:item/_patient [{:db/id ...} ...}]} am i missing something obvious here?

dpsutton03:09:58

i thought reverse rel's always came back with vectors

favila07:09:33

Not if the attr is IsComponent

kirill.salykin09:09:54

please advice how i can do re-find with dynamic pattern on some attribute?

(d/q `[:find ?e
       :in $ ?pattern
       :where
       [:e :user/id]
       [:e :user/name ?name]
       [(re-find ?pattern ?name)]]
     db (re-pattern "John.*Smith"))
doesnt work for me

kirill.salykin09:09:05

this is on-prem

eraserhd13:09:26

@kirill.salykin that works for me. I assume you aren't putting a regex literal in the query because then Datomic fails to cache the query? (That's my experience.)

kirill.salykin13:09:20

@eraserhd it worked for me as well, after I posted the message there is mine sorry in the end

kirill.salykin13:09:31

thanks for help

lilactown14:09:25

the on prem docs say you can use :find ?id ., with a period at the end, to return a single scalar value. however when I attempt to use it (on Datomic Cloud), I’m told it’s not a valid find-rel

lilactown14:09:51

I guess I was confused since it was simply elided, instead of called out as a difference

lilactown14:09:28

'[:find ?user .
       :in $ ?id
       :where
       [?user :user/authentications]
       [_ :user.authentication/id ?id]]

markbastian15:09:40

Is there a way to set the transactor sql url as a Java property? Something along the lines of -Ddatomic.sqlUrl=jdbc:<postgresql://localhost:5432/datomic> rather than in the passed in properties file? I've looked here (https://docs.datomic.com/on-prem/system-properties.html#transactor-properties) and don't see a property listed.

octahedrion15:09:06

my db has entities representing users of the system, and I want to be able to query for which users transacted which assertions. How do people do this ? I'm thinking of including an assertion about a user (such as :last-active-timestamp) with every transaction so that I can join on the txid

Joe Lane15:09:03

@octo221 Like an audit log?

octahedrion15:09:24

well it's for the users themselves to query for what they did

kenny16:09:27

Do Ions work with :local/root in your deps.edn? I tried making one of my deps :local/root, did an unreproducible push, and got a CompilerException saying it cannot locate a file in the dependency I made :local/root.

kenny16:09:13

I also don't get cognitect.s3-libs.s3/upload logged for the dependencies that are :local/root. Being able to push a :local/root dependency would be quite helpful for debugging. At the very least, it should warn that the local dependency will not be included in the uploaded zip.

kenny16:09:28

However, if I look in the unrepro zip located in target/datomic/apps/<system>/unrepro/<name>.zip/app, I see a directory name __local-1455 which includes the source files for my local dependency.

kenny16:09:36

No idea how it actually works, but the local directory __local-1455 is in the bundle-classpath.edn file as the value for my local/root dependency.

kenny16:09:09

Hmm. It appears an older version of my dependency was getting put on the CP. Deleting .cpcache seems to have fixed it.

Alex Miller (Clojure team)16:09:43

you can always -Sforce to force recomputation of the cached classpath

4
kenny16:09:49

Would it be possible to update AWS SSM dependency to at least 1.11.375? That release adds getARN and getLastModifiedDate to Parameter.

stuarthalloway17:09:46

@U083D6HK9 I will bump to latest for the next release, presuming it causes no errors in testing.

4
eoliphant18:09:13

any thoughts on 'inter app' comms? i've started mucking around with query groups. and thinking through approaches

kenny21:09:45

What are the minimum IAM permissions required to push and deploy an Ion?

stuarthalloway01:09:33

@U083D6HK9 we have not doc'ed these yet

kenny22:09:03

Is there an easy way to call the Ion push and deploy functions from Clojure?

Oliver George05:09:52

Treat there as nothing but rough notes but it’s pretty easy to script it into a single step deploy. https://gist.github.com/olivergeorge/f402c8dc8acd469717d5c6008b2c611b

kenny16:09:25

Exactly what I was after! Docs for those functions would be nice.

Oliver George00:09:00

Yeah, I guessed they existed and from that point the documentation on the ions reference page provided the necessary details. https://docs.datomic.com/cloud/ions/ions-reference.html#push