Skip to content

Commit cfaa901

Browse files
authored
docs: explain the limitation of IPython magic dict arguments (#119)
1 parent 1e773f7 commit cfaa901

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

google/cloud/bigquery/magics.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,14 @@
6565
serializable. The variable reference is indicated by a ``$`` before
6666
the variable name (ex. ``$my_dict_var``). See ``In[6]`` and ``In[7]``
6767
in the Examples section below.
68+
69+
.. note::
70+
71+
Due to the way IPython argument parser works, negative numbers in
72+
dictionaries are incorrectly "recognized" as additional arguments,
73+
resulting in an error ("unrecognized arguments"). To get around this,
74+
pass such dictionary as a JSON string variable.
75+
6876
* ``<query>`` (required, cell argument):
6977
SQL query to run. If the query does not contain any whitespace (aside
7078
from leading and trailing whitespace), it is assumed to represent a

0 commit comments

Comments
 (0)