From cfaa901ae475451e2d43b2c4370cb1948b05d174 Mon Sep 17 00:00:00 2001 From: Peter Lamut Date: Thu, 4 Jun 2020 09:02:34 +0200 Subject: [PATCH] docs: explain the limitation of IPython magic dict arguments (#119) --- google/cloud/bigquery/magics.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/google/cloud/bigquery/magics.py b/google/cloud/bigquery/magics.py index 5872d0cfc..4f2a16cca 100644 --- a/google/cloud/bigquery/magics.py +++ b/google/cloud/bigquery/magics.py @@ -65,6 +65,14 @@ serializable. The variable reference is indicated by a ``$`` before the variable name (ex. ``$my_dict_var``). See ``In[6]`` and ``In[7]`` in the Examples section below. + + .. note:: + + Due to the way IPython argument parser works, negative numbers in + dictionaries are incorrectly "recognized" as additional arguments, + resulting in an error ("unrecognized arguments"). To get around this, + pass such dictionary as a JSON string variable. + * ```` (required, cell argument): SQL query to run. If the query does not contain any whitespace (aside from leading and trailing whitespace), it is assumed to represent a