I am trying to fetch data from BigQuery. Everything is working fine when i fetch small data but when i try to fetch big data then its taking forever. any efficient way?
So far i am using this:
import os
os.environ['GOOGLE_APPLICATION_CREDENTIALS'] = 'cred.json'
import google.auth
from google.cloud import bigquery
%load_ext google.cloud.bigquery
import google.datalab.bigquery as bq
from google.cloud.bigquery import Client
client = bigquery.Client()
Here is my SQL command:
sql = """
SELECT bla, bla1, bla2
FROM table
"""
df = client.query(sql)
df.to_dataframe()