Replies: 1 comment
-
Thanks for asking! This is definitely a core use case of ibis, that is, using it to build expressions without a backend. The primary way you do this is by constructing what are called unbound tables, using the You can then compile the expression using Usually most folks want to execute these expressions in some way, and the way to do that is with one of the The primary thing you as the user needs to provide to |
Beta Was this translation helpful? Give feedback.
-
Hey ibis team, dlthub developer here! With some delay I'm currently working on integrating ibis into our new dataset access feature. My current prototype basically has some glue code that creates an ibis backend from connection credentials that we know anyway, and the user can then use that backend/connection to do regular ibis stuff.
I was wondering however if it is at all possible to use ibis just as a query builder. By that I mean constructing a query (in the form of a sqlglot-ast or some kind of other sqlglot object) with ibis expressions and then getting the sql statement in the dialect of your choosing. From what I can tell from reading your code, you can only build expressions tied to a backend and part of building an expression is also that reflection of the actual materialized schema on the database is done. I am thinking more of the way sqlalchemy works where you can build a query and then execute it at the end. Currently it look like I'd have to build my own backend to be able to achieve this, is that correct?
Some pseudocode of what I want I'd like to do to make it a bit clearer:
Beta Was this translation helpful? Give feedback.
All reactions