datomic

cch1 2025-06-05T01:30:30.951259Z

In Datomic Cloud, given a database value, is it possible to get the txInstant of the last transaction without multiple API calls?

favila 2025-06-05T01:33:01.495569Z

Reverse index-pull :db/txInstant?

👀 1
cch1 2025-06-05T01:36:24.072729Z

I'm going to need an E value... right? I can get the basis-t, but then how to get the transaction eid?

cch1 2025-06-05T01:38:03.797969Z

Maybe I can omit the E value and just provide A. With a :limit that might work....

cch1 2025-06-05T01:43:03.876479Z

Yes, it does. Here's the snippet:

(first (d/index-pull db {:index :avet :start [:db/txInstant] :reverse true :limit 1 :selector '[:db/txInstant]}))

vc 2025-06-05T08:55:00.454879Z

Datomic beginner here. I intend to run datomic on top of postgres and reading through a guide I was wondering if bulk uploads and downloads are as well supported by datomic as it was a big req in my last workplace which used postgres.

tatut 2025-06-05T08:59:00.931519Z

what do you mean by bulk uploads? like ingesting large amounts of data?

vc 2025-06-05T09:00:15.939349Z

yes, from csvs

tatut 2025-06-05T09:03:49.723449Z

afaict, there is no other mechanism apart from datomic.api/transact so you would need to transform the CSV into tx data

vc 2025-06-05T09:07:48.308879Z

who takes care of the compute in this case? in case of pure postgres, it is postgres. but i am guessing in this case it is where transactor is running and not postgres. i am asking so i have an idea if i can run other computing tasks where datomic transactor is running.

tatut 2025-06-05T09:12:33.223009Z

any peer can do the CSV->tx-data conversion, but the transactor needs to do the transaction

jaret 2025-06-05T13:42:04.913199Z

@vaibhawc we recommend https://docs.datomic.com/operation/deployment.html#process-isolation? for production. Many folks during development undistribute Datomic by running more than one process. But if this batch import is going to be an on-going process on your system I recommend not doing that so you can get the tuning correct without competing for resources.

vc 2025-06-05T17:21:25.316169Z

so which process will be participating the most for batch processing? transactor or storage?

jaret 2025-06-05T17:22:18.257579Z

The transactor.

jaret 2025-06-05T17:23:01.520579Z

Only in cases where you have provisioned storage (like AWS DDB) would you likely need to concern yourself with capacity tuning at the storage level.

vc 2025-06-05T21:06:19.593349Z

Got it. Thanks!

2025-06-06T16:50:57.181759Z

I’d point out here that the majority of compute is actually spend by transactor during indexing, depending on size of dataset of course

2025-06-06T16:51:08.512939Z

(at least that’s observable for us)

vc 2025-06-07T09:34:17.019829Z

so should I rather run transactor in a separate node? what is the best practice?

2025-06-07T22:43:41.242009Z

I would say it depends on the specifics of your dataset and workload