Skip to content
This repository was archived by the owner on Mar 6, 2026. It is now read-only.

Latest commit

 

History

History
35 lines (23 loc) · 863 Bytes

File metadata and controls

35 lines (23 loc) · 863 Bytes

IPython Magics for BigQuery

To use these magics, you must first register them. Run the %load_ext magic in a Jupyter notebook cell.

%load_ext bigquery_magics

This makes the %%bigquery magic available.

Code Samples

Running a query:

.. literalinclude:: ./samples/magics/query.py
   :dedent: 4
   :start-after: [START bigquery_jupyter_query]
   :end-before: [END bigquery_jupyter_query]

Running a parameterized query:

.. literalinclude:: ./samples/magics/query_params_scalars.py
   :dedent: 4
   :start-after: [START bigquery_jupyter_query_params_scalars]
   :end-before: [END bigquery_jupyter_query_params_scalars]

BigQuery Magics Reference