-
Notifications
You must be signed in to change notification settings - Fork 77
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
Issue with sqlplot
command for column names in a duckdb
SQL database that contain spaces in the name
#409
Comments
Looking at this Would you able to provide me the file: |
@tonykploomber: I think we can use any csv dataset and just rename any column and add spaces to debug |
Here's the dataset @tonykploomber @edublancas - https://data.cityofnewyork.us/Social-Services/311-Service-Requests-from-2010-to-Present/erm2-nwe9 Direct download: https://data.cityofnewyork.us/api/views/erm2-nwe9/rows.csv?accessType=DOWNLOAD Is that helpful? Please let me know if you have any other questions to replicate! For loading the data, here is the specific code we wrote with the class:
Test to plot with
Result: Test that breaks:
Result:
|
My bet it's in the space |
I see the problem: When executing:
We take the
This causes the SQL query to double wrap 'column name'; breaking the query. The solution is to sanitize the |
Pending related windows issue: #425 |
hey @jaanli: can you give the version in master a try and let us know if it works? if so, we can make a release!
|
Hi all! This is an amazing tool I am using to teach: https://github.com/onefact/datathinking.org-codespace/blob/main/notebooks/in-class-notebooks/230417-debugging-duckdb-and-cleaning-data-with-dbt-and-reading-and-standardizing-json.ipynb
(Scroll to bottom for example boxplot)
However, I am unable to plot the columns that contain spaces in column names, such as
%sqlplot boxplot --table service_requests --column 'Taxi Pick Up Location'
.Is there a way to do this or do we need to rename all the columns? (tedious, error-prone)
Tried looking this up in the docs but couldn't find it: https://jupysql.ploomber.io/en/latest/plot.html
Using this to teach a 150+ course at UPenn and University of Tartu called datathinking.org so it would be nice in case this is supported!
cc @mictadiello
The text was updated successfully, but these errors were encountered: