This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2015-12-22
Channels
- # admin-announcements (25)
- # beginners (60)
- # boot (277)
- # cider (5)
- # cljs-dev (3)
- # cljsrn (2)
- # clojure (82)
- # clojure-art (15)
- # clojure-berlin (2)
- # clojure-boston (1)
- # clojure-italy (40)
- # clojure-russia (118)
- # clojurebridge (1)
- # clojurecup (1)
- # clojurescript (82)
- # component (3)
- # cursive (31)
- # datavis (9)
- # datomic (39)
- # editors (1)
- # editors-rus (9)
- # emacs (15)
- # hoplon (50)
- # ldnclj (2)
- # leiningen (4)
- # off-topic (9)
- # om (123)
- # re-frame (28)
- # reagent (7)
- # vim (1)
- # yada (3)
if I have an organization entity that has many user entities and i want to replace the set of users in an organization how should i do that?
i figured i should retract all the current users in the organization and then transact the new set in
is that the right way to go about it?
If you want to do it in a single transaction, you need a transaction function that compares the old set with the new set and asserts/retracts what changed.
You can't both retract and assert the same fact in a single transaction.
oh right
thanks
you're welcome
But why can't I just query for the current set then transact the diff? Then I won't need a transaction function right?
Oh in case the data has changed in the mean time, right?
got it
So it’s a little late to the game, but I’m having a problem getting that old bug diagnostic tool running.
I’m getting:
Exception in thread "main" com.amazonaws.services.dynamodbv2.model.ResourceNotFoundException: Requested resource not found: Table: ${TABLE_NAME} not found (Service: AmazonDynamoDBv2; Status Code: 400; Error Code: ResourceNotFoundException; Request ID: ${REQUEST_ID})
The command I’m running is:
bin/run -Xmx12g -m datomic.tools.detect-865 "${URI}" /tmp/identities.edn > /tmp/check-index.edn
I know IAM perms can be a problem here, so I ran the following:
aws dynamodb describe-table --region ${REGION} --table-name ${TABLE_NAME}
@potetm: that form of invocation with appropriate permissions succeeds fine for me.
@bkamphaus: Yeah we ran it in one VPC and it worked fine.
@potetm: can a repl from the same machine connect? You can use bin/repl or a script invoked with bin/run on the same instance.
if you have enough for a repl to connect + the appropriate describe-table permission, the diagnostic tool should be able to run in detect mode fine.
Also don’t mind giving more specifics in a 1-on-1 or via zendesk or whatever. Tried to anonymize what I posted in here.
@potetm:Yeah, can you open a support ticket and I’ll follow through on ZenDesk? I want to verify details that aren’t anonymized if possible. I would suspect what your’e doing should work if you have peer + describe-table permissions (assuming the aws invocation you used is sufficient to verify the permissions for that role, or that you’d see a different effort).
Not sure if a basic sanity check on echo $URI
makes sense, assuming you would have checked for problem characters, typos, etc.
Yeah I’ve just been filling it in when I type into slack. I’ve checked it a few times w/ a few pairs of eyes. No luck so far.
If I have something like :task/due-date
which represents the date on which something is due, what is the idiomatic type for this? I’m guessing :db.type/instant
with the date set to midnight of the day which the task is due. If that’s right, is index-range
http://docs.datomic.com/clojure/index.html#datomic.api/index-range the way I’d query against that field? Thanks!
@bkamphaus: done
@potetm: thanks, I’ll respond on ticket.