This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-05-02
Channels
- # beginners (26)
- # bitcoin (1)
- # boot (9)
- # boot-dev (5)
- # cider (26)
- # cljs-dev (1)
- # clojure (190)
- # clojure-finland (1)
- # clojure-italy (42)
- # clojure-nl (20)
- # clojure-russia (3)
- # clojure-sanfrancisco (1)
- # clojure-serbia (1)
- # clojure-spec (50)
- # clojure-uk (16)
- # clojurescript (62)
- # core-async (4)
- # cryogen (1)
- # cursive (6)
- # datascript (1)
- # datomic (36)
- # duct (6)
- # editors (6)
- # emacs (14)
- # graphql (3)
- # leiningen (30)
- # off-topic (21)
- # om (7)
- # parinfer (13)
- # portkey (56)
- # re-frame (2)
- # reagent (2)
- # shadow-cljs (58)
- # vim (1)
- # yada (3)
New article about Datomic and GDPR: http://vvvvalvalval.github.io/posts/2018-05-01-making-a-datomic-system-gdpr-compliant.html
the datomic docs show a way to find the lengths of the 5 longest/shortest tracks in the database. is there a way also return the entity id of each of those tracks in the same query?
i'm referring to this part of the docs: https://docs.datomic.com/on-prem/query.html#aggregates-returning-collections
I'm a little confused on peer vs client library. I have a peer server and the transactor running. I'm using the peer library. Prior to this, I was simply running the transactor and directly connecting to it. The transactor and peer URLs are identical. How do I know if I'm accessing storage through a peer or directly through the transactor?
the URL you use is actually the Storage URI - Peers go to storage first, look up the active transactor, and connect to it
when you connect with a client you use an endpoint, either your Datomic Cloud system endpoint or the address of the peer server
https://docs.datomic.com/on-prem/getting-started/connect-to-a-database.html#repl - the middle of that section shows an example of connecting to peer-server with client
also, i figured out my issue yesterday. i was doing something silly with :db/unique
on an attribute
question for ya: is there anything out there for bulk import that's more general? the mbrainz-importer seems to have all the pieces, but it's not really built for use as a utility for any old dataset
i have a few million records, and i can cobble together the core.async stuff, but it'd be nice if i could just hand my transit to a bulk import utility, even if the only guarantee is that it gives me "slightly better than sequential transactions" performance
basically im looking for the simplest path to take (def xs [{:a/b 1} {:a/b 2} ...])
where (count xs)
=> 500000 and get better than (d/transact conn xs)
performance.
there’s nothing I know of that’s pre-baked; that sort of thing tends to be a relatively custom ETL with quite a bit of stuff that is dataset-dependent
Is it possible to programmatically go from a relational schema (say with postgres) to datomics graph schema?
a table is a set of rows (entities) and columns (attributes)
every cell in the table is a tuple [<row> <column> <value>]
and then you have to figure out an approach to foreign keys
you basically need to map a fk value in one table to the entity representing the pk in the referred table
I’ve only hand-waved past a few dozen critical details, but that’s the broad shape of it
Thanks alex! right. I”m actually working through handling the foreign keys part right now. I just thought i would ask before i potentially went down a rabbit hole 🙂 In datomic, the refs aren’t constrained though right? so i can say this is a ref, but not really declare what to specifically?
they are constrained to one entity :)
but entities don’t have a “type”
Right. I’m free to have: person/dog -> cat person/dog -> dog
ah, cool, hadn’t seen any of those
i’m going to give those a read. The use case is mostly academic. I wanted to create a tool that helped with testing by generated insert statements for my relational db. i’m looking to handle the foreign key constraints, so i need a way to walk the foreign keys. My original model puts the relational db into a simple graph. This works fine, but, as its a personal project, i wanted it to be perfect and i was remiss that you can’t really spec the graph as the keys are unique values and not really an entity map. So after some thought i was like , well datomic is a graph that has a defined schema, that would would make it clear to the user the shape. Then i thought about what it means that in order to solve a problem with a relational db it makes sense to reformat it into a datomic and how i wouldn’t have this testing problem and about 500 others if we were using datomic in the first place ….and now i need a drink 🍺