rill icon indicating copy to clipboard operation
rill copied to clipboard

Fix: Generate dashboard parser syntax error

Open cdeil opened this issue 1 year ago • 1 comments

Describe the bug

Generate dashboard with AI fails if run on CSV file with a column "Strength 1" with a space.

To Reproduce

I imported a CSV file with a column "Strength 1" which worked fine.

When I try to generate a dashboard with AI on it I get this:

measures:
  - name: total_records
    label: Total records
    expression: COUNT(*)
    description: ""
    format_preset: humanize
    valid_percent_of_total: true
  - name: Strength 1
    label: Sum of Strength 1
    expression: SUM(Strength 1)
    description: ""
    format_preset: humanize
    valid_percent_of_total: true
invalid expression for measure "Strength 1": Parser Error: syntax error at or near "1" LINE 1: ...cbabdd80e9a" AS SELECT 1, SUM(Strength 1) FROM "meta_cement_type_model" GROUP ... ^

Expected behavior

This should generate valid SQL and just work.

Screenshots

Screenshot 2024-04-14 at 20 57 00

Desktop (please complete the following information):

rill version 0.42.3

cdeil avatar Apr 14 '24 19:04 cdeil

Good catch, thanks for reporting it!

mindspank avatar Apr 17 '24 16:04 mindspank