File tree Expand file tree Collapse file tree 4 files changed +4
-7
lines changed
Expand file tree Collapse file tree 4 files changed +4
-7
lines changed Original file line number Diff line number Diff line change @@ -505,7 +505,7 @@ RUN pip install --upgrade dask && \
505505
506506# Add BigQuery client proxy settings
507507ENV PYTHONUSERBASE "/root/.local"
508- ADD patches/kaggle .py /root/.local/lib/python3.6/site-packages/kaggle .py
508+ ADD patches/kaggle_gcp .py /root/.local/lib/python3.6/site-packages/kaggle_gcp .py
509509ADD patches/sitecustomize.py /root/.local/lib/python3.6/site-packages/sitecustomize.py
510510
511511# Set backend for matplotlib
Original file line number Diff line number Diff line change @@ -38,10 +38,7 @@ class PublicBigqueryClient(bigquery.client.Client):
3838 client = PublicBigqueryClient()
3939 """
4040
41- def __init__ (self , project = None ):
42- if project :
43- raise Exception ("In order to query a private BigQuery project, please connect a GCP account. "
44- "Otherwise do not specify a project to use Kaggle's public dataset BigQuery integration." )
41+ def __init__ (self ):
4542 data_proxy_project = os .getenv ("KAGGLE_DATA_PROXY_PROJECT" )
4643 anon_credentials = credentials .AnonymousCredentials ()
4744 anon_credentials .refresh = lambda * args : None
Original file line number Diff line number Diff line change 66 from google .auth import credentials
77 from google .cloud import bigquery
88 from google .cloud .bigquery ._http import Connection
9- from kaggle import PublicBigqueryClient
9+ from kaggle_gcp import PublicBigqueryClient
1010
1111 def monkeypatch_bq (bq_client , * args , ** kwargs ):
1212 data_proxy_project = os .getenv ("KAGGLE_DATA_PROXY_PROJECT" )
Original file line number Diff line number Diff line change 88
99from google .cloud import bigquery
1010from google .auth .exceptions import DefaultCredentialsError
11- from kaggle import KaggleKernelCredentials , PublicBigqueryClient
11+ from kaggle_gcp import KaggleKernelCredentials , PublicBigqueryClient
1212
1313
1414class TestBigQuery (unittest .TestCase ):
You can’t perform that action at this time.
0 commit comments