Closed MarcSkovMadsen closed 2 weeks ago
I first tried to see if I could use the existing pygwalker database Connector
class. But this needs a connectionstring and I simply could not figure out how to get it if I only have access to the relation because the connection is created by the user outside of "my control". I've asked for help in https://github.com/duckdb/duckdb/discussions/14768.
The current approach tries to implement a custom Connector
class. The key point is to be able to execute subqueries on existing relations. It can actually be done in them most simple case but not more advanced cases (see added tests). I've asked for help in https://github.com/duckdb/duckdb/discussions/14772.
An alternative approach would be to see if I could use the BaseDataFrameParser
. But as far as I can see I will run into the same problems as I have now.
Any one is free to take a look. I'm currently stuck and out of ideas.
I managed to work around the problem by requiring the users register their duckdb connections. One day we might figure out how to avoid this.
Found the .query
argument which solves the issue.
Continues from #22. So review that one first.
Addresses #10 by adding
kernel_computation=True
support forduckdb.duckdb.DuckDBPyRelation
objects supported by narwhals.