ploomber / jupysql

Better SQL in Jupyter. 📊
https://jupysql.ploomber.io
Apache License 2.0
706 stars 75 forks source link

Fix `sqlcmd` for duckdb #428

Open mehtamohit013 opened 1 year ago

mehtamohit013 commented 1 year ago

Currently, %sqlcmd tables return none, when used in conjunction with duckdb.

Code Snippet:

import pandas as pd
df = pd.read_excel('https://go.microsoft.com/fwlink/?LinkID=521962')

%load_ext sql
%sql duckdb://
%sql --persist df

%sqlcmd tables
edublancas commented 1 year ago

we need to investigate more, because using the native command from DuckDB doesn't return the table:

%%sql
show tables;

(empty result)

https://duckdb.org/docs/guides/meta/list_tables.html