Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 0 additions & 12 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -101,15 +101,3 @@ Perform a query
GROUP BY name
ORDER BY count DESC
LIMIT 3

Since BigQuery supports Python via BigQuery DataFrames, `%%bqsql` is offered as
an alias to clarify the language of these cells.

.. code:: python

%%bqsql
SELECT name, SUM(number) as count
FROM 'bigquery-public-data.usa_names.usa_1910_current'
GROUP BY name
ORDER BY count DESC
LIMIT 3
1 change: 0 additions & 1 deletion bigquery_magics/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ def load_ipython_extension(ipython):
ipython.register_magic_function(
_cell_magic, magic_kind="cell", magic_name="bigquery"
)
ipython.register_magic_function(_cell_magic, magic_kind="cell", magic_name="bqsql")

global is_registered
is_registered = True
Expand Down
4 changes: 2 additions & 2 deletions bigquery_magics/bigquery.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@

"""IPython Magics

.. function:: ``%%bigquery`` or ``%%bqsql``
.. function:: ``%%bigquery``

IPython cell magic to run a query and display the result as a DataFrame

.. code-block:: python

%%bqsql [<destination_var>] [--project <project>] [--use_legacy_sql]
%%bigquery [<destination_var>] [--project <project>] [--use_legacy_sql]
[--verbose] [--params <params>]
<query>

Expand Down
2 changes: 1 addition & 1 deletion docs/magics.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ in a Jupyter notebook cell.

%load_ext bigquery_magics

This makes the ``%%bigquery`` and ``%%bqsql`` magics available.
This makes the ``%%bigquery`` magic available.

Code Samples
------------
Expand Down
5 changes: 1 addition & 4 deletions tests/unit/bigquery/test_bigquery.py
Original file line number Diff line number Diff line change
Expand Up @@ -339,10 +339,7 @@ def test__create_dataset_if_necessary_not_exist():

@pytest.mark.parametrize(
("magic_name",),
(
("bigquery",),
("bqsql",),
),
(("bigquery",),),
)
def test_extension_load(magic_name):
globalipapp.start_ipython()
Expand Down
Loading