evidence-dev / evidence

Business intelligence as code: build fast, interactive data visualizations in pure SQL and markdown
https://evidence.dev
MIT License
3.84k stars 186 forks source link

[Bug]: Dimension Grid cannot handle spaces in column names #2192

Closed archiewood closed 1 week ago

archiewood commented 1 week ago

Describe the bug

Dimension Grids will error out in columns have spaces in

CleanShot 2024-07-05 at 11 42 34@2x

Steps to Reproduce

```sql test_data
select 'United States' as "country name", 100 as population union all
select 'Canada', 50
```` https://github.com/archiewood/dimension-grid-bug/blob/main/pages/index.md?plain=1 ### Logs _No response_ ### System Info _No response_ ### Severity serious, but I can work around it ### Additional Information, or Workarounds You can workaround by aliasing columns to "column_name"
ItsMeBrianD commented 1 week ago

@kwongz this is a good one for you to look at - need to double quote the column names that are put into the sql snippet

kwongz commented 1 week ago

Thanks I'll take a look at this one