This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-12-13
Channels
- # bangalore-clj (5)
- # beginners (94)
- # boot (145)
- # cljs-dev (4)
- # cljsjs (79)
- # cljsrn (18)
- # clojure (343)
- # clojure-dev (21)
- # clojure-dusseldorf (6)
- # clojure-india (1)
- # clojure-italy (2)
- # clojure-nl (4)
- # clojure-russia (62)
- # clojure-sanfrancisco (1)
- # clojure-spec (109)
- # clojure-taiwan (1)
- # clojure-uk (103)
- # clojurescript (102)
- # code-reviews (30)
- # component (1)
- # cursive (39)
- # datascript (7)
- # datomic (68)
- # emacs (11)
- # figwheel (1)
- # gorilla (1)
- # hoplon (234)
- # off-topic (46)
- # om (52)
- # onyx (32)
- # planck (9)
- # proton (4)
- # protorepl (5)
- # random (1)
- # re-frame (36)
- # ring (18)
- # ring-swagger (1)
- # specter (6)
- # untangled (3)
- # vim (56)
We are using pull queries to read nested data structures from the database. Now we plan to add extra information to the :db/txInstant entity about who made the change. Is it possible to use the pull syntax to read all the attributes as before but also “join” in :db/txInstsant with the extra information for every attribute in the pull query?
wrapping a clojure peer library in a docker causes it to throw com.amazonaws.AmazonClientException: Unable to load AWS credentials from any provider in the chain
. Works if i fire up standalone uberjar locally, but wrapped in docker fails. Any ideas how to make it talk?
come on guys, surely people do put clojure peer library into docker ? no?
i try to run it locally for now
with dynamo db transactor on aws
i am clearly missing sth stupid
i do not understand what credentials it talks about even. i am using iam roles anyway….
@karol.adamiec do your docker containers receive iam creds? can you ssh into one and use the aws cli to connect to stuff?
@teng d/pull can’t reach T values for EAVs. think about it. where would it go?
only if you put a tx id in as your eid will you get db/txInstant. same for d/entity.
@robert-stuttaford there is no aws cli inside of the container...
my point: debug the issue like you would any other bug 🙂
poke it with a stick until it twitches
i am headbanging that for some time now
are there any magic ports that need to be open for the peer library?
what storage are you using?
dynamo
pretty sure there’s a reference for this
seems my terraform example has only 4334 https://github.com/robert-stuttaford/terraform-example/blob/master/modules/vpc/sg_internal.tf#L68
yeah i tried mapping 4334, nothing changes
will set up the AWS_ keys hardcoded for now, maybe that will help
does the container have ddb access via the iam instance profile?
it is local on my dev machine
what does the full stacktrace show @karol.adamiec — what part of datomic is trying to do AWS?
so dont know ;/
oh. then you need to set explicit aws keys always
you said you’re using iam roles. i took that to mean you’re working on an instance. what did you mean by iam roles?
did you mean aws cli profiles?
well, all my aws setup is on roles
i do have aws cli installed locally
afaik the peer library doesn’t use aws profiles at all
that is why maybe it works when i run the jar
i added it as a feature request via the new system
i seee
aws key + secret need to be in your env or otherwise provided as java props
well, the only mystery is how it works then i run java -jar
must pick up stuff from aws-cli
do you have aws key/secret in your env? env | grep AWS
are you connecting to ddb in aws from your local machine?
repl or my little project i made that integrates peer lib
it must be doing something fancy then. datomic doesn’t support profiles afaik
anyway. set keys in your env and it’ll work
yeah, thanx Robert 🙂
i got sidetracked by not seeing keys in my env...
programming 🙂
btw: are aws access keys needed even when container runs on ecs?
or only for outsiders?
no idea. never run docker once in my life
works. jeeesuss.. 🙂
-fireworks-
on the good news front, no more javascript datomic silliness 😄
@casperc Can you expound on “ages” ? My general first approach would be to query the log to get the set of EIDs for a specific transaction (based on the import id)
not really a datomic question but, is there a way to get pprint to print tempids as tagged literals instead of like {:part :db.part/user :idx -123}
Hi Is there posibility to update some parts of nested component if i know only its parrent id?
;Schema
{:db/ident :someAttribute
:isComponent true}
;Data
{:db/id 11 :someAttribute 12}
{:db/id 12
:nestedAttributeA "aa"
:nestedAttributeB "bb"}
;Transaction that will replace whole subcomponent
(d/transact conn [{:db/id 11 :someAttribute {:nestedAttributeA "cc"}}])
Result of this is i lost information about :nestedAttributeB
and i would like to just change value of :nestedAttributeA
does datomic support joint uniqueness? i.e. constrain that user/prop1
and user/prop2
together are unique
@wei see this mailing list discussion: https://groups.google.com/forum/#!searchin/datomic/key%7Csort:relevance/datomic/4cjJxiH9Lkw/N7lyVfPMAAAJ
basically, you can either enforce this via transaction functions, or encode the 2 attributes into a scalar "compound" :db/unique
attribute
Okay, guys, so help me strategize. We're building out a new service that keeps historical data, but I'm a new hire, and the effort to get datomic into our tech stack is going to take some time. HOWEVER, I think I have some pull in how we structure our data in Postgres
what's the best way to structure data so that it can be easily forward compatible with datomic?
@tjtolton from what I heard translating a relational schema to a Datomic schema is usually pretty mechanical. I think the most important thing to do in the first place is avoid relying on overwriting stuff.