Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

UsageError: Line magic function `%%bigquery` not found

I am trying to load data from a Big query table to pandas dataframe. I followed the syntax given in the documentation here. Unfortunately, I am getting the error below.

enter image description here

I read a stackoverflow solution here, and followed its solution but I got this.

enter image description here

Then, I tried separating the code lines, but I get a new error UsageError: Line magic function %%bigquery not found.

enter image description here

I have been trying for a couple of hours to resolve this. Even restarting the kernel is not working. This works the very first time you run it but not if you run it twice. I have no clue what's going on. Any thoughts?

like image 469
Piyush Verma Avatar asked Mar 03 '26 18:03

Piyush Verma


1 Answers

Make sure you have run:

%load_ext google.cloud.bigquery

in a separate cell. (And don't put comments before the line with %%bigquery in it, as the other answer says.)

like image 159
zabop Avatar answered Mar 05 '26 06:03

zabop