Thanks this helps.
1💯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.
ok, the same config should work there… trino is just a name change
I’m trying to expose an analytics endpoint via load balancer to our customer, and need to configure options for the connector
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
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?
the username/password authentication and tls proxy config
customer is 3rd party
How many databases will your system have?
2 that need analytics access
I'm going to have to sleep on this one.
Let's reconnect tomorrow?
sure, I think we will try just ssh’ing and modifying the config.properties in our dev test environment and see that happens
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).
I'm sure ssh'ing will get it to work once, but it will probably not continue to work upon access gateway restart.
added 2 lines to /opt/presto-config/config.properties.template
http-server.authentication.type=PASSWORD
http-server.process-forwarded=true
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 gwI’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.
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.
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]]]
thanks, I think that will work. I agree that it’s weird that it returns anything the other way.
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
What is the full query?
{:find [[?e ...]],
:in [$ ?lname],
:where [[?e :ent/type "user"]
[(fulltext $ :user/name ?lname) [[?e _ _ _]]]]}
And what happens when you remove [?e :ent/type "user"]
?
same
wait actually... no it's fast now
i don't understand why
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
^^ That's what your first query did
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.