Skip to content

Bigquery measure quoting issue in tesseract #9646

@AdeelK93

Description

@AdeelK93

Describe the bug
Really enjoyed working with cube so far! Very powerful tool!
Found a bug, which is quite easy to reproduce: when filtering a measure in bigquery, you get an error.
What's happening behind the scenes looks like having count(*) = "1" (note the quotes)

To Reproduce
Steps to reproduce the behavior:

  1. Set up a table, any table in bigquery.
  2. Set up any measure. I will use a very simple count measure, which cube auto-generates, but it's an error for all measures.
  3. Add a measure filter for count

Expected behavior
I'd like a having clause with correctly typed query parameters

Screenshots
Image

Minimally reproducible Cube Schema
In case your bug report is data modelling related please put your minimally reproducible Cube Schema here.
You can use selects without tables in order to achieve that as follows.

cubes:
  - name: test
    sql: select 1 as test_value
    data_source: default

    measures:
      - name: count
        type: count
{
  "measures": [
    "test.count"
  ],
  "filters": [
    {
      "member": "test.count",
      "operator": "equals",
      "values": [
        "1"
      ]
    }
  ]
}

Version:
v1.3.19

Additional context
Add any other context about the problem here.

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions