这是indexloc提供的服务,不要输入任何密码
Skip to content

BigQuery return types are always JSON strings #9840

@qnm

Description

@qnm

Version Information

Server Version: 2.31.0

Environment

OSS / EE

What is the current behaviour?

I have a native query for a table. I can query this table in Hasura, and my JSON result contains string and numeric types as expected.

image

image

I've created a logical model for a result set for this same data, which contains string, int64, float64 and timestamp types.

image

Querying via the native query / logical model results in all non-null fields being returned as string types.

image

I do not have the same issues with NQ/LM on my Postgres database.

What is the expected behaviour?

I would expect to see the correct types returned by my logical model.

How to reproduce the issue?

  1. Create a BigQuery table with non-string values e.g. int64 float64
  2. Build a logical model / query around the table
  3. Query it, observe the int64 and float64 values as strings

Screenshots or Screencast

As above.

Please provide any traces or logs that could help here.

None. I can provide on request.

Any possible solutions/workarounds you're aware of?

I have hacked my frontend code to cast the values. Not a solution.

Keywords

bigquery, native model, types

Note: As this is a bug, I am republishing #9828

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions