@joshkh exactly! despite the fact that we might not need backup/recovery, in an enterprise sales cycle this can be a real problem. Even worse if it’s an RFP situation because the prospect writing the RFP might consider common DR techniques to be a must have. It doesn’t matter that we can explain it away, the internal politicians in the customer can simply use this as a battering ram to avoid choosing our product. It’s not always a technical question: I hope one day Cognitect will provide an answer for export so that Datomic Cloud can be used without this risk in the sales cycle. @marshall any comments on this?
what’s interesting is that Datomic provides DR features that other dbs cannot e.g. you can recover a single tenants data to any point in time, even in a multi-tenant system. Update in-place dbs cannot do this. So we are technically superior for DR. But that doesn’t always work in enterprise sales.
Curious, why does your application relies on entiti ids ?
DR is also to protect against human error, customers want to have a backup file stored in a completely different AWS account S3 bucket… or even have it downloaded to their own infastructure
and when you have backups you need to be able to restore from them… now we’ve rolled our own and fixed some mistakes we’ve made in relying too much on :db/id
values
that’s true. you could accidentally delete your Datomic s3 bucket and then you’d be finished! goodbye biz 😞
I wonder if some kind of s3 level backup would be supported by Datomic to guard against this?
https://forum.datomic.com/t/cognitect-dev-tools-version-0-9-46-now-available/1636
cheers. i know that we're in good hands. 🙂
^ New release of Dev Tools provides dev-tools via Cognitect maven repo!
1👍It's on the list 🙂. I'll try to remember to poke you when we have it 🙂
1🦜1🎉much appreciated, Jaret
I didn't see anything stating the new version of REBL in dev-tools -- I had to download the ZIP to find out what the latest version was (0.9.242) so that I could put it in my deps.edn
and pull it from the Cognitect Maven repo.
(and, yes, I know that having downloaded the ZIP, I don't need to set it up that way -- I could just use a local install -- but I prefer the idea of being able to get things direct from Maven)
Thank Sean, I'll share this with the team and see what we can do.
Hey! I want to pull all data on an entity based on it's entity id, can anyone tell me what's wrong with this query? (d/pull (d/db conn) [:db/id 79164837199970])
I know the id based on a previous query
missing colon on :db/id
Ah, had that messed up. This isn't working for me either, it just says
Execution error (NullPointerException) at com.google.common.base.Preconditions/checkNotNull (Preconditions.java:782).
null
(d/pull (d/db conn) [:db/id 79164837199970])
[:db/id 42]
isn't a valid lookup eid
it should be just 42
like so? (d/pull (d/db conn) 79164837199970)
Ah, right, that’s true
yup
I guess there's something wrong with the query I'm getting this id from then, I'm still getting null pointer exceptions
funny, though, why wouldn’t that work just like any other unique ID pair?
:db/id
isn't a "datomic ident"
There is no [42 :db/id 42]
tuple in "datoms stack"
@doby162 Are you sure you haven’t lost the conn
? That could give you an NPE
@souenzzo Ok, that makes sense
I guess I’ll aways be an old SQL guy at heart
I don't think so, I can still run a query that gives me [[79164837199970]]
and all of my functions are making a fresh (d/db conn)
the query that gives me the id is
[:find ?e :where [?e :user/email ?email]]
which, if I'm not mistaken, should just give me the entity ids of anything with an email address
you don’t have a selector, you’d need (d/pull (d/db conn) '[*] id)
to pull everything for id.
Client api can also use an arg map: (d/pull db {:selector '[*] :eid id})
thank you, that did it!
Yeah that was it, I was looking up the docs:
datomic.api/pull
([db pattern eid])
Returns a hierarchical selection of attributes for eid.
See <http://docs.datomic.com/pull.html> for more information.
I was just working with pull expressions too, should have spotted that sooner.
Sorry for the silly question, these docs have a lot of "..." that really throws me off. I'm curious why I didn't get an arity exception though
Yeah, seems like you should have.
Oh, I guess I could have included the selector and :eid all in a map. All makes sense now. Thanks everyone!