You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Feb 7, 2026. It is now read-only.
When using parameterized queries with NULLABLE values one has to provide the types field in case a parameter is null.
The check getTypeDescriptorFromProvidedType_ fails with Invalid type provided: "JSON".
Stacktrace
> Error: Invalid type provided: "JSON"
> at BigQuery.getTypeDescriptorFromProvidedType_ (Y:\[REDACTED]\backend\functions\node_modules\@google-cloud\bigquery\build\src\bigquery.js:741:19)
> at BigQuery.valueToQueryParameter_ (Y:\[REDACTED]\backend\functions\node_modules\@google-cloud\bigquery\build\src\bigquery.js:851:38)
> at BigQuery.createQueryJob (Y:\[REDACTED]\backend\functions\node_modules\@google-cloud\bigquery\build\src\bigquery.js:968:55)
> at BigQuery.wrapper (Y:\[REDACTED]\backend\functions\node_modules\@google-cloud\bigquery\node_modules\@google-cloud\promisify\build\src\index.js:30:35)
> at BigQuery.query (Y:\[REDACTED]\backend\functions\node_modules\@google-cloud\bigquery\build\src\bigquery.js:1218:14)
> at Y:\[REDACTED]\backend\functions\node_modules\@google-cloud\bigquery\node_modules\@google-cloud\promisify\build\src\index.js:57:28
> at new Promise (<anonymous>)
> at BigQuery.wrapper (Y:\[REDACTED]\backend\functions\node_modules\@google-cloud\bigquery\node_modules\@google-cloud\promisify\build\src\index.js:42:16)
> at Y:\[REDACTED]\backend\functions\lib\[REDACTED]\import.js:40:50
> at Array.map (<anonymous>)
Looking at the sourcecode it looks like the type JSON was not implemented.
Summary
When using parameterized queries with
NULLABLEvalues one has to provide thetypesfield in case a parameter is null.The check
getTypeDescriptorFromProvidedType_fails withInvalid type provided: "JSON".Stacktrace
Looking at the sourcecode it looks like the type
JSONwas not implemented.nodejs-bigquery/src/bigquery.ts
Lines 989 to 1008 in 4ebe5da
even though it should have been according to the comment
where it actually can be found:
nodejs-bigquery/src/types.d.ts
Lines 3592 to 3611 in 4ebe5da
Steps to reproduce
Run a parameterized query with a column of datatype JSON/NULLABLE
Environment
Sidenote: Same is true for the new datatype
RANGE