Fork me on GitHub
#datomic
<
2018-02-26
>
Drew Verlee00:02:35

Any good tools for visualizing datomic schemas?

Drew Verlee00:02:40

Or maybe a quick explanation why ppl wouldn’t normally want that?

favila15:02:40

Datomic schema only exists on the attributes; that's just not enough information to get a useful ETL-style visualization

favila15:02:25

Entities don't have types, so domain (what kind of entity an attribute can appear on) and range (possible value-space of an attribute) are both unexpressable

favila15:02:12

You can do it, but you need your own conventions on top so any visualizer cannot be general

Drew Verlee21:03:19

Thanks for getting back to me! i didnt see your reply until now.

Drew Verlee21:03:34

Ah i think i understand. After some thought, i guess it would be useful to just have a map of what was, rather then what could be.

Drew Verlee21:03:42

in my use case.

Drew Verlee00:02:06

or maybe its so simple that it goes without saying lol

isaac03:02:50

clojure.lang.ExceptionInfo: Transactor request timed out {:db/error :peer/request-timed-out, :request :create-database, :result #object[java.lang.Object 0x5d32f5db "java.lang.Object@5d32f5db"]}

isaac03:02:34

Got this error when try to create-database?

isaac09:02:17

What use of port 4334,433,4336 respectively?

favila15:02:52

port 4334 is for transactor-peer communication (using Artemis)

favila15:02:43

4335 is only for dev storage. It's the "storage" port peers use to talk to the embedded h2 db using sql.

favila15:02:42

4336 is the port for the web-based embedded sql GUI provided by h2. You can use it to look inside the embedded h2 db (not that there's much value in this)

Georgiana Mania09:02:14

hello! how can you excise an entity when using datomic cloud api? is there something similar to db/excise?

robert-stuttaford11:02:10

no excision is supported on Cloud as far as i know, @georgiana.mania

Georgiana Mania13:02:55

thanks @robert-stuttaford. I was hopping that they would support it.. because otherwise it can no longer be used to store data of EU citizens 😞

adamfrey15:02:38

low priority, but there is a dangling closing square bracket on this code example in the docs: https://docs.datomic.com/on-prem/best-practices.html#set-txinstant-on-imports

jaret15:02:45

I’ll fix that! Thanks for the catch!

alexk16:02:24

I have data in MongoDB, and a script to generate a Datomic schema and migrate it and the data into Datomic. But if I run the script twice, it creates twice the entities because of auto-ids when transacting maps. How best to modify my script to ignore entities that already exist in Datomic?

unlisted16:02:50

I'm just getting started, and could use some help. I have a database available, and I have created a simple app to run a query. Currently, it just runs a hard-coded query. How do I create Datalog queries dynamically?

alexk16:02:49

Either pass the data into the query using bound variables, or generate the query (which is just data) programmatically.

unlisted16:02:40

Can you point me to an example? I've been trying that, but it's not working for me.

marshall16:02:18

@U8J1APQ9Z are you using Client or peer?

marshall16:02:37

Note that the map form provides an easy path to generate the whole query programmatically; you can build up your query map with regular clojure data structure manipulation

unlisted16:02:55

@U05120CBV I’ll start there. Thanks!

marshall16:02:15

The key is to make the import idempotent, so that it can resume wherever it left off

marshall16:02:30

The specifics of how you do that will depend on your particular data source and schema

alexk16:02:56

Sounds almost impossible with complicated nested objects

alexk16:02:06

I make use of isComponent

alexk16:02:12

I’ve watched the video, I don’t remember anything addressing my problem beyond “query for things, detect differences, and insert/update appropriately “, but that doesn’t answer my question.

marshall16:02:17

it shouldn’t be if you have a unique identifier of some sort

alexk16:02:30

there can’t be a unique identifier for components

alexk16:02:37

because they’re only unique by virtue of their parent

marshall16:02:42

i mean for your parent ‘object’ in the source dataset

marshall16:02:15

one thing that particular ^ import job does is key individual transactions with a UUID

alexk16:02:17

I can do that, sure. Each top-level entity has an existing ID from the source db

marshall16:02:35

then you can ask for any given transaction whether you’ve asserted it before or not

alexk16:02:12

I guess that’s what I’m missing. I’ll think about that and see where it gets me, thanks

marshall16:02:49

also, here is the bit that looks at an existing import in-progress to find things that have already been completed https://github.com/Datomic/mbrainz-importer/blob/master/src/cognitect/xform/batch.clj#L46

marshall16:02:59

in the context of a transduction

souenzzo18:02:50

someone else has problems with datomic restore on dynamodb (throughput exception)

adamfrey19:02:09

This looks like a typo at the beginning of this paragraph in the docs: https://docs.datomic.com/on-prem/transactions.html#list-forms

adamfrey19:02:34

Also, there's the same typo in the next paragraph "Map forms"

marshall19:02:29

@adamfrey not a typo, just somewhat awkward wording

marshall19:02:46

Each list (contained within a) transaction represents…

adamfrey20:02:16

oh I see now. That was a misreading on my part