Environment details
Colab (Ubuntu 18.04 LTS, Python 3.6.9, pip 19.3.1, bigquery 1.21.0)
Issue/ Example
For a parameterised query, the magic fails to parse negative numbers.
For example, this parameter dict:
params = {
"threshold": -5.0,
"min_year": 2000
}
and this query:
%%bigquery --project my-project-name --params $params
SELECT
year, MIN(mean_temp) as min, COUNTIF(snow) / COUNT(snow) * 100 AS pc_snowing
FROM
`bigquery-public-data.samples.gsod`
WHERE mean_temp < @threshold
AND year >= @min_year
GROUP BY year
ORDER BY year
runs fine if threshold is >= 0, but if it's negative, the Magic gets an exception:
UsageError: unrecognized arguments: -5.0, 'min_year': 2000}
This happens whether it's a dictionary or a JSON string, and happens with ints as well as floats.
Environment details
Colab (Ubuntu 18.04 LTS, Python 3.6.9, pip 19.3.1, bigquery 1.21.0)
Issue/ Example
For a parameterised query, the magic fails to parse negative numbers.
For example, this parameter dict:
and this query:
runs fine if
thresholdis >= 0, but if it's negative, the Magic gets an exception:This happens whether it's a dictionary or a JSON string, and happens with ints as well as floats.