Replies: 4 comments 7 replies
-
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.
-
I have one additional question: Is there a way to select a default database (database as defined in the ibis world) for an ibis backend? Similar to how you can set the default schema on postgres with "SET search_path TO myschema;"? Or is it advisable to always provide the database name when listing and retrieving tables? |
Beta Was this translation helpful? Give feedback.
-
Apart from that, if you're interested you can follow my integration work in these two approaches, which I hope will be on the devel branch of dlt in the foreseable future :) Ibis integration 1: Ibis integration 2: |
Beta Was this translation helpful? Give feedback.
-
I have another question about the Expressions. Given a couple of unbound tables with a schema I provided and one expression deriving from those tables, let's say a Join, a column subselection, a renaming of one columns and a limit, how can I trace which of the resulting columns came from which original table and column name? I saw that it probably is possible to traverse the Expression tree, but I have not found a fairly straightforward way to do this. Is this possible at the moment? |
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