Fork me on GitHub

I am trying to set up a composite tuple index for lets say an account entity and I am doing this ( which is like something straight out of the docs )

{:db/ident       :account/company+number
 :db/valueType   :db.type/tuple
 :db/tupleAttrs  [:account/company :account/number]
 :db/cardinality :db.cardinality/one
 :db/unique      :db.unique/value
where the account/company is a ref and the account/number is a long. the problem is that the account/number value (that datomic is filling in) is always -> nil. it seems like this tuple will be filled in by datomic correctly when the attrs are anything BUT ref and something else. if i do keyword and long its fine, but ref and anything else does not work. is this a known issue ?


I tryied to reproduce this issue here But I can't understand where you are seeing this nil


i am going to run this gist in my db and see if i can alter it to show good reproduction of issue

👍 3

this does work on my db so that was interesting. thanks. i now have to correlate this with my schema and see what is different. Muchos thanks again!


i found the problem .. we are doing this

{:db/ident       :accounting-category/company+number
                           :db/valueType   :db.type/tuple
                           :db/tupleAttrs  [:entity/company :accounting-category/number]
                           :db/cardinality :db.cardinality/one
                           :db/unique      :db.unique/value


and this attribute entity/company is shared with other entities.


seems like datomic trying to make this tuple for any entity with that attirbute and not just accounting-category entity


is there a way to stop that and only make this constraint tuple when this exact entity is created / edited ?


Is anyone here using AssumeRole/STS to delegate access to sub-accounts in AWS, and successfully connecting to a running Datomic system with the Datomic CLI?

./datomic cloud list-systems --profile example-dev
WARNING: When invoking clojure.main, use -M
Picked up _JAVA_OPTIONS: -Dawt.useSystemAAFontSettings=on -Dswing.aatext=true
Execution error (ExceptionInfo) at! (aws.clj:83).
AWS Error: Unable to fetch credentials. See log for more details.
Running aws --profile example-dev s3 ls works as expected so I think this might be a problem in the Datomic CLI side of things. My ~/.aws/config looks good to me:
[profile example]

[profile example-dev]
Credentials should be inherited from the example profile… the AWS CLI appears to get this right so I think my ~/.aws stuff is kosher.


I vaguely remember a problem with some Datomic tooling and use of assumed roles. The workaround was to juggle your AWS config about so you're not using profiles but this won't work here as I have to STS my way into the sub account. No direct access possible.


I've added the SSH ingress rule to the bastion security group, and I've attached the Datomic Admin policy to the role that gets assumed when you switch into the sub-account.


I don't know what the "log" is that the error refers to. I've seen that in cognitect-labs/aws-api too and didn't know what log was being referred to there either. 🙈