duckdb-web icon indicating copy to clipboard operation
duckdb-web copied to clipboard

Variables don't get set with `jupysql` using the native connection

Open danielsparing opened this issue 8 months ago • 0 comments

Experiencing it at least both in Colab and in VSCode on Windows (loosely following the Jupyter doc):

!pip install jupysql
import duckdb

%load_ext sql
conn = duckdb.connect()
%sql conn --alias duckdb
%%sql
SET VARIABLE my_var = 30;
SELECT getvariable('my_var') as my_var;

Returns a 1x1 table:

my_var None

It works fine using SQLAlchemy.

danielsparing avatar Feb 06 '25 17:02 danielsparing