minodisk / bigquery-runner

An extension to query BigQuery directly and view the results in VSCode.
https://marketplace.visualstudio.com/items?itemName=minodisk.bigquery-runner
Apache License 2.0
44 stars 8 forks source link

SQL variables #14

Closed sebastianfuchsprivate closed 2 years ago

sebastianfuchsprivate commented 2 years ago

When I use variables in my SQL (DECLARE TYPE DEFAULT ;) I always get: [{ "resource": "mysql.bqsql", "owner": "bigqueryRunner", "severity": 8, "message": "Error: no routine", "startLineNumber": 1, "startColumn": 1, "endLineNumber": 150, "endColumn": 21 }] as output. Hardcoding works nicely.

minodisk commented 2 years ago

Minimum query for reproduction

DECLARE x NUMERIC(10) DEFAULT 12345;

SELECT x AS x;

Result

image

minodisk commented 2 years ago

@sebastianfuchsprivate

It's fixed in v1.0.0, try it!

image
sebastianfuchsprivate commented 2 years ago

@minodisk - works like a charm on my queries! Thank you very much for the extremly quick turn-around.