-
Notifications
You must be signed in to change notification settings - Fork 13
Invalid Input Error: There is no query result #70
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Easy workaround is to use a polars dataframe. |
This is a known "problem" with the pycapsule interface, where DuckDB exposes an arrow stream, but that stream can only be consumed once. There's still discussion about this upstream, but it's currently intentional that the last line would fail the second time you run it, because the query has already been consumed. |
Some more discussion here: One option to support out of core use is to create a view of the data source and pass in your own duckdb connection: import duckdb
import quak
conn = duckdb.connect(":memory:")
conn.sql("CREATE VIEW df AS SELECT * FROM 'https://github.com/uwdata/mosaic/raw/main/data/athletes.parquet'")
quak.Widget(conn, table="df") Although, with the remote dataset the latency here isn't very good and creating a TABLE in memory is probably the best user experience. With local disk views for larger parquet datasets works quite well. wget https://github.com/uwdata/mosaic/raw/main/data/athletes.parquet import duckdb
import quak
conn = duckdb.connect(":memory:")
conn.sql("CREATE VIEW df AS SELECT * FROM 'athletes.parquet'")
quak.Widget(conn, table="df") |
I'm not sure what @mscolnick did with marimo, but If I have two different cells import duckdb
import quak
df = duckdb.sql("""from read_parquet("https://github.com/uwdata/mosaic/raw/main/data/athletes.parquet")""")
widget = quak.Widget(df) and the second one is just widget I don't have any problem running cells. BTW, I really like the command |
If I try to run the last command the second time in Jupyter Notebook/Marimo I will get the following error message:
My quak version is 0.2.2, pyarrow 19.0.1 and Python 3.13.2. Operating system is a managed Windows 11.
The text was updated successfully, but these errors were encountered: