Ask questions on the official Q&A site at https://ask.datomic.com!
Pragyan Tripathi 2021-05-12T03:49:58.086300Z

Thanks this helps.

Joe Lane 2021-05-12T03:53:37.086600Z

Check out http://www.learndatalogtoday.org/

Joe Lane 2021-05-12T04:21:48.087300Z

It's a bit late, but I'm not clear here what you're trying to do? Datomic Analytics (as of today) still runs presto 348, which is a pre-trino version.

tatut 2021-05-12T04:29:15.087500Z

ok, the same config should work there… trino is just a name change

tatut 2021-05-12T04:30:13.087700Z

I’m trying to expose an analytics endpoint via load balancer to our customer, and need to configure options for the connector

tatut 2021-05-12T04:31:04.087900Z

the datomic-cli analytics sync seems to only copy the catalog and metaschema and doesn’t have a way to do other config changes for presto/trino

Joe Lane 2021-05-12T04:33:34.088100Z

Trust me, it's more than just a name change 🙂 Is "our customer" a 3rd party? What options exactly are you trying to configure for the connector?

tatut 2021-05-12T04:34:13.088300Z

the username/password authentication and tls proxy config

tatut 2021-05-12T04:35:18.088500Z

customer is 3rd party

Joe Lane 2021-05-12T04:38:49.088700Z

How many databases will your system have?

tatut 2021-05-12T04:39:35.088900Z

2 that need analytics access

Joe Lane 2021-05-12T04:43:06.089100Z

I'm going to have to sleep on this one.

Joe Lane 2021-05-12T04:43:21.089300Z

Let's reconnect tomorrow?

tatut 2021-05-12T04:43:42.089500Z

sure, I think we will try just ssh’ing and modifying the config.properties in our dev test environment and see that happens

Joe Lane 2021-05-12T04:45:48.089700Z

Something more useful for me would be a sample configuration / project showing that you can expose a secure presto/trino server with the config you need to your customer, taking datomic cloud out of the picture entirely (just for the sample project).

Joe Lane 2021-05-12T04:47:07.089900Z

I'm sure ssh'ing will get it to work once, but it will probably not continue to work upon access gateway restart.

tatut 2021-05-12T05:30:47.090200Z

added 2 lines to /opt/presto-config/config.properties.template

and then added password-authenticator.properties and password.db to /opt/presto-data/etc folder… that worked. Don’t know if that survives restart of the gw

enn 2021-05-12T16:41:22.093Z

I’m trying to understand the use of the tx-data function in queries. The docs (https://docs.datomic.com/on-prem/api/log.html#log-in-query) give this example: [(tx-data ?log ?tx) [[?e ?a ?v _ ?op]]] That works for me as expected. But I was hoping to be able to provide values for some of those slots, like so: [(tx-data ?log ?tx-id) [[?e :label/public-id ?v _ false]]] This gives me results I don’t understand. ?v gets bound to an entity, not a value--specifically, the entity to which I’d expect ?e to be bound. ?e gets bound to another entity (an entity which definitely does not have a :label/public-id attr) which I wouldn’t expect to be in this datom at all.

favila 2021-05-12T16:44:20.093100Z

I’m a little surprised this works at all. The ?a slot here is a number (an entity id), so I would expect :label/public-id to cause the binding to never unify with anything.

favila 2021-05-12T16:49:42.093400Z

I think this should work as you expect

[(datomic.api/entid $ :label/public-id) ?label-public-id-attr]
[(tx-data ?log ?tx-id) [[?e ?label-public-id-attr ?v _ false]]]

enn 2021-05-12T16:50:07.093600Z

thanks, I think that will work. I agree that it’s weird that it returns anything the other way.

jdkealy 2021-05-12T21:07:10.094900Z

is there a limit on how many records i can run (fulltext on ? I have a list of 46k users and datomic seems to be dying on calling fulltext on their names

Joe Lane 2021-05-12T21:10:10.095300Z

What is the full query?

jdkealy 2021-05-12T21:11:55.095600Z

{:find [[?e ...]],
   :in [$ ?lname],
   :where [[?e :ent/type "user"]
           [(fulltext $ :user/name ?lname) [[?e _ _ _]]]]}

Joe Lane 2021-05-12T21:14:14.096Z

And what happens when you remove [?e :ent/type "user"]?

jdkealy 2021-05-12T21:40:28.096200Z


jdkealy 2021-05-12T22:25:18.096400Z

wait actually... no it's fast now

jdkealy 2021-05-12T22:28:01.096600Z

i don't understand why

Joe Lane 2021-05-12T23:06:11.096800Z

1. Find all entities ?e that have an :ent/type 2. Limit the ?e's to only those that have an :ent/type of "user" 3. Find entities that have a :user/name of ?lname and and then bind them to ?e 4. Join ?e's from both results to limit the result set further 5. Take all the resulting ?e's and return a collection of them

Joe Lane 2021-05-12T23:06:35.097Z

^^ That's what your first query did

Joe Lane 2021-05-12T23:08:15.097200Z

You could probably flip those two :where clauses around and it would work great. The number of ?e's returned by [?e :ent/type "user"] is probably much larger than those returned by the fulltext clause.