This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2023-07-20
Channels
- # announcements (26)
- # babashka (1)
- # beginners (15)
- # biff (6)
- # cider (3)
- # circleci (1)
- # clj-kondo (33)
- # clojure (23)
- # clojure-denver (13)
- # clojure-europe (22)
- # clojure-norway (2)
- # clojurescript (45)
- # conjure (2)
- # datascript (4)
- # datomic (8)
- # events (5)
- # ghostwheel (2)
- # gratitude (4)
- # hyperfiddle (5)
- # jobs (5)
- # music (1)
- # off-topic (19)
- # pathom (4)
- # portal (25)
- # reitit (4)
- # releases (1)
- # shadow-cljs (28)
- # specter (2)
- # xtdb (23)
Can subqueries take dynamic query maps? Specifically, I have something like this in mind:
(->> [{:xt/id 1 :query '{:find [e] :where [[e :data 2]]}}
{:xt/id 2 :data 2}]
(mapv #(vector ::xt/put %))
(xt/submit-tx node))
;; error: query didn't match expected structure
(xt/q (xt/db node)
'{:find [x]
:where [[1 :query stored-query]
[(q stored-query) x]]})
Hey, you can either get creative with quoting, or walk the quoted form to conj your query on the '(q) list
Right, but this would require knowing the subquery map ahead of time 🙂 I have a half-baked idea where an attribute's value would be interpreted as results of some query. So, to read the value (e.g. in the middle of a larger query), you'd have to run the (sub)query first.
When would one see the NO_SOURCE_FILE
error? I am encountering it time to time on my prod box
Hey @U055PQH9R4M is there a stacktrace that goes along with that?
Does 1.x even have a SQL interface?
According to this page it does: https://docs.xtdb.com/language-reference/sql-queries/
BTW, @U04V70XH6, thanks for all the great work you do for the Clojure community 🤓
I'm having trouble getting the code on that page to work (see https://clojurians.slack.com/archives/CG3AM2F7V/p1689803380004219), and I was just wondering if anyone had some working code I could use as a guide
(query "SELECT PERSON.NAME FROM PERSON")
is missing the node
as the first parameter in the docs.Hmm, I can't remember whether I ever tried the Calcite stuff with 1.x... certainly not with recent releases anyway... maybe post on https://discuss.xtdb.com/ -- I think that might get seen by more XTDB users?
Looks like the XTDB team were trying to help yesterday with your previous post -- remember they're nearly all on UK time so they might not respond for a day's cycle...
Got it. I'm not in a hurry. I'm preparing a presentation for my coworkers that I will deliver next Wed.
I hate to cross-post, but perhaps it would benefit some XTDB users if I asked about examples of XTDB 1.x with SQL over on http://discuss.xtdb.com. Thoughts?
hey @U44P1CP5K 🙂 I think you'd be among the first, if I'm honest - we haven't ever had a lot of questions on it, particularly since the 2.x announcement, so you might be the one taking all the cobwebs for the team 😅
> I was just wondering if anyone had some working code I could use as a guide Hi @U44P1CP5K this works on my machine: https://gist.github.com/refset/f10bff23d199039a74badfab82c5fb1d
FYI - I think I've spotted the problem from the original thread (missing config) https://clojurians.slack.com/archives/CG3AM2F7V/p1689940130703219?thread_ts=1689803380.004219&cid=CG3AM2F7V