Skip to content
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

Google BigQuery Node Returns Integer Values as String Instead of Number #10503

Open
AiratHalitov opened this issue Aug 21, 2024 · 2 comments
Open
Labels
in linear Issue or PR has been created in Linear for internal review

Comments

@AiratHalitov
Copy link

AiratHalitov commented Aug 21, 2024

Bug Description

I'm encountering an issue with the Google BigQuery node in n8n. When querying integer fields from BigQuery, the node returns the values as strings instead of numbers. This behavior can cause unexpected results in subsequent nodes that expect numeric data types.

Google BigQuery node version 2.1 (Latest)

Output example:
image

DB schema:

image

[
  {
    "name": "storeId",
    "mode": "NULLABLE",
    "type": "INTEGER",
    "description": "",
    "fields": []
  },
  {
    "name": "GLN",
    "mode": "NULLABLE",
    "type": "INTEGER",
    "description": "",
    "fields": []
  },
  {
    "name": "chainGLN",
    "mode": "NULLABLE",
    "type": "INTEGER",
    "description": "",
    "fields": []
  }
]

To Reproduce

  1. Set up a Google BigQuery node in n8n.
  2. Query a table that contains integer fields.
  3. Inspect the output from the BigQuery node.

Expected behavior

The integer fields should be returned as numbers.

Operating System

Alpine Linux v3.20

n8n Version

1.54.4

Node.js Version

3.4

Database

PostgreSQL

Execution mode

queue

@Joffcom
Copy link
Member

Joffcom commented Aug 21, 2024

Hey @AiratHalitov,

We have created an internal ticket to look into this which we will be tracking as "GHC-177"

@Joffcom Joffcom added the in linear Issue or PR has been created in Linear for internal review label Aug 21, 2024
@AiratHalitov
Copy link
Author

AiratHalitov commented Aug 21, 2024

When I try to cast the values ​​to int type it doesn't help:

SELECT 
  CAST(storeId AS INT64) AS storeId,
  CAST(GLN AS INT64) AS GLN,
  CAST(chainGLN AS INT64) AS chainGLN
FROM `{{ $json.dbname }}`
LIMIT 10;

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in linear Issue or PR has been created in Linear for internal review
Projects
None yet
Development

No branches or pull requests

2 participants