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

Colab example notebook has multiple issues

Open danielsparing opened this issue 7 months ago • 0 comments

The Colab version linked from the Jupyter Notebooks example has multiple issues as of 2025-03-22:

  1. if ran as it is, fails at the below cell:
%sql SELECT 'Off and flying!' as a_duckdb_column
# Returns:
# ---------------------------------------------------------------------------
# KeyError                                  Traceback (most recent call last)
# [...]
# [/usr/local/lib/python3.11/dist-packages/sql/run/resultset.py](https://localhost:8080/#) in _init_table(self)
#     472 
 #    473         if isinstance(self._config.style, str):
# --> 474             _style = prettytable.__dict__[self._config.style.upper()]
 #    475             pretty.set_style(_style)
  #   476 
# 
# KeyError: 'DEFAULT'

as this is related to this, we can...

  1. ...remove the jupysql version pin (defaulting to jupysql==0.11.0), and then runs into the same error as already reported in https://github.com/duckdb/duckdb-web/issues/4723

  2. furthermore, with either jupysql version, in the below line, the URL is not interpreted as an URL but jupysql is trying to parse it as a database.table table in a namespace:

%sqlplot boxplot --table https://d37ci6vzurychx.cloudfront.net/trip-data/yellow_tripdata_2021-01.parquet --column trip_distance
# Returns:
# (duckdb.duckdb.CatalogException) Catalog Error: Table with name cloudfront does not exist!
# Did you mean "information_schema.columns"?

# LINE 6:     FROM "https://d37ci6vzurychx"."cloudfront"
#                  ^
# [SQL: 
#     SELECT
#     percentile_disc([0.25, 0.50, 0.75]) WITHIN GROUP     (ORDER BY "trip_distance") AS percentiles,
#     AVG("trip_distance") AS mean,
#     COUNT(*) AS N
#     FROM "https://d37ci6vzurychx"."cloudfront"]

Is this colab notebook itself tracked somewhere within this repo? Couldn't find it.

danielsparing avatar Mar 22 '25 11:03 danielsparing